Last week was ServerlessConf London and it was a little bit of awesome.
Basically, it was the chat between a small number of people that happened over a couple of days. We simply talked about everything to do with cloud and how to manage/develop etc for it, which (of course) included Serverless.
Out of these conversations, I had a bit of a realisation.
I was at a “Super advanced cloud” conference.
“Super advanced cloud”
Simply put, Serverless (in my view) is a way to avoid having to build and maintain everything yourself and allow lots of clever people (who are probably better than you could ever be at what they do) to run really useful services that you make use of.
And Cloud providers are very good at this.
In fact, Cloud providers were the first to understand this.
They gave us the “instance” instead of the server.
And all the instance is, is a virtualised server that can be provisioned by code.
It was the start of widespread configuration as code.
It is. But the Cloud providers went further.
They started to provide other services.
And email sending
And load balancers
And the ability to provision these things via code
And everything cool like that
But at the heart of everything was the instance.
The Instance Problem
The problem with all this, was the instance itself and the coding patterns that went with it.
Because the instance is the bit we have to build
And it still contained all of our code
Because we still treated it like a server
And while PaaS came along, we still treated that like a server too.
And don’t get me started on containers, because we still treated those like a server as well.
Because no new patterns really emerged to make use of this.
We still built monoliths that would work on a physical machine in a data centre if needed
We hadn’t really created decent new patterns since the creation of the networked server.
FaaS and Serverless
Then along came AWS Lambda and FaaS (Function as a Service).
Now, I’m not going to say it was the first, or it was new, or anything like that.
But it did one thing.
And the first time I saw it, I knew it was different.
Because new patterns
It forced something upon you in two ways
- First — you only had one entry point and that meant it should really only do one thing (instead of everything)
- Second — you paid per 100ms of execution, which meant that you should optimise it
And it’s amazing how much these things change your approach to coding.
You cease to have the availability of a server. It sounds like it’s not useful, but the value is simple. No processing = no payment and also high scalability at the function level.
When your server/instance is doing nothing, you still pay, so it feels like it’s more like an infinite resource available when you need it, whereas a Lambda function feels like a finite and scarce resource.
Now, this new approach became what we know as “Serverless”.
But the approach of Serverless relies on FaaS to create it and configuration and code became overlapped.
Also, because you choose not to run “servers” (instances) to do everything, you start to rely more on the services, such as data storage, file storage, routing and other extra around it.
You basically use cloud services.
A lot more.
Because you don’t have a server.
(I mean, you can have one, but in the FaaS scenario you don’t, except you do sort of)
Super advanced cloud
Which brings me back to my first point.
Serverless fits the paradigm of Super advanced cloud.
Most people that I see using public cloud services still think that the instance is what makes it cloud.
The instance isn’t what makes it cloud.
What makes it cloud, is the minimisation of servers.
Allowing best of breed services and practices to be run for you and used by you.
You know, you sort of become…
It’s not hard.