14. Cloud and infrastructureServerless
Serverless
Serverless is a way of running code where you hand the cloud provider a function and it runs it whenever a request or event arrives, without you managing any servers. You pay per request and per millisecond of running time, and the provider scales from zero copies to thousands on its own. The servers still exist, you just never see them. The main catch is the cold start: if no copy of your function is warm, the provider has to set up a fresh environment and load your code first, which can add anywhere from tens of milliseconds to several seconds. It suits bursty or occasional work well and steady, latency-sensitive traffic less well.
In this lesson: A cold-start latency graph.