Serverless. It’s a buzzword. Love ’em or hate ’em, buzzwords give us crucial clues into what is trending, and this one is loaded.
Serverless computing is a cloud computing model in which the cloud provider dynamically allocates computing resources based on demand, and where the provider also administers the underlying servers on behalf of its customers.
To some it means “little to no maintenance”, to others “cheaper technology infrastructure”. While both are true, serverless is by no means a panacea.
Across all three major cloud infrastructure providers, there is no set monthly pricing for serverless infrastructure. Pricing is based on how much resource (generally number of seconds that code runs, throughput, and memory) that each request consumes.
Serverless is not necessarily going to be cheaper for code that runs 24/7, but there are other benefits. You won’t need a systems administrator and developers won’t have to learn how to install, run, secure and patch a Linux server (an increasingly rare skill). Running and maintaining servers is at a minimum a monthly maintenance job, and at worse a drop-everything-all-hands-on-deck for high-risk issues such as the recent security vulnerabilities.
Equally important is the supporting services. Serverless workloads have limits, and don’t always provide features such as internet access, traditional storage and security.
While handled differently across cloud providers, these costs are additional to the cost to run the code written by your software developers. The great news though is that compared to the cost for multiple virtual machines, container services or physically hosted servers, this is generally lower until you get into extremely high workloads or if you are willing to significantly compromise on performance.
The cloud infrastructure cost aside, operational costs for serverless are a success story but also introduce items on your risk register. When you select serverless computing, the updates to the underlying hardware, operating system and base programming runtime are done for you. This doesn’t mean that software maintenance doesn’t exist – you’ll be informed and asked by your cloud provider to upgrade or face the consequences, which starts with an inability to release new functionality, and can end up with your code ceasing to run.
You have two important risks to consider. You will be forced into upgrading platforms at some point. This will usually be several years in the future if your software is deployed on up to date platforms. The timing and inescapable inevitability cannot be ignored commercially.
The second risk is that you are effectively outsourcing your systems administration to your cloud provider. Professional consensus is that due to scale and customer volume the cloud providers will do a better job than your single sysadmin, but this is not guaranteed.
With risks acknowledged, we come to the true advantage in operational expenditure. There’s no requirement for a dedicated systems administrator.
The entire ecosystem from deployment to maintenance can be looked after by your software partner or developers, with a little help from your cloud provider in the form of proactive notifications.
Another common question about serverless is the cost to develop and scale. This is highly dependent on the languages, frameworks and type of problem you’re solving. Swapping out traditional servers for serverless solutions may not give a good solution. In general, there should be no additional cost to implement serverless code, provided that serverless is the correct technical fit for the problem. And finally, onto a good problem to have: a fast growing business. In this area serverless technologies really shine.
With a support ticket (and a good explanation), well designed solutions can scale from 1,000 concurrent requests up to 10,000 in hours. With traditional infrastructure, building for scale can be cost prohibitive during the initial design and build, whereas serverless solutions are largely intrinsically scalable. The key to a successful serverless implementation is good architecture. Serverless should always be considered in a holistic way, starting with good technical fit, but always looking at the business fit as well.
At Company-X we have great success passing on serverless solutions to clients with feedback that onboarding time is low due to great tooling, the inherent modularisation that serverless code and infrastructure provides, and that the low infrastructure entry cost has made an agile approach a reality.