Skip to content

What is serverless computing?

What-is-Serverless-Computing-Featured-Image-3

Serverless computing is a Cloud-based development and execution method for application code. It enables developers to focus on building great applications without having to worry about provisioning or managing the underlying infrastructure - so they can get on with what they do best. The term ‘serverless’ is also a misnomer as applications are still hosted on servers but that infrastructure is handled entirely by a third-party vendor. Serverless computing should also not be confused with computing models or networking architecture that do not require servers to function, such as peer-to-peer (P2P).

Before we dive into the traits of serverless computing and common use cases for building and executing applications using this model, let us first look at how we got here. In the early days of DevOps, developers (or the businesses they worked for) had to own and manage physical hardware to run servers that would contain and execute application code. This was incredibly expensive, cumbersome and difficult to scale.

Then along came cloud computing which enabled businesses to rent server space or entire servers. Although the technology was fairly limited when it first began, it ultimately reduced or removed several barriers to entry for application development. Then Amazon launched AWS Lambda in 2014 and the rest is essentially history.

Key Traits of Serverless Computing (Advantages & Disadvantages)

Serverless computing fundamentally changed the world of application development. The key traits of serverless computing are below but read our full article on the advantages and disadvantages of serverless computing for a more comprehensive breakdown.

Top-8-Traits-of-Serverless-Computing

Top 8 Traits of Serverless Computing

Vendor-lock in

Although having your infrastructure managed by a cloud provider introduces a range of benefits, your organisation will grow increasingly more reliant on that provider. Stay tuned for an article that will cover how you can avoid being locked into a single vendor.

Common use cases of serverless computing

Real-time & big data applications

Applications that need to process large or more complex data sets (big data) or data in real time would benefit significantly from the scalability and cost-effectiveness that serverless computing provides. Both use cases require significant processing agility that traditional architectures would struggle to reach without significant investments in hardware, maintenance and personnel. 

Rapid deployments

If your development cycles are short or if your business needs to launch applications or release new updates and features quickly, then the simplified back-end development advantages that Function-as-a-Service (FaaS) provide will be crucial. Using serverless computing can reduce the time it takes to deploy code from months to a matter of days and weeks.

Complex event-based applications

Serverless computing is well suited for complex applications or apps that respond to user inputs, even if they only serve a single function. The dynamic allocation of resources that serverless architecture provides can optimise the bandwidth or server capacity these complex applications need as traffic fluctuates up and down or complex queries are executed.

IoT & smart devices

The Internet of Things (IoT) and the use of smart devices are rapidly growing. For example, Coca-Cola claims that one-third of vending machines are connected to the Internet and monitor things like which machine or specific drink is more popular than others. This type of connectivity and data analysis is being empowered by serverless computing. 

In numbers: Top 10 ways serverless is being used

According to a 2021 report from IBM, here’s how serverless is being used broken into data:

Top-10-use-caes-of-serverless-computing-image2

Source: 'Serverless in the enterprise, 2021' (PDF)

Who should and shouldn’t use serverless computing?

Developers who are looking to build lightweight and flexible applications or need to take their applications to market quickly will benefit from using serverless computing to reduce the time it will take to build, host and execute their code. Additionally, developers who have short and consistent development cycles and need to push out updates and new releases with speed should also use serverless computing for the same reason. Applications with unpredictable or inconsistent traffic that fluctuates between peak periods and none at all would be better suited for serverless computing. This is because the automatic allocation of server resources will help reduce wasted overspending on idle servers. And finally, applications that require Internet connectivity or that will be tasked with analysing large amounts of data or data in real-time should also be supported by serverless infrastructure.

On the other hand, applications that have consistent and predictable workloads will be better suited to dedicated servers that are either managed internally or managed-as-a-service. Applications that rely on instant connectivity between users but have a low traffic volume may also experience challenges with serverless computing due to cold starts. And finally, legacy applications can also be difficult to migrate to a cloud-based environment but not impossible. Consulting with a Cloud App Modernisation specialist will pay dividends if your business is considering migrating a legacy application to the cloud.

For a more comprehensive review of when and where organisations should use serverless computing or an alternative such as a container, read this detailed article on containers vs serverless computing here.

Key takeaways

Serverless computing still requires servers but a third-party vendor undertakes the provisioning, configuration, management and maintenance of these servers.

Serverless provides significant scalability, flexibility, code simplification and faster deployment time whilst enabling a more cost-effective model by reducing wasted spending on idle servers. This removes many of the barriers to entry for investing in and scaling DevOps. Applications that have matured and developed consistent and predictable traffic workloads may be better suited for other code hosting and executing models, such as containers.

Cloud vendors will dynamically allocate resources in response to user requests and traffic. This works both ways in that the resources for your serverless functions could be scaled up or disabled if they become dormant. Disabled functions take time to reactivate when the next user request comes through which could lead to a temporary ‘cold start’ or increased latency between the function and user.

Serverless computing is ideal for many use cases but it is not perfect for every solution. The latency between users and functions can lead to unacceptable consequences in user experience and there is also the challenge of being locked into a single vendor or the complexities of managing several cloud vendors.

Vendor lock-in is a natural concern for many organisations. Stay tuned for our upcoming blog on how to avoid becoming locked into a cloud vendor when engaging in serverless computing services.

If you have any other questions on serverless computing or you’d like to speak to cloud experts for your next DevOps or application modernisation project, get in touch.