Lesson 2 of 2 Approaching AI-200 Questions

Choosing Between Similar Azure Services

This lesson gathers the most frequent service comparisons in AI-200, from container hosts to data stores, messaging and configuration.

Learning outcomes

After completing this lesson, you will be able to:

  • Choose a container hosting platform.
  • Choose a data store for documents, relational data or caching.
  • Distinguish Service Bus from Event Grid.
  • Distinguish Key Vault from App Configuration.

Container hosting

Four platforms in the exam run containers. They differ mainly in how much of the platform you manage and in how they scale. App Service suits web apps and APIs that fit its plan-based model and want built-in deployment slots and authentication. Container Apps suits microservices and event-driven workers that need KEDA scaling, scale to zero and revisions, without managing Kubernetes. AKS suits teams that need the full Kubernetes API, custom controllers or fine-grained control of nodes and networking. Azure Functions suits short, trigger-driven units of code.

App Service
You manageThe app and plan size
ScalingPlan instances, autoscale rules
Release modelDeployment slots and swap
Choose when A web app or API with minimal operations
Container Apps
You manageThe app and scale rules
ScalingKEDA rules, scale to zero
Release modelRevisions and traffic splitting
Choose when Microservices and event-driven workers
AKS
You manageWorkloads, node pools and upgrades
ScalingHorizontal Pod Autoscaler, KEDA add-on, cluster autoscaler
Release modelDeployments, rolling updates
Choose when Full Kubernetes control is required
Sort into groups

Which container platform?

Exam skills 1.1.3 · 1.2.1 · 1.2.3 · 3.2.1

Choose the platform that fits each workload.

Log in to try this activity Interactive activities are free with an account.

Data stores for AI workloads

Three data services in the exam can store embeddings, and each is chosen for its primary role rather than for vector search alone. Cosmos DB for NoSQL stores JSON documents at any scale with single-digit millisecond reads, global distribution and a change feed, and adds vector search next to the documents. Azure Database for PostgreSQL suits relational data with joins, transactions and SQL, and adds vector search through pgvector. Azure Managed Redis is an in-memory store for caching and very low-latency lookups, and adds vector search through RediSearch, typically for semantic caching rather than as the system of record.

Cosmos DB for NoSQL
Primary roleOperational JSON documents
Vector indexesflat, quantizedFlat, diskANN
React to changesChange feed
Choose when Documents and vectors together at scale
PostgreSQL with pgvector
Primary roleRelational data and SQL
Vector indexesIVFFlat, HNSW, DiskANN
React to changesApplication events or logical replication
Choose when Relational joins, transactions and SQL filters
Azure Managed Redis
Primary roleIn-memory cache and fast lookups
Vector indexesFLAT, HNSW
React to changesKeyspace notifications, Pub/Sub
Choose when Sub-millisecond reads and semantic caching

Messaging and eventing

Service Bus is a message broker: it holds commands or work items until a consumer takes them, with locks, retries, ordering through sessions, transactions and dead-letter queues. Event Grid is an event router: it pushes notifications that something has happened to many subscribers, with filtering and retries but no consumer-paced queue. A third service, Event Hubs, ingests high-volume telemetry streams; it appears in the exam mainly as an Event Grid destination or a trigger.

A simple test distinguishes them. If the sender expects someone to do something and cares that it is done exactly once in the right order, use Service Bus. If the sender is announcing that something happened and does not care who reacts, use Event Grid. The two are often combined: Event Grid can deliver events into a Service Bus queue so that a worker processes them at its own pace.

Configuration and secrets

Key Vault stores secrets, keys and certificates, with hardware-backed protection options, versioning, rotation and auditing. App Configuration stores ordinary settings and feature flags, with labels, snapshots and dynamic refresh, and can hold Key Vault references so that one provider call loads both. App settings on App Service, Functions and Container Apps supply environment variables to one app; they are convenient but not shared, and secrets in them should be Key Vault references.

When a question mentions a password, connection string, API key or certificate, the answer involves Key Vault. When it mentions many services sharing settings, turning features on gradually, or changing configuration without redeployment, the answer involves App Configuration.

Scenario questions

Configuration or secret?

Exam skills 4.1.1 · 4.1.2

Choose the service each requirement points to.

Log in to try this activity Interactive activities are free with an account.
Worked example

Choosing between similar options

A document-processing system receives 200,000 uploaded files a day in Blob Storage. Each file must be parsed, embedded and stored, and parsing occasionally fails on corrupt files. The team wants processing to continue at a steady rate even during upload bursts, failed files to be kept for investigation, and no polling.

The requirements combine an event (a file arrived) with queued work (process it at a steady pace, with retries and a place for failures). The best design is an Event Grid system topic subscription on the storage account, filtered to BlobCreated events, that delivers to a Service Bus queue. A worker in Container Apps scales with a KEDA azure-servicebus rule, and files that keep failing move to the queue's dead-letter queue after the maximum delivery count.

Event Grid delivering straight to the worker would push bursts at the worker's pace limit and offers dead-lettering only to a blob container. A timer that lists new blobs is polling. Service Bus alone has no way to learn about new blobs without an event source.

Check yourself

A sender announces that a document was uploaded and does not care who reacts. Service Bus or Event Grid?

Show answer

Event Grid, which routes notifications that something happened. Service Bus is for work items that a consumer must process.

Exam Tips

Remember for the exam

  • Container Apps for microservices and KEDA workers; AKS for full Kubernetes control.
  • Cosmos DB for documents with vectors, PostgreSQL for relational data with vectors, Redis for caching.
  • Service Bus for work to be done; Event Grid for news that something happened.
  • Secrets in Key Vault; shared settings and feature flags in App Configuration.