Home > Blogs > Will Serverless Computing Eradicate Cloud Computing?
In today's dynamically evolving and inventive technology industry if we say that we completely understand cloud computing, we could be mistaken as there some of the pioneering concepts we might not be accustomed to, one of them is Serverless. Since this concept of serverless computing is relatively new, hence it is earning much popularity in the technology industry and buzzing amongst various organizations that are eager to adopt this and it is also on the minds of every developer these days. In this post, we will explore what is Serverless computing, how it is related to the “normal” cloud computing, and how they differ from each other.
Difference between Cloud & Serverless computing
If we go by the layman’s definition of “the cloud”, it’s moderately close to that of the Serverless computing and so sometimes we are puzzled and wonder as to why there are two separate terms coined for the same thing. So what exactly is serverless? If we look for a proper definition, we will get different answers and eventually all of them are correct. It is a buzzword that has been used to a certain extent that it might mean very different things to different people working on it.
Cloud Computing is primarily some computing services such as servers, storage, databases, software, networking, analytics, intelligence, and other useful services that are delivered to us over the internet and we pay for what we use. It offers faster innovation by scaling economically as per business requirements and flexible resources that help both lowering the operating costs and running the infrastructure efficiently.
There are usually three types of cloud computing stack that we hear and use more often i.e. PaaS or Platform as a Service, IaaS or Infrastructure as a Service and SaaS or Software as a Service. But to add to our knowledge there is a fourth one and recently most prevalent and talked about as well i.e. Function as a Service (FaaS) or as it is popularly known as Serverless.
So, finally, we know that Serverless is a type of cloud architectural style and the latest incarnation of the cloud. In simple terms, Cloud computing is a superset of Serverless that is most simply defined rolling up our new resources with only incremental investment.
Defining Serverless Computing
Serverless is basically abstracting the application away from the underlying infrastructure and let it manage the operating system and scale automatically for us. We don’t have to care about the security patches, server artifacts, or anything of that sort.
Serverless, by its name, is a bit of misnomer or simply put it is rather a misleading label since it does not actually mean to run the code without servers. The name serverless is used because we or any business that owns the system does not have to worry about purchasing or provisioning any of the servers or virtual machine for our source code to run on, somewhere around the globe there are actual servers that are powering our Serverless computing.
The point that makes the serverless so innovative is that it refrains us from considering the server at all. So, altogether, it is “serverless,” though not technically or literally but that is how the term is coined. All the setup, capacity planning, configuration and server management are hidden from us because the cloud provider handles them.
This state of art serverless technology is extremely appealing and widely chosen by most of the developers today. There are many reasons from for the same and we should be aware of what makes this stand out from other cloud computing stacks.
Imagine a scenario where an organization is following the traditional IT architectural approach. For a developer, working on a new application or website there is at all times quite a bit of additional work that must be done to set up and maintain a server. This deviates the developer from the focusing on this application code and the process can be sometimes annoying, mundane, and time-consuming. Furthermore, if we make a mistake in configuring some of the configurations incorrectly, it may lead to uninvited consequences like a downtime, serious security breach and even result in inefficient utilization of resources and thus we may end paying more than we actually planned.
The property that makes the Serverless prominent and interesting is that it takes care of everything and provides us a peace of mind. All server related concerns are taken off from us and handled by the Serverless cloud architecture. We are relieved from the burden of provisioning and making sure everything is secure, updated, and optimized.
The normal cloud computing definitely assures us that we are only paying for what we use. So, today if an organization decides to use IaaS type of cloud architecture for its application it is only paying for the server resources it initially asked for form the cloud provider, but actually, it also ends up paying more for the extra memory whether or not it is used by the application at that moment. The Serverless literally delivers a bit more on that promise i.e. we pay only for the exact amount of resources it takes to perform a function.
Challenges with Serverless Computing
The developers and architects today are reaping myriad benefits with the emergence of various serverless computing services such as AWS Lambda, Azure and Google function. Since these benefits are developer-centric, they allow them to focus more on product innovation and worry less about the infrastructure and admin tasks. Some of these include improved automation, effortless scaling, and less burden to manage the backend. This makes the serverless computing a good fit for event-driven applications
Nevertheless, it is not necessary that we should always opt for serverless in every situation. There are many cases where these serverless computing benefits are not compelling or well suited and we might need to deal with some of the challenges associated with it. This doesn't mean that these are encounters are insuperable but ideally, we should be aware of them in order to utilize its true essence in the software development industry.
There is no doubt that the scaling process offered by the serverless architecture is seamless and automatic. This feature of automatic scaling for our applications is definitely great but then it brings with an entire absence of control sometimes which makes it difficult to not be able to take care and mitigate errors related to new serverless instances.
In case of Serverless architectural style, the developer is accountable for coding the server-side logic, but unlike traditional architectures, the application runs in some stateless compute containers that are event triggered functions and are fully managed and controlled by the cloud provider. Some of these events even last for only one invocation i.e. they are ephemeral in nature. The FaaS platform takes some time to initialize an instance of these function before executing each event. Now if the function is complex enough this delay or better the startup latency may vary significantly even for a single function. This obliviously isn’t sound good as this latency may range anywhere from a few milliseconds to several seconds.
Generally, the initialization of these function is either a “warm start” i.e. it reuses the instance of a function from its previously executed event, or a "cold start" i.e. it creates a new container instance every time a function is executed and starts the function host process. Here the cold start of the functions are the ones that cause the startup latency and is the most concerning and causes challenges in our architectural approach.
This simply means that the FaaS functions are sometimes not suitable for some of the long-lived tasks and needs breaking down of these functions into several different coordinating FaaS functions, whereas in a traditional environment we can always have one long-duration task that performs both coordination and execution.
The serverless has undergone a huge advancement over the traditional servers because of its pay per execution property. It provides a huge advantage when setting up different environments and makes it as easy as if we are setting a single environment. Hence its hosting offers some unique benefits and reduces the burden of setting up different servers for development, testing, and production. This out of the box features of serverless over the normal cloud computing makes it an attractive option for many businesses. Regardless of the advent of serverless computing, there will always be a market for more conventional cloud computing services. However, there are still certain applications that may never migrate to a serverless architecture as serverless computing isn't right for every solution, it also has various challenges to be dealt with. The corporations that place much value on anticipated budgets may be a better fit for other cloud hosting options. Furthermore, we should try to understand the true essence of serverless before taking a plunge to replace our existing architectures. It is also essential to focus more on optimizing our resources by considering other cloud computing options available in the market when developing new systems.