Courseiva

AZ-204 Practice Question: Connect to and consume Azure services and third-party services

You are developing a web application that relies on a third-party weather API. The API has a rate limit of 10 requests per second per API key. You need to ensure your application never exceeds this limit and also caches responses for 10 minutes to reduce call frequency. Which combination of Azure services should you implement?

⚠ Common exam trap

The trap here is that candidates often overcomplicate the solution by choosing a combination of services (e.g., Functions + Redis) when Azure API Management's single, purpose-built policy set directly solves both rate limiting and caching without custom code.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Azure API Management with rate-limit and caching policies.

Azure API Management (APIM) provides built-in rate-limit and caching policies that directly address the requirements: the `rate-limit` policy enforces a per-key request quota (e.g., 10 calls/second), and the `cache-store`/`cache-lookup` policies cache responses for a configurable duration (e.g., 10 minutes). This eliminates the need for custom throttling logic or external caching services, making it the most straightforward and maintainable solution.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Azure Functions with Durable Functions to throttle calls and a static in-memory cache.

    Why it's wrong here

    While Azure Functions can execute custom logic, implementing robust, distributed rate limiting with Durable Functions would involve significant custom orchestration code to track call counts and manage state across multiple instances. A static in-memory cache is not distributed, meaning each function instance would maintain its own cache, leading to cache inconsistencies and poor hit rates in a scaled-out environment. This approach lacks the built-in resilience and scalability of a purpose-built API gateway.

  • Azure Logic Apps with a retry policy and a cache using Azure Redis Cache.

    Why it's wrong here

    Azure Logic Apps excel at workflow orchestration and can implement retry policies for transient failures, but they lack native, declarative rate-limiting policies for outbound calls to third-party APIs. While Azure Redis Cache could be integrated for caching, implementing a robust rate limiter would require complex custom logic within the workflow, potentially involving state management and conditional branching, which is not its primary design purpose and adds significant operational overhead.

  • Azure API Management with rate-limit and caching policies.

    Why this is correct

    Azure API Management is specifically designed to act as a facade for APIs, offering robust, declarative policies for both rate limiting and caching. Its `rate-limit-by-key` or `rate-limit` policies can effectively throttle calls to the third-party API, preventing exceeding quotas, while its response caching policies significantly reduce latency and load by serving cached responses directly, improving overall application performance and resilience.

  • Azure Traffic Manager to distribute requests and Azure Front Door for caching.

    Why it's wrong here

    Azure Traffic Manager provides DNS-based global load balancing for distributing user traffic to different service endpoints based on various routing methods, but it does not offer any API-level rate limiting capabilities. Azure Front Door, while providing global routing, WAF, and caching at the edge, primarily caches static content and lacks the fine-grained, API-specific rate-limiting policies required to protect a third-party API from excessive calls based on keys or subscriptions.

About these practice questions

Courseiva writes every AZ-204 question from scratch — 881 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This AZ-204 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the AZ-204 exam.