Serverless is a lie
... or is it?

Photo by Adi Goldstein on Unsplash
You may have heard of “serverless computing” as an aspect of cloud computing. The name “serverless” is never true. Everything you run in the cloud has to run on some kind of server. Your cloud service provider uses abstractions to make things easier for their customers. But no matter the abstractions, there’s always a computer down there somewhere.
Serverless refers not to the underlying technology, but to the user’s experience. It takes the cloud abstraction to a finer-grained level. In the conventional cloud scenario, you rent an entire server in the cloud for some time. Even if that time is short, you have access to a whole computer for as long as you pay for it.
In the serverless scenario, you don’t rent a complete computer. Instead, you run your own program or function. Depending on how hard the function has to work (memory, CPU, time), you pay more or less according to the billing rules. This kind of capability is great for intermittent or unpredictable computing loads.
To do the same thing in a server-based scenario would take a lot more effort on your side. One way would be to keep the server running idle, waiting around for those times when you want to run your function. The other alternative would be to to set up a new cloud server every time you wanted to run a single function. Then, to save money you could turn it off when you weren’t using it. That approach might work for an hour a day, but it is way too much effort for a single function call.
Is serverless a lie? In a way it is, but it’s a very useful lie. Since the user doesn’t have to care about where his code runs, the server is irrelevant and invisible. Even though it’s always out there somewhere, you don’t have to think about it at all.

Photo by Christopher Burns on Unsplash
Originally published on Substack.