Daniel Broadhurst

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.

Reviewing a whole workflow? Map it hop by hop →

1 · The work
2 · What matters most
3 · Traffic

Use…

Queue (SQS)

with 512 MB per function

Why
The catch
    Fig. 1 · End-to-end latency, five-function chain · hatched: time between functions
    Fig. 2 · Cost per million requests
    Fig. 3 · Memory: speed against cost, one function

    The decision framework

    The rules the tool applies, straight from the research.

    When you wantUseWhyThe catch
    Lowest latencyDirect invocation512 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 costDirect invocationThe lowest cost per million requests measured ($1.76), balancing speed against memory.Brittle failure mode and poor maintainability.
    Resilience and controlQueue (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 stateStep FunctionsThe 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.