What is Serverless Computing?
A Beginners Guide
How Serverless computing emerged?
In the early stages when developing a web application, the developers had to use their own physical hardware to run a server. This was very troublesome and cost a lot. Also, only the people with that requirement could develop a web application. But then a new technology named Cloud computing was introduced. This made the servers portable without bounding to physical hardware. Here the developers could rent servers remotely as per their requirement. Normally the developers and the companies over-purchased the units of servers in order to ensure that the system may not fail in cases of traffics and to make sure that the exceeded activities to not to break the system. Due to that some of the rented server space that is already paid went to waste. As a solution, the cloud vendors introduced the serverless computing where the developers can purchase the server services as used basis. Simply, you have to pay only for what you use.
Serverless computing Vs Traditional Computing
What is Traditional Computing?
Traditional Computing normally follows a 3-Tier Architectures.
Here before implementing the application we have to build up the environment or the infrastructure by creating or setting up our servers, installing the necessary operating systems and necessary software. And also throughout the lifetime of the application, we have to manage software and hardware while taking care of their upgrades. Also, we have to make sure that the application is highly available, scalable and fault-tolerant. These all add a lot of additional costs in managing the application. Well, managing all those resources rather than developing the application is really cumbersome and costly. You have to pay high costs to the servers even if you do not use the full created capacity. If you create a server of 100GB and use only 80GB of it you still have to pay for all the 100GB either you use it or not. What a waste……
Well, Serverless Computing is a solution to all those cumbersome.
What is Serverless computing?
“Build and run applications without thinking about servers. ”
Serverless computing free up the developers from managing the infrastructures(servers, operating systems, software or hardware). This means the developers do not need to worry about the low-level details of server management. The service vendors automatically manage and scales the infrastructure required to run the code for you.
“Pay for what you use”
Therefore the developers can use the services and pay only for what they use.
Though we feel the name Serverless means “No servers ”, servers are still running the code. The name Serverless only implies that the tasks associated with the management of the infrastructure are not visible to the developers. With this concept, the developers can spend their valuable time in focusing more on the business logic and delivering more valuable products rather than spending time on managing the infrastructure.
Advantages Of Serverless Computing
- No infrastructure management: No need to manage any servers, operating systems, software or hardware. Just focus on the application logic.
- Dynamic Scalability: Serverless applications can be automatically scaled or maybe you can choose the desired capacity with a few clicks. No need to create any specialized scalable architecture.
- No idle capacity: You have to pay only for what you use. No need to pay for unused capacities, this also promotes cost efficiency.
- High availability and fault tolerance: Serverless computer applications are by default high available and fault-tolerant. Therefore you no longer need to worry about them instead, the vendors will take care of it.
- Faster Time to market: As the developer is free from managing the infrastructures they can focus more on application development and deliver the products in lesser time.
High availability -The ability of a system or system component to be continuously operational for a desirably long length of time
Fault Tolerance -The ability of a computer application to continue its normal operation despite the presence of system or hardware faults
Use cases of serverless
- Web/mobile applications and backends.
- Data processing
- Continuous Integration and Continuous Deployment (CI and CD)
- Multi-language applications
- Processing events and Saas
- Event Streaming
- Image and video manipulation
Serverless vendors
- AWS Lambda
- Microsoft Azure
- Google Cloud Platform
- IBM cloud functions
- Knaitive
- Oracle
Drawbacks of Serverless Computing
- Security issues: Due to the usage of the third-party APIs the security becomes an issue. The serverless functions are used by a lot of customers which opens up many security issues such as DDoS attacks, insecure third-party dependencies, function event data injection etc.
- Difficulty in debugging: Without adding an additional tool (Third-party tools that log serverless functions), debugging a serverless function is troublesome and time-consuming.
- Vendor Lock-in: Migrating from one serverless platform to another is very difficult. An API in one platform may not be available in another platform. In a case of migration, the code might need to be rewritten.
- Implementation drawbacks: Testing in serverless applications is tough and cumbersome. Problems related to deployment, versioning and packaging also may exist
This is just a beginners guide for serverless computing. Hope this will give you a general idea about serverless computing and there are a lot more to learn.
Cheers and Good Luck!!!!