D4 · Infrastructure

Application Architecture

Designing the application layer: correctly sizing , applying the cloud patterns the exam references (retry, circuit breaker, CQRS, strangler fig), and externalizing configuration, state and cache.

Icon-web-41

App Service — plan design

TierProvidesWhen
Free / SharedShared compute, no SLA nor custom domain SSLTesting
BasicDedicated compute, custom domains, manual scale to 3Dev/test and small apps
StandardAutoscale (10), slots (5), daily backupsGeneral production
Premium v3/v4More slots (20), 30 instances, VNet integration, , better hardwareDemanding production; "VNet integration" or "zone redundancy" → minimum Premium
Isolated v2 (ASE v3)App Service Environment: deployed INTO your VNet, single-tenant, up to 100 instancesTotal network isolation/compliance — the signal is "fully isolated in the VNet"

Deployment slots

  • • Staging with its own URL; swap exchanges with production with NO downtime (instances are already warm)
  • • Swap with preview, auto-swap, and rollback = swap back
  • • Testing in production: % of traffic to a slot (canary)

App Service networking

  • • VNet integration: OUTBOUND traffic from the app into the VNet (reaching a private DB)
  • • Private Endpoint: private INBOUND traffic to the app
  • • Both together = fully private app (without an ASE)
  • • Access restrictions: filter inbound by IP/service tag (e.g. Front Door only)

Cloud patterns the exam asks about

PatternProblem it solvesIn Azure
Retry with backoffTransient network/service failuresAzure SDKs include it; Polly in .NET
Circuit BreakerDon't hammer a downed service; fail fastApp logic / API Management
Queue-Based Load LevelingSpikes that overwhelm the backend — a queue absorbs the loadService Bus / Storage Queues between web and worker
Competing ConsumersProcess the queue in parallel by scaling workersFunctions/Container Apps scaling by queue length
CQRSSeparate read and write models so each can scale independentlyWrites to SQL, reads from replicas/cache/Cosmos
Event SourcingFull history as a sequence of eventsCosmos change feed / Event Hubs
SagaDistributed transactions across microservices (compensation)Durable Functions, Service Bus
Strangler FigMigrate a monolith incrementally, route by routeAPI Management / App Gateway routing between legacy and new
Sidecar / AmbassadorCross-cutting functionality alongside the containerDapr in Container Apps / AKS
Cache-AsideRelieve the DB with a read cacheAzure Cache for Redis

Typical signals

"Order spikes overwhelm the backend" → queue between layers (load leveling). "Migrate the monolith gradually with no big bang" → strangler fig. "Reads outnumber writes 100:1" → CQRS + cache/replicas.

Configuration, secrets and state

App Configuration

  • •Centralized configuration for multiple apps/environments
  • •Feature flags with targeting
  • •Key Vault references for secret values
  • •Signal: "manage configuration for 20 microservices in one place"

Key Vault

  • •SECRETS (connection strings, API keys)
  • •Consumed via managed identity / references
  • •App Configuration stores config; Key Vault stores secrets — together, not competing

External state

  • •Stateless apps = requirement for scaling horizontally
  • •Sessions → Redis
  • •Files → (not the local filesystem)
  • •Stateful workflows → Durable Functions
Icon-databases-137

Caching and content delivery

LayerServiceCaches
DataAzure Cache for RedisQuery results, sessions, hot objects (cache-aside)
Global edgeFront Door (+CDN)Static and dynamic content accelerated at global POPs
APIAPI Management (cache policy)API responses by key/parameters
StaticStatic blob + CDN/Front DoorSPA, images, downloads

Automated deployment

ToolWhen
Azure DevOps (Pipelines)Enterprise CI/CD: build → test → release with approvals, gates and environments. Integrates with Azure Repos, GitHub or any git repo
GitHub ActionsNative GitHub workflows: YAML workflows in the repo, actions marketplace, OIDC integration for secret-free credentials
Azure Deployment EnvironmentsProvision full environments (IaC templates) on demand for dev/test — self-service with central governance
Deployment slots (App Service)Blue/green with no downtime inside App Service — swap between staging and production with prior warmup
Bicep / Terraform (IaC)Declarative, version-controlled infrastructure in the repo — a prerequisite for repeatable, reviewable deployments
GitOps + Flux/ArgoCD ()The cluster reconciles its state against the git repo — configuration changes = a PR, not manual commands

Exam signals

"Deploy to multiple environments with manual approval before production" → Azure Pipelines with gates/environments. "The team already uses GitHub" → GitHub Actions. "Repeatable IaC with no drift between environments" → Bicep/Terraform in a pipeline. "AKS clusters with no manual commands" → GitOps.

Decision table

RequirementDesign
Deploy with no downtime and immediate rollbackDeployment slots + swap
The app reaches a private SQL instance in the VNetRegional VNet integration (Premium)
The app is only accessible from the private networkPrivate Endpoint (+ disable public access)
Single-tenant App Service fully inside your VNetASE v3 (Isolated v2)
Only accept traffic coming from Front DoorAccess restrictions (service tag + X-Azure-FDID header)
Traffic spikes overwhelm order processingQueue (Service Bus) + scaling workers (load leveling)
Feature flags and central config across multiple appsAzure App Configuration
Incremental monolith migrationStrangler fig with APIM/App Gateway in front
User sessions when scaling horizontallyRedis as a session store (stateless app)
CI/CD with manual approval before productionAzure DevOps Pipelines (environments + approvals)
Deployment flow native to the GitHub repoGitHub Actions
On-demand dev/test environments with IaCAzure Deployment Environments

Did you get this topic?

Test what you just learned

A ticket-selling website collapses when popular tickets go on sale: the orders API receives 50x normal traffic and the database saturates, dropping orders. The business accepts that order confirmation may take a few extra seconds during spikes. What pattern do you apply?

Ready to test "Application Architecture"?

Put what you learned to the test with original AZ-305 exam questions.

Start AZ-305 mock exam

Unlimited mock exams with the Pro plan

Log in to track your progress.