Technical
When Serverless Stops Making Sense: The Threshold I Now Watch
I have argued for serverless all year. I have also watched clients outgrow it. Being an advocate does not mean being blind. There is a threshold beyond which serverless is the wrong shape, and that threshold is not hypothetical.
The Threshold I Use
If your Lambda has more than 50 percent duty cycle, serverless is probably the wrong answer. A Lambda running 15 of every 30 seconds across a day is paying for idle time without the operational benefits of idle billing.
The threshold is workload-specific, but 50 percent duty cycle is the rule of thumb I apply before digging deeper.
The Cost Math
Lambda at 1 GB runs 0.0000166667 USD per 100 ms. A t4g.small EC2 costs 0.0168 USD per hour, which is 0.0000046 per 100 ms if fully utilized. At 50 percent duty cycle Lambda becomes roughly twice the cost of a small EC2 for the same work.
Below 50 percent duty cycle serverless wins. Above 50 percent the box wins. It is not magic. It is a graph.
The Other Threshold: Cold Starts
If your p99 latency budget is under 500 ms and your traffic is spiky, Lambda cold starts will hurt. Provisioned concurrency is a band-aid. For tight-latency workloads with spiky traffic, containers on ECS or a small always-on VM is calmer.
The Workloads I Moved Off Serverless
A document generation pipeline that ran 20 minutes per job, many times per day. Lambdas 15-minute limit was the forcing function. I moved it to a small EC2 running a simple queue worker.
A WebSocket server with long-lived connections. API Gateway WebSocket support exists but is expensive at connection volume. A t4g.small handling 500 sockets was an order of magnitude cheaper.
The Workloads That Stayed
HTTP APIs with spiky traffic. Scheduled jobs that run a few times a day. Event-driven file processing. Webhooks. Anything that lives under 50 percent duty cycle and under 15 minutes per run.
The Mistake Serverless Purists Make
Insisting serverless is always cheaper. It is not. Insisting operational simplicity outweighs cost. Sometimes, but not always. The honest position is workload-dependent and budget-dependent.
Reading
Corey Quinns AWS cost blog is a year-round education in this stuff.
RELATED READING
The Consulting Shift I Am Making In Year Two
After a year of writing and building, my consulting practice is changing shape. Shorter engagements. Sharper outcomes.
ReadThe Frontend Shift: Shipping Less JavaScript In Year Two
A year ago I reached for Next.js for everything. This year I often reach for nothing.
ReadThe Serverless Lesson I Would Write On A Sticky Note
After a year of shipping serverless projects, one rule explains most of the wins and all of the losses.
Read