Why Serverless Is the Future of Application Development
Take Full Advantage of Virtual Machines and Automate More Aspects of Your Infrastructure
Virtual Machines pave the way for automating more aspects of our infrastructure to provide resources at a much faster pace and a lower cost. Containers improve utilization even more, and they allow us to build highly resilient and elastic solutions. However, you still have to think about servers. For example, you have to address concerns such as scalability (which instance type and size?) and fault tolerance (how to configure redundancy and load balancing?). You have to think about what operating system to use and how to do patch management, and you also need to make sure access is secured.
To summarize, managing servers takes a lot of time, and it is an ongoing effort. At the same time, it is an important task – wrong configurations can cause system outages, and infrequently patched systems can cause data loss or, worse, leakage. This is why, traditionally, enterprises have entire teams that only concentrate on these tasks. However, that’s not only expensive. It can also often lead to conflicts and gaps between developers and operations. This has an impact on the speed and quality of your releases.
Serverless - Scalable, Highly Available and Fault-Tolerant
With the background established, now let’s talk about the Serverless world. In this world, the cloud service provider (CSP) takes care of these responsibilities. The provider handles provisioning and many aspects of utilization. The CSP also makes sure the resources are scalable, highly available, and fault-tolerant. Securing the environment and patch management is handled by the cloud provider as well. And they are really good at it.
Why? Because they have to. Without a secure and stable platform, CSPs will be out of the business. For example, all of the big cloud providers patched the Spectre/Meltdown vulnerabilities in their systems long before the vulnerabilities were publicly announced. So, if your application runs on Serverless infrastructure, you will immediately benefit from this without requiring any effort on your end. Compare this to a traditional setup; how long did it take you to patch these vulnerabilities?
Serverless - Create Elasticity
Another important aspect of Serverless is elasticity. Traditional systems are often over-utilized, so that they can handle increases of traffic during holidays or marketing campaigns. This means the business constantly pays money for resources that are only used during a very small amount of time. Even with auto-scaling, it is often still not trivial to handle sudden and unannounced traffic spikes, such as when a product or article gets viral on social media. Thus, there’s often a trade-off between over-utilizing and risking server outages.
Again, Serverless comes to the rescue. Because the CSP takes care of provisioning and scaling, there is nothing you need to prepare or do when the next traffic spike occurs. For the CSPs, they are also motivated to provide the best service possible in this area, too, because, by improving scaling and utilization of their infrastructure, they can increase their own profit margin.
Serverless - Only for Large Companies or Also for Smaller Ones?
At this point, we often get the question of whether Serverless only applies to large and popular B2C sites and not to your typical B2B or smaller B2C applications. To answer this question, we need to think about another important aspect of Serverless - pay by use. Because you only pay for the resources that you use, Serverless can also have tremendous cost-saving effects for applications that don’t receive frequent traffic all of the time.
For example, if you have an application only used during business hours, you only pay during this time. At the same time, your application will still be available, in rare cases, when people do access it after hours. So, elasticity can be a significant advantage not only for applications with high peak traffic. On the other hand, if you have a fairly steady workload without a lot of peaks or downtime, then you won’t save runtime costs with Serverless. However, you might still want to consider it for other reasons such as development speed (faster time to market).