Reduce your billing costs and save yourself some money by applying FinOps principles on Google Cloud Platform (GCP)

You never know when you will need FinOps

A new intern joined our organization some time ago. He was working on deploying Machine Learning models on Vertex AI. We like to give freedom to employees to explore the different options that Google Cloud offers for them to learn, experiment, and find new and better ways to get value from data. This freedom comes at a cost, quite literally.

There was a new interesting feature on Vertex AI called TensorBoard, which allowed developers to visualize metadata related to the training of neural networks using TensorFlow. No one thought it could cost 300 euros per month, per user. We got an alert from our anomaly detection system and turned it off instantly. Good news, we got reimbursed from Google.

Introduction

It won’t come as a surprise the unexpected (and not so unusual) costs of using Cloud technologies. Due to the “pay as you go” pricing model and ease of deploying resources, those surprises will continue to happen. But there are solutions to tackle those surges in cost.

Managing costs effectively while maximizing the value of your investment is crucial. This is why I am writing this article and showing you how to build an effective informative FinOps solution.

This is optimally done in a three-phase recurring operation, which I will introduce for context.

  • In the Inform phase, FinOps activities involve identifying data sources for cloud cost, usage, and efficiency data.

  • In the Optimize phase, FinOps activities involve identifying opportunities to improve cloud efficiency using the data and capabilities developed in the Inform Phase.

  • In the Operate phase, FinOps activities involve implementing organizational changes to operationalize FinOps using the data and capabilities developed in the Inform and Optimize phase


FinOps Foundation Phases

This article will focus on the first phase, focusing on informing relevant stakeholders and analyzing data, which empowers users to appropriately budget, forecast, optimize, and measure the value of their cloud resources.

Technical solutions

We have developed several solutions to stay up to date with everything that happens in our Google Cloud organization (and those from our clients). These help us understand the structure of costs, act on time against any unnecessary charges, and prioritize optimizations that we perform on a recurrent basis. These solutions are:

  1. Daily billing report: We use it to stay informed with daily summaries that offer insights into your cloud expenditures.

  2. Monthly billing report: Similar to the daily billing report, we like to automatically receive a report with the costs of the month aggregated by important metrics. It also offers a comparison with previous months to detect trends.

  3. Cost anomaly detection alerting: We receive an alert for each anomaly found in the billing data. It is particularly useful for detecting spikes in costs that would otherwise have been ignored (and can sum up a lot in the long run).

  4. Cost control dashboards: They are a common way to show data and allow for a more in-depth analysis of our costs. A bi-weekly review helps us understand what is happening under the hood.

  5. Budgeting and alerting: Being able to get notified when your expected costs are exceeded is extremely useful. A small reminder to check that everything is under control before it is not anymore.

Deep dive into the solutions

Daily billing report

It is programmed at 13:00 every day for an insightful report on the last’s day expenses. We find it useful for:

  • Tracking the cost per service and project, having a clear picture of the cost structure of your Cloud

  • Identifying potential unidentified costs in unused projects or development projects

  • Finding which services are the backbone of your organization to prioritize potential savings

  • Comparing the costs with the previous day and with the previous month to measure the progress of your cloud costs


Daily billing report


Monthly billing report

Have a clear picture of your monthly costs with a summary that offers insights into your cloud expenditures and the evolution of the cost.

  • Know which projects are the most consuming in your organization

  • Identify services that may not be relevant for your organization that are spending a considerable amount of money

  • Compare the costs with the previous 6 months to analyze your current situation and trends, allowing your organization to take action


Monthly billing report


Having a bunch of dashboards is really useful, but it is hard to find the time to look at them, analyze them, and come to conclusions. By having a daily and monthly billing report automatically in our Slack channel, we make sure to adopt FinOps as a recurrent activity.

Cost anomaly detection alerts

We receive an alert for any anomaly found in our Google Cloud’s billing. Running daily, we receive a report if any potential threat has been identified.

  • Get to know daily potential cost explosions

  • Identify unplanned increasing cloud expenditures

  • Stop paying for unwanted services that are charged monthly


A detected anomaly


Cost control dashboard

We focused on a set of fine-grained dashboards with information about every aspect of your Google Cloud billing costs. Between these, you can find:

  • An overview of your cost usage compared to the amount of credits you own

  • Costs grouped by services and projects, allowing fine-grained control

  • Cost visualization by labels such as team, environment, cost center, business code…

  • Specific dashboard for each main service: cloud storage, compute engine, Bigquery, databases, GKE, networking…

  • Cost analysis and trends

  • Cost per regions

  • BigQuery jobs cost per user, date, project, and query

  • Etc.

You can see two examples of dashboards below.


Cost per service, per month


BigQuery jobs analysis


Budgeting and alerting

Last but not least, we establish budgets in our organization to receive alerts when the budget is reached. These alerts are received by email when specified limits are reached (ex. 40%, 60%, 80%, 100%, 125%…).

This is fairly easy to implement in Google Cloud and it provides a good reminder of what you should be spending. If you reach 60% of the budget on day 5 of the month, you know something is not going according to the planning.


Google Cloud Billing Budget Alert for 'strafty.io - 1' on Feb 26, 2024, showing 60% of the €10,000 budget for Feb 1-29, 2024 has been reached. The budget name is 'main', and specific account details are redacted. Options to view budget details and reports are provided.

Conclusion

FinOps is normally a second-class citizen in every company. Then it starts tickling more and more. That’s the point when people decide to take it seriously. FinOps should start from the beginning, but it is never too late to take it seriously.

We have developed all these solutions to have an inform-driven organization regarding cloud costs. We have identified what are our key costs (and those from our clients) and we are focusing our energy on optimizing those services and applications.

The best of it all is that every solution is automated. We can set up all these solutions in a matter of a day for any organization interested in increasing their Google Cloud cost visibility at no cost.

Thank you

If you enjoyed reading this article, stay tuned as we regularly publish technical articles on dbt, Google Cloud and how to secure those tools at best. Follow Astrafy on LinkedIn to be notified for the next article ;).

If you are looking for support on Data Stack or Google Cloud solutions, feel free to reach out to us at sales@astrafy.io.