Forrest Brazeal in think-faas 5 minutes to read

‘The Cost of Doing Business’ - Think FaaS Podcast

Listen to “Think FaaS with Trek10”

subscribe on google play subscribe on apple podcasts

Transcript

Hi, I’m Forrest Brazeal at Trek10, and this is ‘Think FaaS’, where we learn about the world of serverless computing in less time than it takes to run a Lambda function. So put five minutes on the clock - it’s time to ‘Think FaaS’.

Today I want to talk about the cost of doing business with serverless. I use the word “business” deliberately because, as much as we engineers tend to lose sight of the fact, technology switches don’t happen just because it’s fun to play with new stuff. If you want to go serverless, you have to show why it helps your business win. And one way we can answer that question, not the only way, is by looking at cost. I’ve got three ways that you can put the cost of serverless to work for you.

First, embrace functional billing.

This is the idea that you’re only paying for resources you actually consume, not for provisioned capacity that may end up just being wasted overhead. AWS Lambda is the canonical example of this concept. When you call a Lambda function to handle an API request, it maybe runs for a hundred milliseconds, and you get billed for a hundred milliseconds. And a hundred milliseconds of cloud compute is really, really cheap. For Lambda, even once you get past the free tier which is a million requests per month, you’re looking at something like a millionth of a cent per call. Even at hundreds of thousands of requests a day, your compute costs are going to look like a rounding error - a few dollars a month. We show these calculations to folks that are used to traditional server overhead costs and they just start giggling. It’s almost hard to believe.

This is why you hear stories about people saving 90 to 95% of hosting costs by switching to serverless. It’s not because serverless is magic, it’s just that those traditional systems were so massively overprovisioned for the amount of work they were actually doing. On the other hand, with Lambda, it’s actually a lot easier to max out the default service limits of your AWS account than to exceed your budget.

Second, you have to leverage the power of services.

If you make a spreadsheet and put the hourly cost of your serverless infrastructure - your Lambda functions, your Dynamo tables, and what have you - on one side, and the cost of your traditional on-premise or cloud VM-based infrastructure on the other side, you may very well see a phenomenal savings in favor of serverless, but you also won’t see the whole story. The cost savings of serverless extend way beyond the fact that you’re not paying for servers.

Let’s take logging as an example. Let’s say you’re looking at a managed logging service like Splunk or SumoLogic. And you can see up front that it’s going to cost you ten thousand dollars a year to pay for the licenses you need and the amount of data you have. Now you say, “Well, if I build my own logging stack with ElasticSearch, LogStash, and Kibana, and I run it on ECS in AWS, and I store the data in S3, I would only spend eight thousand dollars in hosting costs.”

Great. But how long does it take your engineers to build that system? And how much are you paying them per hour? And how much will you continue to pay them to maintain it over time, especially given that they’re not experts in building a system like that and will run into lots of bugs? Unless you’re so huge that there really is economy of scale in hiring somebody to solve those edge cases and build infrastructure tooling full time, the smart play would be to take your $10k and sign up for the managed service, because your logging stack doesn’t differentiate you. Nobody’s buying whatever your product is because you personally designed a beautiful logging stack behind the scenes. Let your developers focus on the business-critical stuff.

Finally, strive for increased efficiency, not reduced spend.

I don’t want to give you the idea that a serverless system is necessarily cheap in absolute terms. Compute may be a rounding error, but we’ve found here at Trek10 that as you scale up a serverless system, bandwidth and storage costs will definitely not be trivial. Now, the important thing to note is that those are both usage-based metrics. If you’re not actively transferring or storing data, you’re not incurring as much cost. And all of a sudden we’re tying the cost of our system very effectively to its success.

There’s a guy named Simon Wardley - who’s kind of a prophet when it comes to cloud strategy, and I definitely recommend checking him out - who I talked to for my Serverless Superheroes series at A Cloud Guru. He is very strong on the idea that serverless is not going to reduce IT budgets. He points out that you can look at history and see that anytime humans make something cheaper and easier to access - in this case, cloud computing - we consume more of it rather than less. I like to say that “spend expands to fill the available space.” But what you do reduce, hopefully, is the amount of waste in your budget. With serverless, your spend reflects your actual usage of resources, and ideally that number is tied more closely to your bottom line.

Thanks for listening! If you have a cool story about how serverless is helping your business win, I would love to hear from you on twitter @forrestbrazeal. You can also follow Trek10 there @Trek10inc. And I’ll catch you on the next episode of ‘Think FaaS’.