Async pipeline
API Gateway → Lambda → SQS → workers → DynamoDB. A traffic spike hits at 20 s.
What this architecture teaches
Asynchronous pipelines decouple accepting work from doing it. The API only has to put a message on a queue; workers process it at their own pace.
When the spike arrives, Lambda needs new instances — the first requests pay cold-start latency, and once concurrency (arrival rate × duration) passes the limit, invocations are throttled.
SQS absorbs everything that gets through, so producers stay fast, but the backlog grows and the oldest message ages while the workers catch up. Alert on message age, not just depth.
What to look for
- Lambda cold-starts as concurrency rises
- The concurrency limit throttles the spike
- SQS absorbs the burst; the backlog ages while workers catch up
Components
iOS users — iOS app (Traffic source)
API Gateway — Amazon API Gateway (API gateway)
ingest — AWS Lambda (Serverless function)
jobs — Amazon SQS (Queue)
- workers — Worker (Worker)
DynamoDB — Amazon DynamoDB (Key-value DB)