Courseiva

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

A company uses Azure API Management to expose APIs. They need to enforce rate limiting per subscription key and also allow a burst of requests for a short period. Which policy should they apply?

⚠ Common exam trap

It's easy for candidates to confuse `rate-limit-by-key` with `rate-limit (per product)`, assuming product-level limits automatically apply per subscription, but product limits aggregate all subscriptions under that product, not per individual key.

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

rate-limit-by-key

The `rate-limit-by-key` policy is correct because it allows rate limiting based on a specified key, such as a subscription key, and supports a burst configuration via the `renewal-period` and `retry-after` attributes. This policy enforces a per-key counter that resets after a defined period, enabling a burst of requests (e.g., 10 requests in 60 seconds) while still enforcing an overall limit.

Answer analysis

Option-by-option breakdown

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

  • limit-concurrency

    Why it's wrong here

    The `limit-concurrency` policy in Azure API Management is designed to restrict the number of simultaneous requests a client can make to an API. Its primary purpose is to prevent resource exhaustion on the backend by limiting parallel connections, rather than controlling the total volume of requests over a period. Since the requirement is to manage the rate of requests over time, not just concurrent connections, this policy is not suitable for implementing a per-subscription key rate limit.

  • rate-limit (per product)

    Why it's wrong here

    The `rate-limit` policy, when applied at the product level, enforces a collective request quota across all subscriptions associated with that specific product. This means all consumers using different subscription keys for the same product share a single, aggregated rate limit. It does not provide individual rate limiting per unique subscription key, making it inappropriate for scenarios where each distinct API consumer needs their own independent request allowance.

  • rate-limit-by-key

    Why this is correct

    The `rate-limit-by-key` policy is the correct choice as it specifically enforces request limits on a per-subscription-key basis, ensuring each individual API consumer is independently governed. This policy allows precise control over the number of API calls permitted within a defined time window for a unique subscriber, identified by their distinct subscription key. Its support for burst limits further enhances flexibility by allowing temporary spikes in traffic while maintaining overall rate adherence.

  • rate-limit-by-ip

    Why it's wrong here

    The `rate-limit-by-ip` policy enforces request limits based on the client's source IP address. While effective for mitigating abuse from specific network origins or preventing denial-of-service attacks, it does not differentiate between multiple legitimate users who might be sharing the same public IP address (e.g., behind a corporate proxy or NAT). Since the objective is to limit consumption per unique subscription key, not per network origin, this policy fails to provide the required user-specific granularity.

About these practice questions

This AZ-204 question is part of Courseiva's 881-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam 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.