Can your business afford to go serverless?

Calculator and pen on a paper

Users want functions on demand, and serverless architecture makes it possible by offering organisations the infrastructure. It gives businesses a fully hosted platform to run and scale applications only when needed, taking care of all the IT behind the scenes. Effectively, you only pay for what you use.

This function as a service (FaaS) model has clear benefits for tech startups, but its mainstream appeal has broadened in the last couple of years to create a global market worth an estimated £7.5 billion. Half of all companies in Datadog's 2022 State of Serverless report, which surveyed organisations of all sizes and sectors, now use serverless products. The fastest growing trend is for enterprises to run existing applications on serverless architecture, says Datadog.

"Enterprise IT departments were the early adopters of agile and DevOps," Freeform Dynamics analyst Dale Vile tells IT Pro. "If these large organisations are doing fast-moving development, particularly working on the edge of the business, serverless is going to be a really good fit for them."

Just as most people can't afford a taxi for every trip, though, not every business can run everything on serverless architecture. A cab is cheaper upfront than buying a car, but it soon stops being cheap if you make a trip every day. Whether serverless is a good fit for your business and represents value for money depends on your usage patterns.

Why chaos makes sense of serverless

Serverless is largely an event-driven architecture, so it makes the most financial sense for businesses who can't predict when and how much their applications will be used.

Netflix is a prime example. Netflix may be a giant brand with consistently high traffic, but it sees wild spikes in demand, often driven by viral word of mouth or even tragedy. When The Crown saw an 800% ratings jump following the death of the Queen, Netflix's serverless provider was able to spin up resources immediately to support the shock spike, then spin it down again afterwards when traffic returned to normal.

Legacy organisations also see spikes and lulls that make serverless a wise investment. The UK Passport Office (HMPO) previously stockpiled capacity in case of traffic surges, but that's now handled by its serverless provider, AWS. "A lot of money went on servicing the backend," says Jamal Burns of consultancy esynergy, which rebuilt HMPO's passport application process. "They'd been paying for a buffer of memory they hardly ever used." The shift to serverless is already saving HMPO an estimated £10 million per year.

Upfront costs are low with serverless. That benefits young businesses wanting to get off the blocks fast, and enterprises wanting to explore APIs for functions such as bank verification. "The only chunky costs besides pay-as-you-go are for your API gateway, and for the infrastructure that surrounds your serverless environments," says Vile.

Pay (through the nose) as you go

This model doesn't suit every organisation. Pay-as-you-go (PAYG) costs can really ramp up further down the line, especially for large enterprises.

"If you're running a monolith with a consistently heavy workload, like a settlement and clearing process, you'd be better off with containers," says Mark Schlesinger, senior technical fellow at fintech Broadridge. "That way you can decide your resource levels, performance criteria, databases and so on, and you get more control over your application and costs."

Legacy organisations could also pay a serverless provider for things they've already got: infrastructure, middleware, and a skilled operations team to look after it. Unless you're struggling to meet spikes in demand, or paying to maintain resources during lulls, then serverless may not make business sense.

A more hidden cost of serverless is the need to retrain developers to design or rebuild applications that fit the architecture. Schlesinger suggests it’s a price worth paying because most cloud-based models require similar skills. "With the three main methods of going to the cloud effectively, as opposed to a lift-and-shift, it's all about training your developers on how to do things differently in the cloud, whether it's serverless, container or cloud-native."

How to keep your serverless costs down

Businesses choosing serverless can curb their bills, even in the long term, if they pick the right package upfront and use it wisely.

First, shop around for the payment terms that best suit your business and applications. Most providers offer variations on PAYG, taking the lead from AWS' Reserved Instances model, which lets you buy a chunk upfront and then pay a reduced per-use rate. The more you commit upfront, the cheaper the rate. The big three – AWS, Google and Microsoft Azure – are largely consistent on rates, but if one of your applications is particularly sensitive to network traffic, dig deeper to compare potential costs.

Vendor lock-in, too, is potentially costly and worth bearing in mind, but this isn't unique to serverless. "Going serverless does create more of a vendor lock-in than, say, containers," says Mark Schlesinger. "But even on the traditional legacy side, you have a level of vendor lock-in when you pick a database. You have to align with some vendor somewhere."

RELATED RESOURCE

The Total Economic Impact™ of IBM Spectrum Virtualize

Cost savings and business benefits enabled by storage built with IBMSpectrum Virtualize

FREE DOWNLOAD

Longer term, the way your applications are written will influence your ability to afford serverless. "You really want it to be effective coding so it can be switched on and off very quickly," says Jamal Burns. "And if you have an application that doesn't get switched on very much, ask whether it really needs to be there."

It’s also important to be aware that serverless isn't an all-or-nothing architecture. The big three cloud providers offer a range of options including containers and virtual machines (VMs), and you can combine them to minimise costs and maximise efficiency. "This isn't like the old days of servers sitting around a 20-30% utilisation rate," says Dale Vile. "Modern, multi-cloud Kubernetes architectures are very efficient, and that's where the centre of gravity is at the moment."

Benefits such as automatically scalable resources are available in more affordable models than serverless, too. Seasonal peaks and even unpredictable surges can be accommodated by Kubernetes, says Schlesinger. "You can design a container to be elastic. You gain more resources from your provider when you need them, and then shrink your application in the hours it's not used as much. That all helps you mitigate costs."

Serverless is not a magic bullet. It does, however, have much to offer organisations of all sizes as an element of their business architecture, says Vile. "Serverless has real benefits in volatile environments. If you don't have a lot of legacy dependencies, and you don't necessarily have lots of operations, expertise or resources available, the business case for serverless is very competitive."

Jane Hoskyn

Jane Hoskyn has been a journalist for over 25 years, with bylines in Men's Health, the Mail on Sunday, BBC Radio and more. In between freelancing, her roles have included features editor for Computeractive and technology editor for Broadcast, and she was named IPC Media Commissioning Editor of the Year for her work at Web User. Today, she specialises in writing features about user experience (UX), security and accessibility in B2B and consumer tech. You can follow Jane's personal Twitter account at @janeskyn.