Finance and DevOps
Learning Objectives
- You know of costs involved in using cloud computing resources and know the term FinOps.
Cloud computing resource costs
The use of cloud computing resources is charged based on a range of factors. In general, the hardware type and amount, storage type and amount, and network usage all contribute to the overall costs. While a small shared virtual server with little persistent storage and low traffic can be acquired for a few euros per month, the costs start to accumulate with increasing resource requirements.
For a 3€ / month cloud server, see UpCloud.com. Some cloud computing providers also offer a so-called free-tier, where users can use a certain amount of resources for free before being billed.
Being unaware of the components that contribute to the overall cost of a cloud service can be a surprise. This can hold especially if one is migrating to the cloud from a self-hosted environment, where the costs are typically fixed and known in advance. Traffic into the cloud service — ingress traffic — is often free, while traffic out from the cloud service — egress traffic — can come with costs. Traffic within the same zone network of a cloud provider is also typically free, where services in the same zone can communicate with each other without additional costs.
Cost calculation example
Small issues can have a big impact on the costs.
As an example, assume a website that uses Bootstrap and jQuery for styling and interactivity and that the files are self-hosted and not compressed. In uncompressed format, the two take approximately 300 kilobytes of data. Further, assume that the caching is broken or has not been properly configured.
If the website has 800,000 page loads per day, and caching is broken or has not been configured, the amount of egress traffic solely due to the JavaScript and CSS is 7.2 terabytes per month. If the cloud provider charges 8.5 cents per gigabyte of egress traffic, the traffic for JavaScript and CSS alone costs over 600 euros per month.
Now, if the JavaScript and CSS data is compressed to approximately 80 kilobytes, and the caching has been configured and it works with a hit ratio of 90%, the egress traffic is considerably lower (192 gigabytes per month). With the same pricing, this, then, costs around 16 euros per month.
Finally, if the two libraries are often hosted on a CDN, the costs can be even lower, as the CDN can cache the files and serve them to the users without the need to fetch them from the origin server.
Now, next, think of a service like YouTube. YouTube focuses on serving media, has over a hundred million active users per day, and serves more than 1 billion hours of content per day. Going at the rate of 8 cents per gigabyte, this would cost somewhere around 80 million euros per day, assuming that an hour of video takes one gigabyte of data. Per month, the egress cost would be 2.4 billion euros.
It’s likely not surprising that YouTube does not pay 2.4 billion euros per month to cloud providers just for the video traffic.
FinOps
With projects that require lots of resources, the costs can quickly accumulate if not being monitored and controlled. The need to understand, maintain, and control cloud computing costs has led to a cultural practice called FinOps. FinOps is mix of “Finance” and “DevOps”, emphasizing the need for communication and collaboration between engineering teams and finance teams.
The goal of FinOps is to ensure that the cloud computing costs are kept under control, and that the cloud computing resources are used in an efficient manner. This can be achieved by monitoring the costs, setting budgets, and optimizing the usage of the resources.
For additional information, see FinOps.org.
In practice, cloud computing is not a silver bullet that always saves costs. With high volumes of traffic, self-hosting can be more cost-effective, while the same can also be true for low volumes of traffic. At the same time, all hosting options have their own benefits and drawbacks, and require competence in different areas.
There exists a range of monitoring services like OpenCost that allow monitoring and estimating costs. The major cloud computing platforms also offer their own cost monitoring tools, like AWS Cost Explorer, Google Cloud Cost Management, and Azure Cost Management.