โ† All AZ-204 Flashcard Decks

Case Studies & Practical Application Flashcards

7 cards from real AZ-204 practice questions. Tap to flip, then mark Knew It or Still Learning โ€” missed cards come back until you master them.

Read the first 7 Case Studies & Practical Application flashcards as text
  1. A company's Azure Function uses a Storage Queue trigger. During a traffic spike, 50,000 messages arrive and the function scales out. Developers notice duplicate message processing. What is causing this and how should it be addressed?

    Answer: Queue Storage guarantees at-least-once delivery; use idempotent logic or track processed message IDs

    Azure Storage Queues guarantee at-least-once delivery, so duplicates are expected; the correct pattern is idempotent processing rather than relying on the queue for deduplication.

  2. A developer needs to implement a background job in an Azure Web App that runs every 15 minutes. The job must co-locate with the web app and share its environment variables. What is the simplest approach?

    Answer: Add a triggered WebJob with a CRON schedule set to '0 */15 * * * *'

    WebJobs run within the same App Service plan and share the app's settings, making them the simplest co-located scheduling option without provisioning additional resources.

  3. An application writes telemetry to Application Insights. In production, the volume is very high and costs are excessive. The developer wants to reduce data volume but retain all exceptions and slow requests. Which strategy should be applied?

    Answer: Configure adaptive sampling with a rule to exclude exceptions and dependency failures from sampling

    Adaptive sampling intelligently reduces volume while allowing exclusion of critical telemetry types like exceptions, preserving diagnostic fidelity at lower cost.

  4. A developer is building an API secured by Azure AD. A client app must call the API on behalf of a signed-in user. Which OAuth 2.0 flow should be used?

    Answer: Authorization Code flow with PKCE

    Authorization Code flow with PKCE is the recommended flow for user-delegated access from a client app, providing both security and user context to the API.

  5. A retail app stores session state in Azure Cache for Redis. After a Redis failover, users are logged out. The developer wants sessions to survive failover. What should be configured?

    Answer: Enable Redis persistence (AOF or RDB) on a Premium tier cache

    Redis persistence (AOF or RDB snapshots) on the Premium tier saves data to disk so sessions survive failover events.

  6. A developer deploys a new version of an API to Azure API Management using a revision. They want 10% of live traffic to be routed to the new revision while the old one handles 90%. What APIM feature enables this?

    Answer: Use a set-backend-service policy with a random condition

    A set-backend-service policy with a random number condition can route a percentage of requests to a different backend, implementing canary-style traffic splitting within APIM.

  7. An Azure Function connects to an Azure SQL Database. Under load, the function exhausts the SQL connection pool. What is the recommended fix?

    Answer: Use a static SqlConnection instance or dependency injection to reuse a single connection across invocations

    Azure Functions can create many instances; a static or DI-managed SqlConnection reuses the connection pool across invocations rather than opening a new connection per invocation.