Is Serverless the 'Right' Way to Cloud?

01-06-2021 / CloudOps

Serverless computing is taking off. Despite having been around since the announcement of Lambda by AWS in 2014 serverless is finally reaching the maturation required to propel a paradigm shift.

What is ‘Serverless’ Computing?

Serverless computing describes a software development pattern in which the application has no direct interaction with the server. The name serverless is a bit of a misnomer - there will always be servers, just like there has always been hardware behind EC2. The value of serverless is not having to spend your resources managing them. You are free to use your resources only where necessary or valuable.

Serverless products like AWS Lambda, Azure Functions, or Google Cloud Functions lead to solutions that are faster, greener, and more agile. This is why we say it can be the 'right' way to cloud.

Cloud Native and Serverless Computing

For the last few years, cloud native has been the north star for application modernization. The Cloud Native Computing Foundation (CNCF) uses the term to describe building applications using Kubernetes, a container orchestration system, as the delivery mechanism. This space has added tremendous value to customers and helped developers deploy existing applications in more elastic and sustainable ways with Infrastructure as Code.

For established companies with established codebases, containerization allows companies to migrate existing applications into the cloud. This is where Kubernetes and the cloud native movement are easy (or rather easier) wins. Many organizations have embraced cloud native architectures to become more efficient, scalable, and agile in the process.

Serverless computing may appear to be an offshoot of cloud native computing, as it extends the benefits of cloud native. In reality, it’s driving a paradigm shift.

"Serverless app development isn’t an incremental change. It’s a complete reset in terms of the speed, cost, and scalability of what can be built."
Adrian Cockroft, VP Cloud Architecture Strategy at AWS

Serverless Solutions for Event-Driven Applications

Serverless computing requires a departure from traditional ways of thinking that have proven useful for containerization and cloud native computing, because it requires you to think asynchronously. Serverless computing shines when applied to event-driven models, where applications respond to events (state changes) as they occur. It works well with code that is loaded and becomes the glue bringing together events and downstream systems or other event processors. Serverless services like Lambda allow us to spawn instances of code in response to events and only pay for the compute power being used.

Sam Newman detailed how serverless computing requires us to think differently about how we build in a talk called 'Where We're Going, We Don't Need Servers' that he presented at GOTO 2020.

We Can Do Better!

It’s never easy to admit there might be a better way of doing things - especially when you’ve been doing things one way for so long. But it’s time to ask new questions, as serverless technologies and event-driven applications can lead to solutions that have more speed, agility, environmental greenness, and differentiated value.

1. Speed

There’s no doubt the movement to the cloud (when done well) has allowed organizations to operate more efficiently in today’s digital world. Event-driven design extends this efficiency, as it simplifies the applications themselves. Functions as a Service (FaaS) in particular allows you to write and deploy smaller pieces of code without having to worry about any infrastructure. This means applications can be run more quickly.

2. Agility

Microservices (when built well) increase the speed and agility of applications, giving us the ability to ‘fail fast’ through more rapid experimentation and value generation. When used in greenfield projects, serverless technologies have been shown to add even more agility. The management of serverless systems requires nowhere near the complexity of many large-scale VM or Kubernetes deployments. Organizations can increase their development turnaround drastically when deploying many small functions independently without worrying about the same level of infrastructure.

"You can build ridiculously complex, scalable systems in just a few days."
Adrian Cockroft, VP Cloud Architecture Strategy at AWS

3. Environmental Greenness

Vast amounts of resources (electricity) are consumed when services, applications, or containers are run. These resources are often scaled for median or worse spike utilization, and then consumed to maintain idle states.

Ask yourself whether your apps need to consume resources all the time, or only in response to certain events. Serverless computing can allow you to consume only the resources needed, releasing resources back to a shared pool when not in use. This can mean a greener and more energy-efficient solution.

Both AWS and Azure have pledged to become carbon neutral or carbon negative in advance of national targets. They are investing in renewable energy sources to power their data centers. Already, moving on-premise workloads to AWS results in an 88% carbon footprint reduction. Large-scale serverless providers are in a much better place to make demands for greener electricity than smaller data centers, and serverless could help them along the way.

4. Differentiated Value

The COVID-19 crisis has shown us how customer’s needs can change drastically in such a short period of time. Cloud infrastructures have helped organizations pivot without concern for infrastructure sunk-cost. The transition to FaaS and other serverless technologies have given even more freedom to build and operate quickly at scale without the need to plan and provision for potential load. These technologies provide a way to handle the undifferentiated heavy-lifting of application development, so developers can spend more time generating differentiated value. Instead of building a platform that already exists, they can direct their efforts to meeting the needs of the business.

Is Serverless Ready?

Serverless technologies can lead to faster, greener and more agile deployments that help empower organizations to focus on delivering differentiated value. They argue for event-driven designs that can pioneer a third wave of cloud computing. But are serverless technologies mature enough to be adopted?

In an interview with Forest Brazeal, Simon Wardley points out an often-heard complaint that serverless isn’t ready yet.

These types of objections aren’t new; they’ve occurred at each phase of the XaaS movement to the cloud. People initially didn’t take the first EC2 offerings very seriously. When EC2 ultimately spawned the first PaaS, it became a catalyst for IaC. This was undeniably a movement in the right direction.

The biggest concern to serverless has been its risk for lock-in. Once you’ve committed to a serverless vendor, it can be difficult to migrate to another platform. Rather than avoiding the threat of lock-in altogether, assess the threat and impact. There are ways to only loosely couple your code with the vendor’s APIs if ideal.

Amazon, Microsoft, and Google strive to address these common concerns by improving their respective FaaS offerings. They continue to make inroads against the remaining concerns.

As such, serverless is gaining momentum. In his keynote at AWS re:Invent 2020, Andy Jassy (CEO of AWS) points out that half of all new services deployed to AWS are being deployed in Lambda. Serverless still has kinks to work out, but it seems to be ready for the market.

As architects, we need to solve new, complex problems in ways that allow for flexibility. Serverless gives us a way to do so. It just requires a new way of thinking.

If we want to build these new systems and deliver greater velocity, we must focus on becoming more effective with new techniques. We have to think about the problems in new ways.

It’s time to be faster, greener, and more agile.

Think serverless first!

 

Marc Boudreau

Marc Boudreau is a Cloud Architect at CloudOps with a background in development for the cloud. He’s particularly passionate about helping people use serverless technologies to accelerate cloud development. Marc spends his free time riding his bike and looks forward to spending his fall and winter racing cyclocross in Belgium and the Netherlands when that becomes possible again.

New call-to-action