ToolFrom 160 benchmark runs on AWS Lambda
Which serverless orchestration should you use?
Tell it what you're building and it answers from my MSc research: direct invocation, SQS, EventBridge or Step Functions, what memory to give the functions, and what you pay for the choice.
Use…
Queue (SQS)
with 512 MB per function
- Why
- The catch
The decision framework
The rules the tool applies, straight from the research.
| When you want | Use | Why | The catch |
|---|---|---|---|
| Lowest latency | Direct invocation | 512 MB is the efficiency inflection point: 44% lower latency than the 128 MB baseline. | Tightly coupled, with no backpressure: one failure stops the chain and nothing buffers a spike. |
| Lowest cost | Direct invocation | The lowest cost per million requests measured ($1.76), balancing speed against memory. | Brittle failure mode and poor maintainability. |
| Resilience and control | Queue (SQS) | Under load its latency converges to within 0.6% of direct invocation, and it adds backpressure. | Needs warm polling infrastructure; a cold queue lags at first. |
| Many consumers (fan-out) | Event-driven (EventBridge) | Only worth its ~1.5 s routing tax when one event has several consumers. | An anti-pattern for linear one-to-one chains: volatile and up to 2.8x the cost. |
| Auditing and complex state | Step Functions | The best observability: visual execution logs make debugging trivial. | The observability tax: highest total cost from per-transition fees, and a ~1.5 s latency floor. |
How it was measured
Four strategies, each chaining five Node.js Lambda functions, built with AWS SAM and driven with a fixed number of requests per run so strategies compare fairly. CPU-bound work was a Fibonacci busy loop; I/O-bound work simulated an external API call. Memory ran from 128 MB to 3,008 MB and concurrency from 1 to 50, with and without Provisioned Concurrency: 160 run summaries in all.
Where it stops
AWS only: EventBridge and Step Functions overheads are vendor details that may not carry over to Azure or Google Cloud. Concurrency tops out at 50, and the numbers assume warm infrastructure; sporadic traffic can leave queues and buses cold.
From my dissertation, Performance and Cost-Optimisation of Serverless Architectures(MSc Computing, The Open University). About me.