You probably got the idea of server-less just from this image. Even without diving into details, it is obvious that Serverless applications are more scalable and cost effective.
I already hear your minds “If it’s more scalable and effective, why we are still using traditional servers and applications?”. The answer is little bit tricky, because It Depends! * Most of the companies still fighting to move to micro-services, so Serverless is not serious for them Yet! * Serverless applications mainly cost effective if you will build it from ground up (or separate part of it) with Event Driven principle (see cases below) * Not all programming languages are flexible enough to support scalable Serverless functions. * Obviously developers and companies need more case studies to be educated more about this new principle
We are going to break down this points and get more insight on when it is right to choose Serverless principle, even for a small part of your application.
“Serverless” doesn’t mean there is no servers, it’s just a term that you basically don’t know who is running your code, and you don’t have any control over executional environment. You are just giving a code/function, and receiving back result. This concept of making applications widely started to grow after AWS released their Amazon Lambda service, which they are promoting as an event receiver only, and not a main executional part of application. BUT it could be the main logic of your application.
AWS Lambda base structure
Let’s say you have a function which is getting an image from S3 bucket and resizing it. First of all it’s a CPU intensive operation and it scalability depends on servers count. AWS Lambda in other hand saying “don’t care about scalability at all! Just pay by execution time”, If you application is optimal you will pay less money! For the past 3–4 years, I saw a lot of companies who switched to AWS Lambda, started to write more optimized code, and invest in code cleanup. Thats really good idea!
So as you can image now, Serverless is actually small Containers which has predefined function structure to control execution time, memory and limit program if it goes beyond rules, and because it’s built with purely micro-service principle, it’s easy to scale, or move to another server. Every container itself is atomic and don’t have significant relations with another, because it’s just don’t care about your code logic, which is the most important part.
Less logic in single points, more scalable system becomes
Imagine you are writing code and you are going to pay real money for every non-optimized functionality. That is giving enormous push to write clean code, and at the end make more reliable, less buggy code. That all then turns into economic aspect. Companies starting to invest less on code refactoring, and guess what?, if you have a clean code, you can scale it more easily with less developers in most cases.
Besides all benefits coming from clean code. You are actually in most cases paying less than with dedicated servers, if you consider fact of scalability and when you have less load you pay less. The only downside that’s now always popping up, is that you don’t have any control over the environment where your code is executing, BUT that’s would be fine over time, because we started to trust Public Clouds anyway.
At TreeScale we had dedicated servers at the beginning, because we are a team of hardcore engineers :) But over time we saw that our technology fits extremely well into server-less ideology, and having already Event Driven principle was just ideal to start new TreeScale Serverless enterprise product, which is basically full replacement of AWS Lambda but on your own servers, where you have control, or if you need multi-cloud implementation. Public version is still in progress, but after few months of testing with our clients, we are exited to see what you are going to build with it!
I’m sure that the future of cloud computing moving in Serverless direction, even if you consider Blockchain Smart Contracts, that’s also Serverless execution principle!
Thanks for reading this article, and thanks for 👏!