The document provides tips on how to save 98% on an Azure bill by using a serverless architecture and practicing serverless minimalism. It explains that serverless services scale resources reactively based on usage, resulting in close to 100% utilization and only paying for what is used. This leads to significant savings compared to conventional PaaS architectures that require pre-provisioning capacity to handle spikes, resulting in low utilization and wasted spending. The document also advocates practicing "serverless minimalism" by only using the resources needed to complete a task and writing the minimum amount of code required.
3. Analysis
Recently we implemented some tags on our Azure Resources that enabled the company to
create a dashboard detailing the Total Cost of Hosting for each of our applications.
4. Resource Cost
The typical cost for a web app involving an
App Service & an Azure SQL Server over 4
environments was:
The cost of TradeBot was:
£3000 per year
£65 per year
Or not enough to take
my team out for lunch!
6. Serverless
Serverless is a sub-category of PaaS services
For a service to be described as ‘Serverless’ it must:
1. Cost nothing when you’re not using it (except storage)
2. Scale quickly and reactively to usage
3. Have zero maintenance and minimal configuration
This leads to the key benefits: ‘Pay for what you use’, and ‘NoOps’.
7. Why Serverless lets you save cash
• Most applications run at a fraction of their provisioned capacity, because we have to pre-
provision enough capacity to deal with spikes without going offline
• This leads to massive amount of waste, with many apps running at abysmal lifetime
compute utilization in the single digit percentages. Serverless services instead scale their
resources reactively, resulting in close to 100% utilization and only paying for what you use
• Many apps also require more and more operational staff and tasks as you make them
more complex. Serverless services will still require some, but the ratio of complexity to
increase in staffing costs is much lower.
All of this results in a significant TCO saving
10. Sounds too good to be true?
• Your Serverless bill will increase with usage, which impacts predictability. Equally if your
traffic is already very high, with high utilization, it’s entirely possible you won’t save in
your raw hosting cost (but probably will in maintenance)
• Tooling is not as good as ‘normal’ architectures currently
• Cold starts can still be an issue for latency-sensitive apps, but possible to battle with
‘KeepAlive’ functions
12. What is Serverless Minimalism?
A Serverless Minimalist creates applications using exactly what they need to complete the
task at hand, and nothing more.
13. Serverless Minimalist
They do not:
• Waste money by running resources
permanently unused
• Damage the planet by emitting greenhouse
gases for these unused resources
• Write more code than they need to do a
job
• Utilize ‘fat’ services like VM’s that have
millions of lines of other peoples code
sitting there doing nothing more than
increasing our security surface area and
emitting CO2
They do:
• Use only the resources they need
• Utilize managed services, which perform
one job on a global scale
• Write as little code as possible – When you
first write code it is the least tested code in
the world with the fewest customers &
your company has to maintain it for the
rest of its lifetime
• Minimize all maintenance tasks