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 7-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”
You have deployed an API on Lambda. Most requests take 50ms. Beautiful. Then a user hits the API after a quiet period and waits 2.5 seconds. They refresh. 50ms again. What happened?
A cold start. The execution environment from the previous request was recycled after sitting idle. When the new request arrived, Lambda had to create a fresh environment from scratch: allocate a container, download your deployment package, initialize the runtime (Node.js, Python, Java, etc.), run your global initialization code (database connections, SDK setup), and then finally execute your handler.
Cold starts are the most-discussed trade-off in serverless computing. They are not a bug. They are a consequence of the scale-to-zero model. If you do not pay for idle capacity, there is nothing sitting warm when a request arrives after a quiet period. Something has to spin up.
The severity varies wildly. A minimal Node.js function might cold start in 200ms. A Java Spring Boot function with a large dependency tree can cold start in 5-10 seconds. Understanding what drives cold start duration is the key to building serverless applications that feel responsive.
A cold start is not a single event. It is a sequence of phases, each adding :