What is Serverless?
No servers at all? No It’s mean that servers are not yours and not managed by you.
History
To answer what is serverless first you have to know how this comes into picture. Journey from monolithic application to microservices to serverless is discussed in this section.
What is a monolithic application?
Monolithic application are the ones which have a tightly couple architecture. In other words the application have basically three parts which are UI, application layer and database layer.
Most of monolithic applications use three tire architecture. Then problems arise. If something happen to any of layers then whole application collapses. Let’s take application layer for clarification purposes. Application layer consists of different services as follows.
Then lots of drawbacks comes such as
- Less reusability
- Larger code base then hard to maintain and understand
- More deploy time
- Hard to scale the application
- Have to redeploy the whole application even minor upgrade is done
- Have to increase instances even one service is called heavily to balance the load which leads to increase the cost
- And there are many
Then what architectures do is they remove the boarder of the application layer and create a new terminology Microservices.
Convert monolithic applications to microservices
Microservices are simply independent pieces of monolithic application. They are loosely coupled and independent services connect to-gather to execute operations and retrieve values.
Then there are lots of benefits are come from this microservices such as,
- Easy to build and manage
- Reusability built in
- Less deploy time as the small parts are deployed
- Easy to scale (matter of connecting another microservice)
- Only increase the number of instances of highly required microservices then the cost decreases
Then we got a perfect solution. NO! there are some drawbacks
There are several drawbacks such as,
- To complex to manage since there are more microservices to manage
- Harder to monitor
- High devOps overhead
Then as you see you can view a common problem there which is harder to manage the platform. To solve those problems serverless architecture appears.
Then server is the main problem here. Let’s remove the server and create serverless applications.
Yeah History is finished let’s talk about Serverless.
Serverless Architecture.
Some says it is some ones’ servers and some says it is a billing mechanism.
Serverless is someone else is take care of your application and manage, monitor, scale etc instead of you. That’s the simple definition. Let’s dive into more facts.
In serverless architecture all the components are called as functions. They are run in someone else’s cloud and they are charged on usage. There service providers scale your application and monitor them instead of you.
Sounds Greek ? Let’s take an example
In serverless all the functions are in someone else’s server and when it is needed to execute it will run and die after completion.
In serverless,
- All the functions are maintain and manage by service provider
- Charge on the usage of functions then cost reduced
- DevOps overhead decreases
Then it is we are running our business login in someone else’s machine which managed by them with specific billing mechanism
If you have found this helpful please hit that 👏 and share it on social media :)