Path 5 · Module 2
Design an application architecture
Read the module on Microsoft Learn, then come back here: test yourself with the quiz and apply it in the design exercise. Write down what you want to remember with the ✎ Note buttons.
Step 1 · Read the module
Open Design an application architecture on Microsoft Learn. The units:
- Introduction
- Describe message and event scenarios
- Design a messaging solution
- Design an Azure Event Hubs messaging solution
- Design an event-driven solution
- Design a caching solution
- Design API integration
- Design an automated app deployment solution
- Design an app configuration management solution
- Module assessment
- Summary and resources
Close the Learn tab. Answering from memory is what makes it stick; looking it up just measures how fast you can scroll.
Quiz
20 exam-style questions, roughly in the order of the units. Click an answer to see the explanation. Your best score is saved and shown on the path page; use Retry at the end to go again.
1. What's the key difference between a message and an event?
C. With a message the publisher has an expectation of processing; with an event it doesn't care who reacts.
2. Orders must be processed exactly in order, with duplicate detection and transactions. Which service?
B. Service Bus offers FIFO via sessions, duplicate detection, transactions and dead-lettering.
3. A simple queue must hold millions of messages (over 80 GB) cheaply, without ordering guarantees. Which service?
C. Queue Storage is cheap and scales to very large queues; Service Bus adds enterprise features.
4. One price-change message must reach three independent subscriber systems, each filtering what it needs. What do you use?
B. Topics provide publish/subscribe; each subscription gets its own copy and can filter.
5. Where do messages go that can't be delivered or processed after several attempts in Service Bus?
B. Dead-lettered messages can be inspected and resubmitted.
6. Millions of telemetry events per second from devices must be ingested and replayed by several consumers. Which service?
A. Event Hubs is a big-data streaming platform with partitions and consumer groups.
7. In Event Hubs, what lets several applications read the same stream independently at their own pace?
D. Each consumer group has its own view (offsets) of the stream.
8. Event Hubs data must also be stored automatically in a data lake for batch processing. Which feature?
C. Capture writes the stream to Blob Storage or ADLS in Avro/Parquet.
9. A function must run whenever a blob is created in a storage account, with push delivery. Which service routes this?
D. Event Grid is the reactive event-routing service for discrete events from Azure services.
10. Which statement about Event Grid is correct?
C. Event Grid delivers events via push with retry; it's not a streaming store like Event Hubs.
11. Product catalog reads hit the database thousands of times per second with the same data. What improves performance most?
D. The app checks the cache first and loads from the database on a miss.
12. Session state for a web farm must be shared across instances. Which service?
A. Redis is a common distributed session store with very low latency.
13. Static images and scripts must load fast for users worldwide. What do you add?
D. A CDN caches static content at edge locations near users.
14. Internal and partner APIs need a single gateway with rate limiting, keys, transformations and a developer portal. Which service?
A. APIM is the API gateway and management layer, including policies and a developer portal.
15. Partners may call the API at most 100 times per minute. How do you enforce this in API Management?
A. APIM policies such as rate-limit and quota throttle callers.
16. API Management must expose APIs only inside a VNet with a self-hosted gateway on-premises for some backends. Which tier supports VNet injection and self-hosted gateways?
B. Full VNet injection and self-hosted gateways need Premium (Developer for test).
17. Infrastructure must be deployed repeatably from code in a pipeline. What's the core practice?
D. IaC in pipelines (Azure DevOps or GitHub Actions) gives consistent, auditable deployments.
18. Which deployment strategy routes a small percentage of users to a new version first?
D. Canary exposes a small group first; if healthy, traffic increases.
19. Feature flags and app settings for 30 microservices must be managed centrally, with secrets kept elsewhere. Which service?
A. App Configuration centralizes settings and feature flags; secrets stay in Key Vault and are referenced.
20. Microservices must pick up a configuration change without a restart. Which App Configuration pattern helps?
A. Apps watch a sentinel key and reload configuration when it changes.
Design exercise
On paper · about 25 minutes
Harborline Shipping is rebuilding its booking platform as microservices.
- Bookings must be processed exactly once and in order per customer; failed bookings must be kept for investigation.
- Billing, CRM and notifications all react to a new booking, independently.
- Container sensors send 50,000 readings per second; analytics and a live dashboard both read them.
- Partners use a REST API with per-partner keys and limits.
- The port schedule page is read 10,000 times a minute and changes every 15 minutes.
- Releases must be gradual and settings must change without redeploying.
-
Task
Choose messaging and eventing
Map the booking flow, the fan-out and the sensor data to services.
Done when- Ordering and dead-lettering are covered.
- Fan-out uses pub/sub.
- Sensor data has multiple readers.
Model answer
- Bookings: Service Bus queue with sessions (customer ID) and dead-lettering.
- Fan-out: Service Bus topic with subscriptions per system (or Event Grid for lightweight notifications).
- Sensors: Event Hubs with consumer groups for analytics and dashboard; Capture to the data lake.
-
Task
Design the edge: API and caching
How do partners call the API, and how is the schedule page kept fast?
Done when- Keys and limits are enforced centrally.
- The cache strategy matches the 15-minute change rate.
Model answer
API Management with products per partner tier, subscription keys and rate-limit-by-key. Schedule: cache-aside in Redis with a 15-minute TTL (or invalidate on change), output caching in APIM, CDN for static assets.
-
Task
Design deployment and configuration
Describe the pipeline and how settings and feature flags are managed.
Done when- Infrastructure is code.
- Releases are gradual.
- Secrets are not in config.
Model answer
Bicep + GitHub Actions/Azure DevOps; canary or blue-green deployments (AKS/Container Apps revisions or App Service slots); App Configuration with feature flags, sentinel-key refresh and Key Vault references; managed identities for access.