Hands-onLesson 14 of 16

Real-world Scenarios

Four complete end-to-end scenarios putting all Azure Core Services together — the kind of architecture decisions you'll make and defend on the job and in interviews.

Scenario 1: Host a Web Application

Brief: A startup needs to deploy a Node.js API and React frontend. Expected 5,000 daily active users, growing to 50,000 in 6 months. Team of 3 engineers.

Architecture Decision

ComponentAzure ServiceWhy
React frontendBlob Storage (Static Website) + Azure CDNNear-zero cost, global CDN distribution
Node.js APIApp Service (Standard S2)PaaS simplicity, deployment slots, auto-scale
DatabaseAzure SQL Database (S2)Managed relational, automatic backups
File uploadsBlob Storage (Hot tier)Scalable object store, SAS tokens for uploads
Background tasksAzure Functions (Consumption)Email notifications, image processing, free tier

Walk-through

  1. Enable static website on a Blob Storage account. Upload React build to $web container.
  2. Create Azure CDN profile pointing to the blob endpoint for global edge caching.
  3. Create App Service Plan (Standard S2) and deploy Node.js API via GitHub Actions.
  4. Create Azure SQL Database (S2 DTU). Store connection string as App Setting (Key Vault reference).
  5. Add a staging slot on App Service. Configure CI/CD to deploy to staging, then swap to prod.
  6. Create Azure Functions app with blob trigger for image resizing and HTTP trigger for queued emails.
Cost Estimate

App Service S2 (~$70/mo) + Azure SQL S2 (~$30/mo) + Blob Storage + Functions. Total: roughly $120-150/month for a production-grade setup. Scales affordably as traffic grows.

Scenario 2: Lift-and-shift Legacy Backend

Brief: A 10-year-old Windows app uses a COM component and SQL Server with SQL Agent jobs, linked servers, and a UNC file share. Move to Azure with minimum code changes.

Architecture Decision

ComponentAzure ServiceWhy
App serverAzure VM (Windows Server 2019)COM components require full OS control
DatabaseSQL Managed InstanceSQL Agent, linked servers, near-100% SQL Server compat
File shareAzure Files (SMB)Replace UNC share; VMs mount it the same way
AvailabilityAvailability Set + Load BalancerRedundancy without refactoring to stateless

Walk-through

  1. Create a VNet with separate subnets for App servers and SQL MI (SQL MI requires a dedicated subnet).
  2. Deploy SQL MI to its subnet. Run Database Migration Service to migrate from on-prem SQL Server.
  3. Deploy Windows VMs into an Availability Set. Install app, configure COM components.
  4. Create Azure Files share and mount it on all VMs at the same UNC path the app uses.
  5. Update connection strings to point to SQL MI endpoint.

Scenario 3: Media Platform File Uploads

Brief: Users upload videos (up to 2 GB). Videos need transcoding. Processed videos are served to global users. Storage must be cost-effective — old videos are accessed rarely.

Architecture Decision

ComponentAzure ServiceWhy
UploadBlob Storage (direct SAS upload)Bypass API server — large files go direct to blob
Transcoding triggerAzure Function (Blob trigger)Fires on new upload, adds to processing queue
Transcoding workersACI (batch containers)Per-job containers, only pay during transcoding
Processed video storageBlob (Cool→Archive lifecycle)Hot for first 30 days, Cool after, Archive if old
DeliveryAzure CDNEdge delivery of finished videos globally
MetadataAzure SQL DatabaseVideo titles, user IDs, status — relational

Walk-through

  1. Frontend requests a SAS write token from API for direct-to-blob upload (never proxies video through API).
  2. Function fires on blob creation → writes transcoding job to Queue Storage → ACI container picks up job.
  3. ACI container transcodes, writes output to processed blob container, marks job complete in SQL DB.
  4. CDN origin points to the processed blob container.
  5. Lifecycle policy: Hot → Cool (30 days) → Archive (365 days).

Scenario 4: Choosing the Right Database

Different data types need different databases. Here's how to match them:

Data TypeServiceReason
User accounts, orders (relational)Azure SQL or PostgresTransactions, joins, ACID guarantees
Product catalog (semi-structured JSON)Cosmos DB (NoSQL API)Schema flexibility, fast global reads
Session data (ephemeral key-value)Azure Cache for RedisSub-millisecond in-memory access
Log data / telemetryTable Storage or Azure Data ExplorerCheap write-heavy time-series storage
User files / mediaBlob StorageUnlimited object storage, lifecycle policies
Shared app config filesAzure FilesMount as file share across all app instances

Key Architecture Principles

Summary

Real architectures combine multiple Azure services. The skill is in knowing which service to pick for each job — and being able to justify the decision in terms of cost, complexity, and operational overhead. Practice drawing architecture diagrams for each scenario type.