What is Serverless Computing?

Thisuri Bandaranayake
Analytics Vidhya
Published in
4 min readJun 10, 2020

A Beginners Guide

Photo by Marko Blažević on Unsplash

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.

3-Tier Architecture

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

  1. No infrastructure management: No need to manage any servers, operating systems, software or hardware. Just focus on the application logic.
  2. 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.
  3. No idle capacity: You have to pay only for what you use. No need to pay for unused capacities, this also promotes cost efficiency.
  4. 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.
  5. 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

  1. Web/mobile applications and backends.
  2. Data processing
  3. Continuous Integration and Continuous Deployment (CI and CD)
  4. Multi-language applications
  5. Processing events and Saas
  6. Event Streaming
  7. Image and video manipulation

Serverless vendors

  1. AWS Lambda
  2. Microsoft Azure
  3. Google Cloud Platform
  4. IBM cloud functions
  5. Knaitive
  6. Oracle
Some of the Serverless Vendors

Drawbacks of Serverless Computing

  1. 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.
  2. Difficulty in debugging: Without adding an additional tool (Third-party tools that log serverless functions), debugging a serverless function is troublesome and time-consuming.
  3. 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.
  4. 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!!!!

--

--