We use analytics cookies.We use cookies to analyze site traffic and improve your experience.
Loading...
System Design Masterclass · Cloud Infrastructure
Free preview: the first 2 parts of this 6-part lesson.
Already bought the course? Sign in to read the whole lesson.
this lesson is part of
System Design Masterclass
Unlock this lesson and the 751 other paid lessons
$25 once, by PayPal
See the System Design courseread the rest of this lesson in
System Design Masterclass
Unlock this lesson and the 751 other paid lessons
$25 once, by PayPal
See the System Design coursein Cloud Infrastructure
This lesson is part of the full System Design Masterclass. Unlock it along with 769 other lessons for a one-time payment.
One-time payment by card or PayPal
Get Lifetime AccessOne-time payment: UPI, card or netbanking
Get Lifetime Access18 Foundation lessons are free, no payment needed. Try them now
It is easy and good
“It is really nice and good Please join the course”
Cold starts are acceptable for background jobs. Nobody notices if a queue processor takes an extra 2 seconds to start. But for user-facing APIs? A 2-second delay on login is unacceptable. A 3-second delay on checkout loses revenue.
Warm instances solve this by keeping execution environments pre-initialized and ready. When a request arrives, it hits an already-running environment, no initialization delay. The response is fast, consistent, and predictable.
The concept is not unique to serverless. Traditional auto-scaling groups can maintain minimum instance counts. can keep minimum replica counts. The principle is identical: trade idle compute cost for guaranteed readiness.
AWS published a case study showing that a fintech company reduced their P99 Lambda from 4,200ms to 85ms by enabling Provisioned Concurrency on their payment processing functions. That is a 98% reduction. The idle cost was $180/month. The lost revenue from 4-second checkout delays was several thousand per month.
| Platform | Warm Instance Mechanism | How to Configure |
|---|---|---|
| AWS Lambda | Provisioned Concurrency | Set minimum warm instances per function |
| Google Cloud Run | min-instances | --min-instances=1 |
| Azure Functions | Pre-warmed instances (Premium plan) | Always Ready Instances setting |
| minReplicas (HPA) | minReplicas: 2 in HorizontalPodAutoscaler | |
| EC2 Auto Scaling | min capacity | MinSize: 2 in ASG |
The economics:
Suppose your Lambda function serves 1,000 requests during business hours and 5 requests overnight. Without warm instances, you pay nothing overnight but cold start those 5 late-night requests. With 1 provisioned concurrent instance, you pay ~$15/month to keep it warm 24/7, but those 5 requests respond instantly.
When warm instances make sense:
When they do not make sense: