Overview Of Serverless Computing


In this technological era, humans often think in terms of technology only. Knowingly or unknowingly, almost everyone uses the word technology. People who know about technology especially have knowledge of websites, applications, mobile apps. However, they may not know the efforts, infrastructure, and skills behind it. Despite developers having this knowledge, there are still many technical terms that are confusing for developers, especially for beginners.
Today, we are going to discuss such a topic which is a bit confusing yet simple at the same time.

What is Serverless Computing?

Serverless Computing
Serverless computing is the Cloud computing execution model where the cloud provider manages the server dynamically, i.e., allocation and provisioning of the servers. So this way the application owner doesn't need to worry about the load, space, and memory of the servers. If the server needs more memory, space at any moment of time of application life, the provider increases or decreases the necessary infrastructure for the application.
When we say the application is built on serverless architecture, it actually runs in stateless containers such as Kubernetes, which are event-triggered and fully managed by the cloud provider.
A decade ago, infrastructure cost was very high, as we used dedicated physical servers to host the application and storage. However. the Cloud gives us the ability to pay as we use it. However, again in this model, we need to purchase the server or compute capacity. In serverless, pricing is based on the number of execution rather than pre-purchased compute capacity.
As per Wiki – “Serverless computing is a cloud computing execution model in which the cloud provider runs the server, and dynamically manages the allocation of machine resources. Pricing is based on the actual amount of resources consumed by an application, rather than on pre-purchased units of capacity.”
As per Hackernoon.com – “Serverless applications are event-driven cloud-based systems where application developments rely solely on a combination of third-party services, client-side logic and cloud-hosted remote procedure calls (Functions as a Service).”
When we say serverless, there are 5 key characteristics, as shown below:
  • No Server Management – no need to maintain a server, and no software installation, maintenance, and administration
  • Event-driven scaling – We need not worry about the scaling of our solution if demand increases, our solution will scale based on the events or incoming actions.
  • High Availability – Serverless applications must have inbuilt fault tolerance and availability. We need not worry about it while deciding the architecture of the application.
  • No idle capacity – We need not pay for any idle time, if the application is not in a running state, there is no billing.
  • Micro Billing – Billing will be done on an execution basis. Basically, it gets calculates on time for request execution and memory consumption. For example, if our application needs 50MB of RAM and 5 seconds to complete the execution of a request, then we need to pay for that much of the resources only.

What is the difference between PaaS and Serverless?

This question is obvious for a developer who is working on building applications because Serverless evolved from PaaS only. As mentioned above, when we say the technology is purely serverless, it must satisfy these 5 characteristics. 2 characteristics fail in the case of PaaS: “No idle capacity” and “Micro Billing”. If we take the example of Cosmos DB or Dynamo DB, we can provide these services and need to pay the base cost for it. We can utilize the feature of auto-scaling whenever the consumption of the application increases. However, we need to do it manually or set an automated task on the server instance, but the Platform will not take care of it itself.
Let’s see the Advantages and Disadvantages of Serverless Computing:
  • No server management is necessary
  • Reducing cost: you only get charged for the server space that you use
  • Serverless architecture is scalable inherently
  • Quick deployments and updates are possible
  • Decreasing Latency, code can run closer to the end-user
  • Debugging and Testing become more challenging
  • New security concerns introduced due to Serverless Computing
  • For long-running processes, Serverless architectures can be costly
  • Performance may be affected
  • Vendor lock-in is a risk

Who should use Serverless architecture?

Developers who want to build a lightweight and flexible application that can get expanded whenever needed can get more benefits with serverless computing. Whoever wants to build an application with the cost paid per use is also a good fit for Serverless computing/architecture

When should developers avoid using a serverless architecture?

A large application that is used constantly all the time and has a predictable approximate workload may require dedicated servers (traditional setup). In such a case, a traditional setup is cheaper than serverless architecture. In these types of applications, developers should avoid serverless technology.
In my next article, we are going to continue diving into serverless architecture, i.e. Function-as-a-Service (FaaS)
--Happy Coding--

Logiciel Softtech Pvt. Ltd.
We help you transform your business ideas with custom products, migrate from legacy applications.