1. Context and scale
This blueprint targets a small, single-region application maintained by one team. Think of an internal work tracker, a customer portal or a compact business API: authenticated users read and update relational data, but there is no need yet for independent services, a message broker or a distributed cache.
The application is a .NET monolith hosted on Azure App Service. It serves its API—and, if useful, a compiled frontend—from the same deployment. Microsoft Entra ID handles user sign-in. Azure SQL Database stores transactional data. The app accesses SQL through a managed identity over private networking; there are no database passwords in configuration.
The design deliberately prefers a short operational path over maximum availability. It uses one App Service instance and one SQL database in one region. That is a reasonable starting point for a small workload, not a promise of zero downtime. If the application later needs zone redundancy, multiple instances or a regional recovery site, those are explicit changes rather than hidden assumptions.
Assumptions
| Dimension | Assumption |
|---|---|
| Users | Fewer than 1,000 daily active users; peak concurrency is modest |
| Requests/s | Usually below 10 requests/s; occasional bursts are handled by a single app instance until measured otherwise |
| Data volume | Up to 50 GB of relational data during the initial operating period |
| Team size | 1–3 engineers; one team owns application, deployment and database changes |
| Budget | Planning envelope of roughly $75–$150 USD/month before tax, support, and unusual egress; validate regional prices before committing |
These are planning assumptions, not capacity guarantees or measured results. The actual limit depends on query shape, connection use, payload size, and the selected region and service configuration. Load-test representative endpoints before treating any of these numbers as a production capacity boundary.
The deployment region should be close to the user base and satisfy the organization’s data-residency requirements. Keep the first release in that region. A second region adds networking, deployment, data-recovery and operational work; it is not a free availability setting.
2. Requirements
The requirements below make the boundary of the first version explicit. In particular, they distinguish an internal reliability target from an Azure service guarantee.
Functional requirements
| ID | Requirement |
|---|---|
| F1 | Users sign in with a single-tenant Microsoft Entra ID application registration. |
| F2 | The application exposes authenticated HTTP endpoints for creating, viewing and updating work items. |
| F3 | A user can access only records allowed by the application’s authorization rules. |
| F4 | The app stores transactional data in Azure SQL Database and supports schema changes through versioned migrations. |
| F5 | Engineers can deploy a tested application build through a controlled CI/CD workflow. |
| F6 | Operators can identify failed requests and database connectivity problems without logging secrets or personal data unnecessarily. |
Non-functional requirements
| ID | Requirement | Initial design response |
|---|---|---|
| N1 | Keep operations simple for a small team. | One monolith, one region, managed services, and no message broker or Kubernetes cluster. |
| N2 | Avoid long-lived application secrets. | App Service system-assigned managed identity for SQL; federated credentials for CI deployment. |
| N3 | Restrict database exposure. | App Service regional VNet integration, Azure SQL private endpoint, and SQL public network access disabled. |
| N4 | Make failure visible and recoverable. | Azure Monitor Application Insights, actionable alerts, and documented database restore steps. |
| N5 | Keep releases compatible with the running app. | Expand-and-contract database changes; do not deploy a schema change that breaks the currently running version. |
| N6 | Set realistic reliability expectations. | A single-instance deployment has a single compute failure domain. Define and review internal SLOs; do not claim high availability from a basic topology. |
A requirement such as “the system must be highly available” is not satisfied merely by choosing a managed database. It needs a measurable target, a topology that can meet it, and a tested recovery procedure. For this small-scale blueprint, the initial goal is straightforward operations and a recoverable service, not multi-region continuity.
3. High-level design
The browser obtains an access token through the Entra ID application registration and calls the monolith on App Service. The application validates the token and enforces application-level authorization. For SQL connections, it uses its managed identity; Azure SQL grants that identity only the permissions the application needs.
Application Insights receives telemetry from the app. A GitHub Actions workflow builds and tests the application, then deploys it using workload identity federation rather than a client secret.
flowchart LR
Browser["Browser or client"] --> Entra["Microsoft Entra ID"]
Browser --> App["Azure App Service"]
Entra --> Browser
App --> PE["Azure SQL private endpoint"]
PE --> SQL["Azure SQL Database"]
App --> Monitor["Application Insights and Azure Monitor"]
GitHub["GitHub Actions"] --> AppRequest, identity, database, telemetry, and deployment paths for the single-region application.
The private endpoint is useful only when the app can resolve and reach its private address. App Service therefore needs regional VNet integration, a delegated integration subnet, and working private DNS for privatelink.database.windows.net. These are part of the database access design, not optional finishing touches.
There is no separate API gateway in this starting architecture. App Service terminates HTTPS and hosts the application. Add Azure Front Door or another edge service only when there is a concrete need such as global routing, a managed web application firewall policy, or centralized edge caching. Do not add one solely to make a small application diagram look more “enterprise.”
4. Cloud service mapping
Equivalent products differ in operational behavior and identity models; this table is a vocabulary map, not a claim that the services are interchangeable.
| Responsibility | Azure choice | AWS equivalent | GCP equivalent |
|---|---|---|---|
| Managed web application hosting | Azure App Service | AWS App Runner | Google App Engine |
| Relational transactional database | Azure SQL Database | Amazon RDS for SQL Server | Cloud SQL for SQL Server |
| Workforce/customer identity | Microsoft Entra ID | Amazon Cognito (customer identity) | Identity Platform |
| Workload identity to SQL | App Service managed identity | IAM role for the workload | Service account identity |
| Private database connectivity | VNet integration, Private Endpoint, Private DNS | VPC connectivity and RDS networking | VPC and Private Service Connect/private IP options |
| Application telemetry | Application Insights and Azure Monitor | Amazon CloudWatch | Cloud Monitoring and Cloud Trace |
| Secret storage if later required | Azure Key Vault | AWS Secrets Manager | Secret Manager |
| CI deployment identity | Entra workload identity federation | IAM role federation with OIDC | Workload Identity Federation |
Entra ID is not a drop-in name for every cloud identity service. If the application serves external customers, confirm the appropriate identity product, tenant model, licensing and user lifecycle requirements before making the app registration the long-term customer identity boundary.
5. Data design
Use a small relational model that reflects ownership and lifecycle. This example stores projects and work items. The user reference is the Entra object ID (oid), not an email address: email addresses can change, while the object ID is a stable directory identifier within its tenant.
erDiagram
PROJECTS ||--o{ WORK_ITEMS : contains
PROJECTS {
uniqueidentifier project_id PK
nvarchar name
uniqueidentifier owner_object_id
datetime2 created_at
}
WORK_ITEMS {
uniqueidentifier work_item_id PK
uniqueidentifier project_id FK
nvarchar title
nvarchar status
uniqueidentifier created_by_object_id
datetime2 created_at
rowversion version
}Projects own work items; Entra object IDs record ownership without copying profile data into the database.
A reasonable first schema uses server-generated identifiers, UTC timestamps, a constrained status value, and an index matching the common project-scoped list query. Keep authorization checks in the application even when a query filters by owner: the database schema is not a substitute for verifying the caller’s permissions.
CREATE TABLE dbo.Projects
(
ProjectId uniqueidentifier NOT NULL
CONSTRAINT PK_Projects PRIMARY KEY
DEFAULT NEWSEQUENTIALID(),
Name nvarchar(200) NOT NULL,
OwnerObjectId uniqueidentifier NOT NULL,
CreatedAt datetime2(3) NOT NULL
CONSTRAINT DF_Projects_CreatedAt DEFAULT SYSUTCDATETIME()
);
CREATE TABLE dbo.WorkItems
(
WorkItemId uniqueidentifier NOT NULL
CONSTRAINT PK_WorkItems PRIMARY KEY
DEFAULT NEWSEQUENTIALID(),
ProjectId uniqueidentifier NOT NULL,
Title nvarchar(300) NOT NULL,
Status nvarchar(20) NOT NULL
CONSTRAINT DF_WorkItems_Status DEFAULT N'open',
CreatedByObjectId uniqueidentifier NOT NULL,
CreatedAt datetime2(3) NOT NULL
CONSTRAINT DF_WorkItems_CreatedAt DEFAULT SYSUTCDATETIME(),
Version rowversion NOT NULL,
CONSTRAINT FK_WorkItems_Projects
FOREIGN KEY (ProjectId) REFERENCES dbo.Projects(ProjectId),
CONSTRAINT CK_WorkItems_Status
CHECK (Status IN (N'open', N'in_progress', N'done'))
);
CREATE INDEX IX_WorkItems_Project_CreatedAt
ON dbo.WorkItems (ProjectId, CreatedAt DESC)
INCLUDE (Title, Status, CreatedByObjectId);
The index supports a common list operation: return a project’s work items in creation order while displaying the indexed columns. Confirm that with real query plans and workload data; extra indexes increase write and storage costs. rowversion provides a simple optimistic-concurrency token, which the API can use to detect competing updates rather than silently overwriting them.
Use EF Core migrations or an equivalent reviewed migration mechanism. Deploy schema changes with an expand-and-contract sequence: add a compatible nullable column or table first, deploy code that can use it, backfill if necessary, and remove obsolete schema only after the old code is no longer running. Keep migrations short; a migration that rebuilds a large table or holds long locks deserves a separate operational plan.
6. Low-level design
Keep the application as a modular monolith: HTTP endpoints, application services, persistence, and identity concerns live in one deployable unit, but are separated in code. Avoid introducing a service boundary until independent scaling, ownership, or release cadence justifies the network and operational cost.
classDiagram
class WorkItemsEndpoint {
+GetByProject(projectId)
+Create(projectId, request)
}
class WorkItemService {
+ListAsync(projectId, caller)
+CreateAsync(projectId, request, caller)
}
class WorkItemRepository {
+ListAsync(projectId)
+AddAsync(item)
}
class AppDbContext {
+DbSet~WorkItem~ WorkItems
+DbSet~Project~ Projects
}
class EntraClaims {
+GetObjectId(principal)
}
WorkItemsEndpoint --> WorkItemService
WorkItemService --> WorkItemRepository
WorkItemService --> EntraClaims
WorkItemRepository --> AppDbContextHTTP handling delegates authorization and use-case logic before persistence.
The minimal example is a runnable ASP.NET Core health endpoint. It is intentionally not a business endpoint: health checks should not disclose data or become a substitute for authenticated readiness checks.
var builder = WebApplication.CreateBuilder(args);
var app = builder.Build();
app.MapGet("/healthz", () => Results.Ok(new { status = "ok" }));
app.Run();
Notice that the liveness response is deliberately small and does not reveal configuration or dependency details.
The realistic example wires single-tenant Entra token validation to an EF Core context. Install Microsoft.Identity.Web and Microsoft.EntityFrameworkCore.SqlServer; configure AzureAd:TenantId and AzureAd:ClientId as non-secret application settings. The SQL connection string uses the App Service system-assigned managed identity, so no password is stored in that setting.
using Microsoft.AspNetCore.Authorization;
using Microsoft.EntityFrameworkCore;
using Microsoft.Identity.Web;
var builder = WebApplication.CreateBuilder(args);
builder.Services
.AddAuthentication()
.AddMicrosoftIdentityWebApi(builder.Configuration.GetSection("AzureAd"));
builder.Services.AddAuthorization(options =>
{
options.AddPolicy("work-items.read", policy =>
policy.RequireAuthenticatedUser()
.RequireClaim("scp", "work-items.read"));
});
var connectionString =
builder.Configuration.GetConnectionString("WorkItems")
?? throw new InvalidOperationException("Missing WorkItems connection string.");
builder.Services.AddDbContext<AppDbContext>(options =>
options.UseSqlServer(connectionString));
var app = builder.Build();
app.UseHttpsRedirection();
app.UseAuthentication();
app.UseAuthorization();
app.MapGet("/api/projects/{projectId:guid}/work-items",
[Authorize(Policy = "work-items.read")]
async (Guid projectId, AppDbContext db, ClaimsPrincipal caller,
CancellationToken cancellationToken) =>
{
var objectId = caller.FindFirst("oid")?.Value;
if (!Guid.TryParse(objectId, out var callerObjectId))
return Results.Forbid();
var items = await db.WorkItems
.AsNoTracking()
.Where(item => item.ProjectId == projectId &&
item.Project.OwnerObjectId == callerObjectId)
.OrderByDescending(item => item.CreatedAt)
.Select(item => new
{
item.WorkItemId,
item.Title,
item.Status,
item.CreatedAt,
item.Version
})
.ToListAsync(cancellationToken);
return Results.Ok(items);
});
app.Run();
public sealed class AppDbContext(DbContextOptions<AppDbContext> options)
: DbContext(options)
{
public DbSet<WorkItem> WorkItems => Set<WorkItem>();
}
public sealed class WorkItem
{
public Guid WorkItemId { get; set; }
public Guid ProjectId { get; set; }
public Project Project { get; set; } = null!;
public string Title { get; set; } = "";
public string Status { get; set; } = "open";
public DateTime CreatedAt { get; set; }
public byte[] Version { get; set; } = [];
}
public sealed class Project
{
public Guid ProjectId { get; set; }
public Guid OwnerObjectId { get; set; }
}
Notice that the endpoint scopes the query to the caller’s Entra object ID, projects only response fields, and passes cancellation through to SQL.
Set the connection string’s authentication mode to Active Directory Managed Identity and its server name to the Azure SQL logical server. Create a contained database user for the App Service identity and grant only the required permissions. The scp claim is appropriate for delegated access tokens; if the app also accepts app-only tokens, define and authorize that flow separately instead of treating all authenticated tokens as equivalent.
7. Key flows
The first flow is interactive sign-in and a read. The browser obtains a token for the API; the API validates issuer, audience, signature and claims before applying record-level authorization. App Service then requests a SQL token using its managed identity. The database does not receive the user’s password or the application’s client secret.
sequenceDiagram
participant User as "User and browser"
participant Entra as "Microsoft Entra ID"
participant App as "Azure App Service"
participant SQL as "Azure SQL Database"
User->>Entra: Sign in and request API token
Entra-->>User: Access token
User->>App: HTTPS request with bearer token
App->>App: Validate token and authorize caller
App->>SQL: Query using managed identity token
SQL-->>App: Authorized rows
App-->>User: JSON responseThe user token authorizes the API call; the managed identity authorizes the app’s database connection.
The second flow is a release. Build and test once, deploy the same artifact, then verify the deployed health endpoint. Database migrations must be compatible with both the currently running and newly deployed code. For this scale, a migration can be executed by a controlled release task running in the app’s network context, or by an explicitly provisioned deployment runner with private network access. Do not expose SQL publicly just to make a hosted CI runner reach it.
sequenceDiagram
participant Dev as "Engineer"
participant CI as "GitHub Actions"
participant App as "Azure App Service"
participant SQL as "Azure SQL Database"
Dev->>CI: Push reviewed change
CI->>CI: Build and run tests
CI->>CI: Package immutable artifact
CI->>App: Authenticate with OIDC and deploy
App->>SQL: Apply compatible migration
CI->>App: Verify health endpoint
App-->>CI: Healthy responseRelease success includes a verified application deployment and a compatible database state.
A single-instance deployment has no staging slot in the Basic App Service plan. Expect a restart during deployment and plan the release around it. If releases need a warm staging environment and slot swap, move to a plan that supports deployment slots and test the swap behavior before relying on it.
8. Build and release
Use infrastructure as code for repeatable resource creation and review. The following Bicep excerpt shows the core compute and database choices. It is a focused snippet, not a complete network module: production deployment must also define the VNet, delegated App Service integration subnet, SQL private endpoint, and private DNS zone/link described earlier. Set SQL public network access to disabled only after that private path is in place.
param location string = resourceGroup().location
param appName string
param sqlServerName string
param databaseName string
param entraAdminName string
param entraAdminObjectId string
resource plan 'Microsoft.Web/serverfarms@2023-12-01' = {
name: '${appName}-plan'
location: location
kind: 'linux'
sku: {
name: 'B1'
tier: 'Basic'
capacity: 1
}
properties: {
reserved: true
}
}
resource app 'Microsoft.Web/sites@2023-12-01' = {
name: appName
location: location
kind: 'app,linux'
identity: {
type: 'SystemAssigned'
}
properties: {
serverFarmId: plan.id
httpsOnly: true
siteConfig: {
linuxFxVersion: 'DOTNETCORE|10.0'
alwaysOn: true
ftpsState: 'Disabled'
minTlsVersion: '1.2'
appSettings: [
{ name: 'WEBSITE_RUN_FROM_PACKAGE', value: '1' }
{ name: 'ConnectionStrings__WorkItems', value: 'Server=tcp:${sqlServerName}.database.windows.net,1433;Database=${databaseName};Authentication=Active Directory Managed Identity;Encrypt=True;TrustServerCertificate=False;' }
]
}
}
}
resource sqlServer 'Microsoft.Sql/servers@2023-08-01-preview' = {
name: sqlServerName
location: location
properties: {
version: '12.0'
minimalTlsVersion: '1.2'
publicNetworkAccess: 'Disabled'
administrators: {
administratorType: 'ActiveDirectory'
principalType: 'Group'
login: entraAdminName
sid: entraAdminObjectId
tenantId: subscription().tenantId
azureADOnlyAuthentication: true
}
}
}
resource database 'Microsoft.Sql/servers/databases@2023-08-01-preview' = {
parent: sqlServer
name: databaseName
location: location
sku: {
name: 'GP_S_Gen5_1'
tier: 'GeneralPurpose'
family: 'Gen5'
capacity: 1
}
properties: {
minCapacity: 0.5
autoPauseDelay: 60
}
}
output appPrincipalId string = app.identity.principalId
The Azure resource API versions and available database SKU combinations should be validated against the target subscription and region. Add the SQL user and narrowly scoped database grants as a reviewed migration step; the infrastructure deployment identity should not silently become the application’s runtime database identity.
This GitHub Actions example assumes a federated identity credential has been configured for the repository and environment, with permission to deploy to the target App Service. Use protected environments and required reviewers for production. Store no publish profile or service-principal secret in repository secrets.
name: build-and-deploy
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: read
id-token: write
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: "10.0.x"
- run: dotnet restore
- run: dotnet test --configuration Release
- run: dotnet publish src/Web/Web.csproj --configuration Release --output ./publish
- uses: actions/upload-artifact@v4
with:
name: web
path: ./publish
deploy:
if: github.event_name == 'push'
needs: test
runs-on: ubuntu-latest
environment: production
steps:
- uses: actions/download-artifact@v4
with:
name: web
path: ./publish
- uses: azure/login@v2
with:
client-id: ${{ vars.AZURE_CLIENT_ID }}
tenant-id: ${{ vars.AZURE_TENANT_ID }}
subscription-id: ${{ vars.AZURE_SUBSCRIPTION_ID }}
- uses: azure/webapps-deploy@v3
with:
app-name: ${{ vars.AZURE_WEBAPP_NAME }}
package: ./publish
A practical test strategy is deliberately layered:
| Test type | What it should prove | Where it runs |
|---|---|---|
| Unit | Business rules, authorization decisions, validation and mapping behave as intended. | Every pull request; no Azure dependency required. |
| Integration | EF mappings, migrations, constraints and SQL queries work against SQL Server-compatible infrastructure. | CI with an isolated SQL Server test environment; run a small Azure SQL verification before release if platform-specific behavior matters. |
| Contract | The API’s request, response, status-code and token-claim contracts remain compatible with its clients. | Pull requests and any client release pipeline. |
| Load | Representative reads and writes stay within the selected app and database capacity; connection use and latency remain acceptable. | Pre-release and after meaningful workload or schema changes. |
Do not treat an in-memory database as proof that SQL constraints, transaction behavior or query plans are correct. Keep tests proportionate: the small team needs fast feedback, not a bespoke testing platform.
9. Observability
Instrument the application with traces, metrics and structured logs from the start. Application Insights is the Azure-facing destination; OpenTelemetry instrumentation keeps the application’s telemetry model portable. Avoid logging tokens, connection strings, full request bodies, or unnecessary personal data.
A useful structured event answers what operation happened, which request it belonged to, and how it ended. For example, log a work-item update with its operation name and outcome, not the submitted token or an entire database entity.
{
"timestamp": "2026-10-30T12:00:00Z",
"level": "Information",
"event": "work_item.updated",
"trace_id": "4bf92f3577b34da6a3ce929d0e0e4736",
"request_id": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01",
"work_item_id": "8db1f2c4-91e5-4f2d-9c18-b85d5f8a413e",
"outcome": "success",
"duration_ms": 42
}
The identifiers above are examples, not production data. Prefer a structured logging API with named properties over string interpolation so fields remain queryable. Use trace and request identifiers for correlation; keep user identifiers out of general-purpose logs unless there is a documented, access-controlled reason to retain them.
The following code configures ASP.NET Core, outbound HTTP, and SQL client tracing and exports through the Azure Monitor OpenTelemetry distribution. Add the Azure.Monitor.OpenTelemetry.AspNetCore package and configure the Application Insights connection string through App Service settings.
using OpenTelemetry.Trace;
builder.Services
.AddOpenTelemetry()
.WithTracing(tracing => tracing
.AddAspNetCoreInstrumentation()
.AddHttpClientInstrumentation()
.AddSqlClientInstrumentation())
.UseAzureMonitor();
Notice that traces connect incoming requests to outbound SQL and HTTP operations; do not add high-cardinality or sensitive values as span attributes.
Track RED metrics for the service and USE metrics for constrained resources. Use built-in Azure platform metrics where available, and add application metrics only for questions platform telemetry cannot answer.
| Method | Measure | Examples |
|---|---|---|
| RED: Rate | Requests handled over time. | Request count by route template and status class. |
| RED: Errors | Failed requests over time. | 5xx rate, unhandled exceptions, authentication failures. |
| RED: Duration | Request latency distribution. | p50, p95 and p99 by endpoint; SQL dependency duration. |
| USE: Utilization | Resource busy relative to capacity. | App Service CPU and memory; SQL compute utilization. |
| USE: Saturation | Work waiting for a resource. | App request queue, connection-pool pressure, SQL worker or resource waits. |
| USE: Errors | Resource-level faults. | App restarts, database connection failures, throttling or failed dependencies. |
Define service objectives as targets to review, not guarantees from a single-instance design.
| SLI | Initial SLO target | Measurement |
|---|---|---|
| Availability | 99.5% monthly for the authenticated API’s successful, non-client-error requests. | Successful eligible requests divided by eligible requests; exclude planned maintenance only if it is defined in advance. |
| Latency | 95% of ordinary read requests complete within 500 ms over a rolling month. | Server-side request duration by route; validate with representative load tests. |
| Recovery | Restore critical service within 4 hours after a declared regional or database incident. | Exercise the documented restore procedure and record actual recovery time. |
These are initial objectives for discussion. A single App Service instance can restart or become unavailable, so availability depends on the application, platform, database, deployment behavior and maintenance. Alerting on a target does not make the topology capable of meeting it.
Keep one dashboard for request rate, failures, latency, app restarts and SQL dependency health; a second view can show App Service CPU/memory and SQL compute/storage signals. Page an on-call engineer for sustained 5xx errors, repeated database connection failures, a service-wide availability breach, or a database condition that threatens data integrity. Send lower-severity CPU growth, non-critical latency drift and isolated client errors to a ticket or daily review rather than paging on every blip.
10. Security and compliance
Security starts with the identity boundaries. Register the API as a single-tenant Entra application and require the intended audience and delegated scopes. Apply authorization to each operation and resource; authentication proves who presented a token, not that the caller owns a particular project. Keep the App Service system-assigned managed identity separate from user identity, and grant it only the SQL permissions required at runtime.
Use private connectivity for SQL: App Service regional VNet integration, a private endpoint, private DNS, and disabled public network access. Restrict inbound access to HTTPS, disable FTP, and enforce current TLS settings. If an organization needs a web application firewall or centralized internet edge, add and operate that control deliberately rather than assuming App Service alone supplies it.
Additional controls for this scale:
- Use GitHub workload identity federation for deployment. Limit the federated credential to the intended repository, branch or environment and grant deployment access only to the target resources.
- Keep tenant IDs, client IDs, and non-secret connection settings in application configuration. Do not put credentials in source control, deployment artifacts or logs.
- Enable database auditing and diagnostic settings according to the organization’s retention and access policies. Restrict who can query production telemetry.
- Use dependency scanning, code review and supported runtime versions. Patch the application and review App Service platform and database configuration regularly.
- Define data classification, retention, deletion and backup requirements before storing customer or regulated data. A managed database does not automatically establish compliance for the application’s complete data lifecycle.
Compliance depends on the service configuration, contract, region, identity controls, operational procedures and the data being processed. Confirm the applicable Azure compliance documentation and organizational obligations; do not infer that an architecture diagram makes a workload compliant.
11. Cost
Assumption-based monthly estimate
The following is a planning estimate in USD, not a quote. Prices vary by region, currency, agreement, usage, backup settings and service changes. Validate the actual configuration in the Azure Pricing Calculator before deployment.
| Component | Planning assumption | Estimated monthly range |
|---|---|---|
| App Service | One Linux Basic B1 instance, running continuously. | $15–$35 |
| Azure SQL Database | General Purpose serverless, low average compute use, modest storage, occasional resume from auto-pause. | $20–$65 |
| SQL private endpoint and DNS | One endpoint, low traffic; excludes any extra networking services. | $8–$20 |
| Application Insights / Log Analytics | Low ingestion volume and short initial retention; monitor ingestion rather than assuming it is free. | $5–$20 |
| Data transfer and miscellaneous | Small outbound volume; excludes unusual egress or support plans. | $0–$15 |
| Indicative total | Assumptions above; actual consumption and region determine the bill. | $48–$155 |
The ranges intentionally include uncertainty. A serverless database can be cost-effective for intermittent use, but auto-pause can add a resume delay and should be tested against the product’s latency expectations. If the application is used throughout the day or needs more predictable response times, compare the real consumption bill with a provisioned tier.
The cost controls are operational, not just SKU choices: set a budget alert, inspect SQL compute and storage trends, constrain telemetry retention and ingestion, and remove unused test environments. Do not reduce database backup or security settings to meet a budget without explicitly accepting the resulting recovery and risk trade-offs.
12. Failure modes, resilience and disaster recovery
A small deployment still needs an incident plan. Managed services reduce the amount of infrastructure the team operates; they do not eliminate application defects, identity outages, deployment mistakes, or data recovery work.
| Failure mode | Likely effect | First response |
|---|---|---|
| App Service instance restart or unhealthy deployment | Brief application interruption, especially with one instance and no slot. | Check deployment and platform events; roll back to the last known-good artifact. |
| SQL connection failure or private DNS error | Requests that require data fail or time out. | Check the SQL health signal, App Service VNet integration, DNS resolution and private endpoint status. |
| SQL capacity pressure | Increased latency, timeouts or throttling. | Inspect query and resource signals; identify expensive queries before increasing capacity. |
| Entra ID token or configuration problem | Sign-in or API authorization failures. | Verify tenant, audience, scope and token configuration; avoid bypassing authorization as a workaround. |
| Bad schema migration | Requests fail or data is transformed incorrectly. | Stop further rollout; apply the forward-fix or restore plan based on the change and data impact. |
| Accidental data deletion or corruption | Data becomes unavailable or incorrect. | Declare an incident, identify the recovery point, restore to a separate database where possible, and validate before cutover. |
Use the database’s configured point-in-time restore capability as the primary recovery mechanism for accidental changes. Choose retention and backup redundancy to match the data’s recovery requirements, and test restoration rather than assuming a successful backup configuration proves recoverability. A restore can require coordination: provision a target, validate data, update connection settings, and communicate any write loss.
For this single-region design, document an initial recovery objective of a four-hour service restoration and a one-hour maximum data-loss target as assumptions to validate, not Azure guarantees. Confirm whether the selected SQL backup configuration can meet them, then run a restore exercise. If a regional incident must be survived without waiting for regional recovery, plan a separate geo-recovery design with explicit data-loss and cutover procedures.
13. Evolving to the next scale
Scale the bottleneck you measured, not the architecture you imagine. The first useful optimization is often a query fix, a missing index, or a better response projection—not a cache or a service split.
| Signal or requirement | Next change | What it adds |
|---|---|---|
| CPU, memory or request queue consistently approaches the app plan’s usable capacity. | Scale the App Service plan up or out; add a second instance when availability justifies it. | Higher compute cost and more attention to stateless sessions and deployment behavior. |
| Releases need validation before production traffic. | Move to a plan with deployment slots and use a tested slot swap process. | A more controlled release path and extra configuration considerations. |
| SQL is the sustained latency or capacity bottleneck. | Inspect query plans, indexing and connection behavior first; then increase SQL capacity or review the data model. | Higher database cost; possibly a changed operational model. |
| Work must continue independently of an HTTP request. | Add a queue and a background worker for a specific asynchronous workflow. | Message delivery, retries, idempotency and operational monitoring. |
| A documented availability objective exceeds a single instance or region. | Design multiple instances, zone-aware database configuration where available, or a regional recovery topology. | More cost, deployment coordination and tested failover procedures. |
| Different application areas need independent ownership or scaling. | Extract a bounded capability only after its data and API boundary is understood. | Network failure modes, separate deployment pipelines and additional on-call surface. |
Do not introduce Redis simply because reads exist, Kubernetes because the application is a service, or a microservice because the team has more than one engineer. Each adds a new consistency, security or operational boundary. A monolith on App Service with a well-indexed SQL database can remain a sound architecture well beyond its initial size.
14. Phased implementation plan
A small team can deliver this architecture in deliberate increments. The important constraint is to establish the identity and data boundaries before production data arrives, not to build every possible operational feature in the first sprint.
- Confirm the workload and region. Identify the user population, data classification, expected access pattern, recovery expectations and budget owner. Validate the Entra tenant model and regional service availability.
- Build the application skeleton. Create the monolith, API contract, health endpoint, structured logging and automated unit tests. Define authorization rules alongside the first business operation.
- Provision the private data path. Deploy the App Service plan, VNet integration subnet, Azure SQL private endpoint and private DNS. Disable SQL public access only after the private path is verified.
- Wire identity end to end. Configure the Entra application registration for user tokens, enable the App Service managed identity for SQL access, create a contained SQL user, and grant the minimum runtime permissions.
- Implement schema and integration tests. Add versioned migrations, foreign keys and indexes for the actual query patterns. Test against SQL Server-compatible infrastructure and verify important behavior against the target Azure SQL configuration.
- Automate release and recovery. Use OIDC for deployment, protect production approvals, deploy immutable artifacts, and document migration sequencing and rollback or forward-fix steps.
- Run a pre-production exercise. Load-test representative operations, inspect traces and database behavior, test authorization failures, and perform a database restore to confirm the recovery procedure.
- Review after real use. Compare actual telemetry and monthly cost with the assumptions. Change the plan, database tier or topology only when a measured constraint or a defined reliability requirement calls for it.
This blueprint keeps the first production system intentionally small: one deployable application, one managed relational database, one identity provider and one region. Its safety comes from explicit access boundaries, compatible releases, useful telemetry and tested recovery—not from adding infrastructure before the workload needs it.