When Serverless Isn't the Right Fit
Part of the Cloud Computing Roadmap
In short
Serverless is a great default for many things, but not everything. Knowing when to say "this needs a container or a VM" is what interviewers listen for.
Long-running processes, workloads needing consistent low latency, or applications requiring fine-grained infrastructure control are usually better served by VMs or containers than serverless functions.

Think of it like this
Cab every day, or a scooter?
Booking a cab for a weekend trip makes sense. Booking one for your daily 9-to-6 commute, every single day, adds up to a scary monthly total. At some point, buying a scooter is the smarter deal.
Watch it happen
Pick by workload shape
Serverless fits
- Spiky or unpredictable traffic
- Short jobs, seconds to minutes
- Event glue between services
Containers or VMs fit
- Steady high load all day
- Jobs longer than 15 minutes
- WebSockets, GPUs, custom OS needs
Match the tool to the workload. Many real systems mix both: containers for the core, functions for the edges.
The big ideas
What you need to know
Time limits
Lambda stops at 15 minutes. Long video encoding or ML training belongs on containers, Batch or VMs.
Steady load costs
At high, constant traffic, per-request pricing can overtake a right-sized always-on server. Do the maths.
Latency-critical paths
If every millisecond matters, cold starts and network hops to managed services can hurt.
Lock-in and control
Triggers and event formats are provider-specific. Some teams need more portability or OS-level control.
Save yourself the pain
Common mistakes
Oops
Splitting a long job into chained functions just to dodge the 15-minute limit.
Do this instead
If you're fighting the limit, it's the wrong tool. Use a container task, Step Functions or Batch.
Oops
Choosing serverless because it's trendy, without checking traffic shape.
Do this instead
Look at expected requests per second over a day. Flat and high often favours containers.
Your mission
Back-of-envelope cost check
Quick check
Which job is the worst fit for a FaaS function?
Go deeper
- 1List 3 workload types that would fit poorly into a serverless function's execution model.
- 2Learn why a long-running WebSocket connection typically doesn't fit a standard FaaS model well.
- 3Practice matching workloads to serverless versus container/VM compute honestly, not defaulting to hype.
More topics at this stop
Stuck on this topic? Ask an Insider
Get 1:1 guidance from people who've walked this exact path — on the InsideEdge app.