This website uses cookies. By using the website you agree with our use of cookies. Know more

Technology

Cloud Hosting Cost Types

By Anderson Oliveira
Anderson Oliveira
Product mindset driven. FinOps enthusiastic. Looking for the next new thing while keeping with the classics, like Saint Laurent.
View All Posts
Cloud Hosting Cost Types
One of the main advantages of a cloud environment is the great amount of data it produces about itself; Be it regarding performance, security, reliability, usage, etc. The billing data is not behind on this matter. With millions of records produced every day, it is important to sort them out wisely so that the data obtained can turn into valuable information for better business and technical decisions.

Cost data is at the core of the Billing Data. Although the word "cost” gives the impression of having a straightforward meaning, there are variances we will cover next, to help you extract the information you need from billing data.

At FARFETCH, for cloud hosting, we use three different cost concepts: Full Cost, Amortized Cost and Blended Cost. We will define each in more detail, but first let’s define Commitment Based Discount (also known as Reserved Instance), as it plays an important role in the cost type differentiation.

Commitment Based Discount

According to FinOps Foundation, Commitment Based Discount means:

"Each Cloud Service Provider (CSP) provides customers the ability to discount on demand rates for cloud services used in exchange for a commitment to use minimum level of resources for a specified term. Depending on CSP and the cloud services used, the commitment may be based on the upfront payment for a certain number of resource units, time units or monetary value, with various payment options and timeframes"

Different CSPs call commitment-based discounts by different names. When it comes to Azure, Commitment Based Discount is the same as Reserved Instance (RI). For Azure China, it is called Compute Pre-Purchase (CPP).

The great advantage is the discount, as it has the potential to reduce costs by 60% on the overall cloud bill. The flip side of it is the challenge to allocate costs evenly among stakeholders that use shared resources. This will become more clear when we cover the different types of costs.

To learn more, check How an Azure reservation discount is applied | Microsoft Docs.

Full Cost

This is as simple as the unit price times resource quantity. Two things are important to note here:
  • The price is the one negotiated to FARFETCH. Due to the amount spent with cloud, FARFETCH may obtain a lower price compared with the RSP (retail selling price).
  • This price does not take into consideration any type of Committed Based Discount.
So the Full Cost is the one as if there weren’t any RI or CPP. The Full Cost can be used to measure the cost before any Commitment Based Discounts; That is good to compare with our overall discount strategy, but it is not appropriate when you want to see how much we really paid to the CSP.

For that, we can use the Amortized Cost.

Amortized Cost

When an RI is acquired, it applies the discount to resources based on the selection criteria of the RI. This discount means that the price applied to a certain resource will be even lower than the RSP or FARFETCH negotiated rate. Here is a great example from Microsoft that will help in understanding the concept.

… amortization splits the purchase price of your reservations into daily chunks and allocates these out to the resources that received the benefit. Let's say you purchased a VM reservation for $365 on January 1. Enabling amortization will show $1 every day throughout the year. If your VM ran the full day, it'll get the full $1 for that day. If you only run it for 12 hours one day, then you'll see $0.50 for the VM and $0.50 for the unused reservation. This is a loss from your pre-paid, reserved capacity, so you'll want to keep an eye on that.

Amortized cost is the one that is strictly related to the cost of that specific resource, taking into consideration the discount applied due to the Commitment Based Discount (which includes the cost of purchasing the RI amortized throughout the RI period). 

The other aspect that should be considered is the random characteristic. For example, if the consumption of a certain Virtual Machine family is higher than the Reservation purchased, the CSP will randomly choose which VM the discount will be applied to, within the scope of the Commitment Based Discount (e.g., Shared, Management Group, Subscription, or Resource Group).

The challenge of this randomness is the impact on cost allocation if it were based on Amortized Cost. If two microservices use the same quantity of a Virtual Machine family that is eligible for a commitment-based discount, it’s possible that each microservice will be allocated with different costs.

That’s why it is necessary to create a way to fairly distribute costs between teams.

Blended cost is the answer to this problem.

Blended Cost

Blended Cost equally distributes the discount we get from buying Commitment Based Discounts. Here are the steps to calculate it.
  1. Sum total Amortized Cost for each PartNumber for each day
  2. Sum total Quantity that has the same PartNumber/Date criteria as you used in step 1
  3. Divide Step 1 by Step 2 to get the Blended Price per day for each PartNumber
  4. Multiply the quantity used for each PartNumber by Blended Price to get the Blended Cost

Let’s consider a hypothetical scenario to better illustrate Blended Cost.
 
Suppose that two teams have one service each. Those services have no correlation with each other and belong to completely separate business units. Those services are built on top of the E8d_v5 Virtual Machines family, i.e., each service uses 1 VM each.  Suppose as well that the VMs are covered by Reserved Instances (RI), but the RI purchased is enough to cover just one of the services. This means that Azure will randomly choose which service will be billed using Commitment Based Discount and which will be billed using a pay-as-you-go price.

If we allocate cost just using the Amortized Cost criteria, Service A would get a lower cost than Service B, although both have used the same amount of hours. By using the Blended Cost criteria, while the total amount paid remains the same, both services A and B receive the same cost allocation, which is fair for both teams.


Blended Cost allows teams to abstract themselves from the complexity of Commitment Based Discounts and Pay-as-you-go costs. All of that so the teams can exercise their ownership of cost, focused on the cost factors they can control like code optimisation, right-sizing, VM family selection, storage type, etc.

Conclusion

Full, Amortized or Blended cost. There is no right or wrong cost type. What matters is the intent of the analysis you want to make. For that, it is very important to know the meaning of each one of them so you can correctly decide which one to use.

Additional Resources



Related Articles
How to Swiftly A/B Test Recommendations From the Inside, Rocket-Style
Technology

How to Swiftly A/B Test Recommendations From the Inside, Rocket-Style

By Nelson Gomes
Nelson Gomes
From teacher to software engineer, living my learning journey to happiness on my New Balance sneakers.
View All Posts
Paulo Ventura
Paulo Ventura
Passionate about technology and delighted by a good challenge. Love to explore nature and wearing Adidas.
View All Posts
View