Adam White

Blog

Why More Businesses are Going Serverless

Serverless computing refers to the latest evolution of cloud computing whereby backend services are managed by a cloud provider on an on-demand, scalable, pay-as-you-go basis. This is markedly different from traditional cloud computing services, typically involving the renting of servers and hardware on an ongoing basis, with the organisation paying regardless of whether the hardware is utilised. The major providers include Amazon Web Services, Microsoft Azure and Google Cloud Platform, although there are open-source alternatives like Apache OpenWhisk.

Serverless computing defined

The term ‘serverless’ is often used synonymously with Function-as-a-Service (FaaS), which provide on-demand code execution – the most popular FaaS services include AWS Lambda, Microsoft Azure Functions and Google Cloud Functions. The serverless paradigm also encompasses managed back-end services (BaaS) including data storage (e.g. S3), databases (e.g. DynamoDB), notification systems, authentication (Cognito) and much more.

Benefits of serverless vs serverful

A prime use case for serverless is providing web API services, handling requests and responses. The main strength of serverless is scalability and the ability to scale to zero, meaning you only pay for actual usage.

When renting traditional cloud computing hardware, most of the cost is spent maintaining an idle server. Given typical server utilisation is below 25% (https://middleware.io/blog/efficient-server-utilization/), switching to serverless solutions massively reduces operating costs as businesses only pay for individual function executions, fine-grained to the hundreds of milliseconds.

Maintaining servers, ensuring adequate redundancy, load-balancing and security measures is also costly and burdensome to developers. Serverless computing solves these issues by offloading those concerns to the cloud provider, who leverage their considerable infrastructure to provide robust security, performance and scalability, as well as handling server maintenance and ensuring service reliability.

Limitations

This style of web application architecture does come with its drawbacks, with the main disadvantages being cold starts and vendor lock-in.

Cold start refers to the small delay it takes for a function instance runtime environment to initialise, which for a time-sensitive application could be critical. Nonetheless, this issue can be mitigated through warm starts, where functions are periodically initialised in anticipation of incoming requests or through request pattern analysis.

Vendor lock-in refers to the increased likelihood of becoming tied to a specific cloud provider as interoperability with other platforms can be more difficult or costly to configure.

Summary

Gradually, businesses are moving to an increasingly serverless architecture, building cloud-native applications that take advantage of reduced operational costs, fast scalability, high performance and reduced developer burden. Ultimately, cloud providers are offering convenience and reliability, at the expense of a loss of developer control and vendor lock-in.