Upgrade to Pro — share decks privately, control downloads, hide ads and more …

KILL Cloud BILL: Common Patterns and Tips to Reduce your Cloud Bill

Alex Krause
June 30, 2023
21

KILL Cloud BILL: Common Patterns and Tips to Reduce your Cloud Bill

The cloud is affordable - IFF you know the pricing models, your current and future resource consumption, the difference between alternative services and configuration options and planned your migration carefully. Unless there is a substantial amount of experience within the design team, the overwhelming complexity and variety of options often lead to workloads with huge cost saving potentials. Unfortunately the resulting infrastructure is rarely reviewed later on.This is not a talk about reserved instances or FaaS, but instead about common patterns, small tricks and other things people miss when first building products in the cloud that help you reduce your cloud bill.

Video: https://www.youtube.com/watch?v=oXnF4VsI-Qs

Alex Krause

June 30, 2023
Tweet

Transcript

  1. How did we end up here? • We start small

    and loose track… • We don’t know what we are building… • We have plenty of money (in healthy orgs)… • Prices (were) falling anyways… • Cost structure is complex… 3 QAware
  2. • switch pricing models: reserved/spot Instances, pre-pay • autoscale •

    re-architect to FaaS/CaaS/Batch • cloud provider CDN • switch region • shut off unused stuff • go back to on-prem 5 QAware risky, rarely applicable, huge effort
  3. My Process 1. configure alerts/budgets 2. delete unused resources e.g.

    using Trusted Advisor 3. investigate with cost explorer, group by resource type and identify cost drivers (sort by % of bill) e.g. service, storage, compute, traffic 4. define measures and estimate benefit “if we do X and save 50% of egress cost we reduce 20% of the overall bill” 5. order by effectiveness 6. execute until happy 7. consider different pricing model: savings plan 7 QAware
  4. Tip: Right Size 1. deploy monitoring 2. review usage /

    recommendation 3. apply new settings 4. put under load / deploy to prod 5. re-adjust with new data 6. repeat ➔ do this first, other measures build on this ➔ time consuming to get right ➔ do continuously 12 QAware
  5. Tip: Change Instance 14 QAware use the current generation of

    your instance: slightly cheaper, but faster
  6. Tip: Change Instance 17 QAware switch to more-memory instances: more

    expensive (~30%) but twice the the amount of idling workloads
  7. Tip: Stage Sleep 18 QAware • most systems have multiple

    non-prod stages • these are used only during office hours • 10h x 5d / 24h x 7d = ~30% -> you can shut these system down 70% of the time! • automate with scheduled CI-Job • allow fast out of schedule start
  8. Tip: Storage Classes 21 QAware S3 Standard S3 Intelligent-Tiering* S3

    Standard-IA S3 One Zone-IA† S3 Glacier Instant Retrieval S3 Glacier Flexible Retrieval S3 Glacier Deep Archive Designed for durability 99.99999 9999% (11 9’s) 99.999999999 % (11 9’s) 99.99999 9999% (11 9’s) 99.999999 999% (11 9’s) 99.999999 999% (11 9’s) 99.999999999% (11 9’s) 99.99999 9999% (11 9’s) Designed for availability 99.99% 99.9% 99.9% 99.5% 99.9% 99.99% 99.99% Availability SLA 99.9% 99% 99% 99% 99% 99.9% 99.9% Availability Zones ≥3 ≥3 ≥3 1 ≥3 ≥3 ≥3 Minimum capacity charge per object N/A N/A 128 KB 128 KB 128 KB N/A N/A Minimum storage duration charge N/A N/A 30 days 30 days 90 days 90 days 180 days Retrieval charge N/A N/A per GB retrieved per GB retrieved per GB retrieved per GB retrieved per GB retrieved
  9. Tip: be cheaper in dev 23 QAware • hdds instead

    of ssd, reduced IOPS • burstable instances for databases • reduce SLA options • reduce HA ◦ database failover ◦ blob zones ◦ replicas ◦ networks, 5 -> 2 availability zones
  10. 26 QAware 📅 Start at Day 1 📈 Monitoring and

    Alerting ♻ Review, Improve, Repeat 🤔 AI? 🤖
  11. qaware.de QAware GmbH Mainz Rheinstraße 4 C 55116 Mainz Tel.

    +49 6131 21569-0 [email protected] twitter.com/qaware linkedin.com/company/qaware-gmbh xing.com/companies/qawaregmbh slideshare.net/qaware github.com/qaware Q&A
  12. 28 Spot-Colors für Farbverläufe Wer Akzente setzen und Texte hervorheben

    möchte, kann sich hier die Spot-Color für den verwendeten Farbverlauf raussuchen. Unsere Farben sind alle gleichwertig. Ihr könnt also selbst entscheiden. Blue Gradient Orange Gradient Purple Gradient Petrol Gradient Green Gradient Red Gradient DarkOrange Gradient DarkBlue Gradient Dunkler Ton #17428b #ef7d00 #4f2163 #004a78 #487827 #700f08 #c00d0d #142f4e Heller Ton #009ee3 #ffcc00 #a61680 #009bb4 #afca0a #c00d0d #f39200 #004a78 Spot-Color #c7d400 #c00d0d oder #009bb4 #f39200 #ffcc00 #004a78 oder #009ee3 #ffcc00 #a61680 #afca0a QAware