ladderlore
Request a guide
  • Type a service name, like S3 or IAM.

Concept

Throttling strategies

Limit request rates so spikes and bad clients do not overload or overspend a backend.

Where each layer can limit load.

Where each layer can limit load.

  • API Gateway usage plan

    Limits
    Rate, burst, quota per key
    Use for
    Paid tiers
  • WAF rate rule

    Limits
    Requests per IP
    Use for
    Abuse and floods
  • SQS queue

    Limits
    Smooths bursts
    Use for
    No request lost
  • Reserved concurrency

    Limits
    Parallel runs
    Use for
    Protect the database
Which throttle for which problem.

What it is

Throttling protects a backend and caps cost. Put it at the edge of each layer. Amazon API Gateway throttles every API by default, with account-level rate and burst limits, and returns HTTP 429 when a client goes over. Usage plans with API keys give each customer its own rate, burst and daily or monthly quota. That is how you sell service tiers.

What it is

AWS WAF rate-based rules count requests per IP address in a time window and block sources above a limit. That stops abusive clients and simple floods before they reach the API. Amazon SQS in front of workers absorbs bursts. The queue grows, workers read at a steady speed, no request is dropped, and the database sees a flat load. AWS Lambda reserved concurrency caps how many copies of a function run at once, which protects a database from too many connections. DynamoDB with provisioned capacity rejects requests over the limit, so clients must retry.

What it is

Clients should retry throttled calls with exponential backoff and jitter. They wait longer after each failure, with a random delay, so retries do not arrive together. The AWS SDKs do this by default. Pick the tool by two questions. Who is limited: each customer, each IP, or each function? Is dropping a request acceptable (throttle) or not (queue)?

Remember

  • API Gateway: default throttling, 429 errors, usage plans and API keys per customer.
  • WAF rate-based rule: block IPs that go over a request rate.
  • SQS buffers bursts, so workers run at a steady rate.
  • Lambda reserved concurrency caps a function and protects downstream databases.

Remember

  • DynamoDB over its capacity: requests are throttled. Clients should back off.
  • Clients: exponential backoff with jitter.

On the exam

  • “Different request limits for free and paid customers” points to API Gateway usage plans.
  • “Block one IP address that floods the website” points to a WAF rate-based rule.
  • “Traffic spikes overload the database and no request may be lost” points to SQS as a buffer.
  • “Limit how many Lambda copies hit the database at once” points to reserved concurrency.