The benefits and drawbacks of serverless computing
Serverless has grown considerably in the past few years. But what does serverless mean, exactly? In this article, Savaram Ravindra explains the basics of serverless and how this trend has changed computing forever.
The term “serverless” has started gaining huge popularity when Amazon unleashed AWS Lambda in 2014. Since then, the term has witnessed a rapid growth in terms of reference and use with more number of vendors entering the market with their own solutions. What is serverless actually and how this trend is changing the method in which people write and install applications? In this feature, I will discuss what is serverless and its pros and cons.
What is serverless?
A unique type of software architecture in which the execution of application logic is carried out in an environment without the need for virtual machines, servers, operating systems or visible processes is termed as “serverless”. This kind of environment actually runs on top of an OS and utilizes virtual machines or physical servers, but the responsibility for managing or provisioning the infrastructure belongs completely to the service provider. A software developer, therefore, focuses on writing the code. In other words, he thinks in terms of functions or services that establish communication with each other and the external world.
After the implementation of these services, the developers making use of a long-established approach would integrate them into numerous distributed processes when updating, monitoring, running or installing those kind of processes for particular operating systems that are running on particular virtual machines or servers. A third-party service provider will be held responsible for all the things beginning from the processes to the operating systems and to the servers in this “serverless” approach.
As stated earlier, when a third-party service provider is held responsible for the IT infrastructure, the developer need not purchase a virtual machine or a dedicated server. However, it is up to the service provider to decide how to use its infrastructure effectively in order to serve the requests from all its clients. Consequently, the service provider is not required generally to run a permanent workload for a particular client; the requests from all the customers are handled by the software at the same time, thus spending only a limited time on handling each request from a particular customer. Thus, such providers usually charge their customers depending on the total amount of time spent to serve all requests from the customer, the frequency of requests over a particular period or the total number of requests.
The same approach works exceedingly well for distinct loads as the third-party service providers generally have scalable, elastic services. The expected number of requests will be less in number when customers begin utilizing a third-party service and the customers pay quite less compared to managing, configuring and purchasing their own infrastructure in the cloud or on-premises. For huge number of requests – either unexpected or expected loud peaks – the customers don’t need to add servers to scale their application horizontally. A service provider cares about the increased load instead. Handling large number of requests will cost more for sure but it is still more efficient than utilizing a dedicated IT infrastructure in most cases.
The upsides and downsides of serverless computing
Serverless computing has the following benefits:
- Simplifies deployment and packaging and eliminates the need for system administration.
- Decreases the complexity of software.
- Fits well with microservices(they can be implemented as functions).
- Works with agile development and enables the developers to concentrate on code and deliver quickly.
- Lesser cost to scale – the developers need not implement code to scale and the administrators need not upgrade the servers that are existing or add any additional servers.
- Smaller development and operational costs.
- Decreased time to market and faster software release.
At the same time, it has the following drawbacks: the serverless computing cannot be stated as the perfect approach due to performance issues. The model itself implies that you will acquire higher latency in how the compute resources respond to the applications’ requirements. It would be better if you use allocated virtual servers if performance is your primary requirement.
The debugging and monitoring of serverless computing is tricky as well. As you are utilizing a single server resource, the debugging and monitoring activities become extremely difficult. (Regarding this, the good news is that the tools that manage debugging and monitoring in the serverless environments will arrive eventually)
Should I use serverless computing or not?
Affirmative! You can count on Microsoft, Google and Amazon Web Services to focus on their serverless offerings. Recently, some remarkable updates for Lambda have been provided by AWS. More offerings are on the way. At the end of the day, the serverless computing is a pretty good approach for consuming the resources of the cloud.
The serverless architecture is an innovative approach to deploying as well as writing an application that enables the developers to focus on code. This kind of approach can decrease time to market, system complexity and operational costs. While the third-party services like AWS Lambda are leveraged by AWS to eliminate the need to set up as well as configure virtual machines or physical servers, it also locks in the application as well as its architecture to the particular service provider. In the near future, more movement towards the unification of FaaS frameworks or APIs like IronFunctions can be expected. This will help to eliminate vendor lock-in and allow us to run serverless applications on various cloud providers or even on-premises.