How to save 98% on your Azure Bill
Serverless
Minimalism
Daniel Bass
Senior Developer in Private Assets & Alternatives, M&G plc
https://www.danielbass.dev
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.
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!
How to architect a typical 3-tier web
app to cost 98% less
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’.
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
Conventional PaaS Architecture
Azure Active Directory
Azure SQL
Azure App Service
Serverless Architecture
Storage Account
CRUD Azure Functions
Azure Active Directory
Table Storage
React App
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
Serverless Minimalism
What is Serverless Minimalism?
A Serverless Minimalist creates applications using exactly what they need to complete the
task at hand, and nothing more.
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
Any Questions?

Serverless Minimalism: How to architect your apps to save 98% on your Azure bill | Integration Monday

  • 1.
    How to save98% on your Azure Bill Serverless Minimalism
  • 2.
    Daniel Bass Senior Developerin Private Assets & Alternatives, M&G plc https://www.danielbass.dev
  • 3.
    Analysis Recently we implementedsome 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 typicalcost 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!
  • 5.
    How to architecta typical 3-tier web app to cost 98% less
  • 6.
    Serverless Serverless is asub-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 letsyou 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
  • 8.
    Conventional PaaS Architecture AzureActive Directory Azure SQL Azure App Service
  • 9.
    Serverless Architecture Storage Account CRUDAzure Functions Azure Active Directory Table Storage React App
  • 10.
    Sounds too goodto 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
  • 11.
  • 12.
    What is ServerlessMinimalism? A Serverless Minimalist creates applications using exactly what they need to complete the task at hand, and nothing more.
  • 13.
    Serverless Minimalist They donot: • 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
  • 14.