Reduce the cloud bill
Generated with AI

Reduce the cloud bill

Welcome back to our weekly series, "2 minutes for...". This week, we are answering the burning question of Costs in the cloud.


Let's face it: if you look at the purchase price of a machine and you look at what you're paying on the cloud to rent that machine time, it's easy to say that it's a rip-off and that you should host it at home. After all, you've got a good Internet connection...

"It's not about the money, money, money..." Jessis J.

But you do go out to eat sometimes, don't you? And you know that's really more expensive than cooking at home, don't you? Well, just like the restaurant, you can't compare the two, because the service is completely different. I could do a whole post on the advantages of the cloud, but I'll just simplify by pointing out that if you take all the factors into account (the TCO), it will be more profitable for your startup, trust me (well, some "startups" like 37Signals think otherwise though).

So the cloud is a must have, but that doesn't mean we can't reduce the bill all the same, does it? After this far too long intro, here are some techniques that you can apply to all clouds providers, and after more specifically applied to AWS.


Tag your ressources

The first obvious step is to find out what your costs are. There are fixed costs (your basic infrastructure) and variable costs linked to your traffic. It's important to understand how to measure your different costs. Most of the time, you can associate "tags" with your components (instance, database, storage, etc.) and environments (dev, staging, prod). If you haven't got a tagging strategy, here's one to apply to each component:

| NAME      | VALUE               | DESCRIPTION
-------------------------------------------------------
| env       | dev/prod/staging    | Track environment type  
| app       | my petstore 2.0     | Track each of your applications  
| component | network/compute/BDD | Track the type of the ressource        

By using this basic strategy you will be able to answer actionable question like

  • Which of my applications costs me the most?
  • Are my storage resources a big part of the bill?
  • Does the dev environment cost me too much?


Look at the breakdown

Now look at your expenses. Chances are, one of your major items is compute (on AWS: EC2, Fargate, Lambda). Here are the 3 most importants things to do:

  1. Rightsize Your Instances : Having a CPU/memory used at 5% capacity is probably not needed, you should lower your instance size. Use tools like AWS Compute Optimizer to get rightsizing recommendations.
  2. Track Running Hours and Usage: You have predictable usage, even with spikes? Use Auto-scaling to scale your compute capacity up and down based on observed demand.
  3. Commit on longer period : When you are done with 1 and 2, you know what you need at the minimum. You don't plan to shutdown your business in the coming months, right ? Then commit and you will get significant discounts. For instance, at AWS, if you use Savings Plans you can help reduce your costs by up to 72%! Not bad!


I need MOOOORE

You've done the 3 points above and want to spend even less? It's completely possible, so here are a few things to explore:


Conclusion

Remember, cost optimization is not a one-size-fits-all approach, take the time to look, chances are you'll be wasting your money. It can save you big bucks and I never met a startup that did all the cost optimization techniques, then you've got room to spare!


Feel free to comment or contact me if you need help managing your costs :)



要查看或添加评论,请登录

Julien Coupez的更多文章

社区洞察

其他会员也浏览了