Zero User Costs

Zero User Costs

We all recognize that Microsoft Azure is a fantastic cloud provider, offering an array of capabilities highly sought after by organizations. However, one of the challenges is managing the potentially sizable Azure bill if you don't monitor your expenses closely. In collaboration with my colleague Michiel Hamers , we have developed a presentation and framework called the "Four Pillars of Economical Cloud Design." One of the key pillars in this framework is the "Zero User Costs" metric, which we employ to assess and analyze an Azure Cloud environment.

Zero User Costs

You might be curious about the meaning of zero user costs.We define it as "the amount of costs associated with running your cloud environment without any user-based activity." To illustrate this concept, let's consider a non-cloud example. Imagine you own a supermarket, which requires a location, building, inventory, shelves, registers, and employees, among other things. Now, suppose there are no customers for an entire month; you can still determine the cost of that month. The same principle applies to cloud environments and is not unfamiliar in the realm of business economics. this metric is easy to understand and gives many insights.

One way to effectively utilize this metric is by combining it with user activity on a system. Let's say your Zero User Costs amount to 10,000 units (euros or dollars) per hour, and during a particular night, you have minimal activity with only one user making a small purchase from your webshop. You can easily deduce that this single user cost you over 10,000 units at that moment. Ideally, that user would have bought the most profitable item in the store, but more likely, you experienced a significant loss on that sale. The same principle applies to internal systems; if only one user is active, the cost of their activity is over 10,000 units per hour.

So, what factors contribute to zero user costs? First, let's define the scope. As an Azure expert, my focus is on Azure and, in this case, any service related to the application or organization falls within the zero user costs category. However, even this simple explanation has more depth. For instance, you should also include all development, testing, and acceptance environments, if applicable, in the calculation. Doing so enables you to accurately determine the cloud costs associated with a specific application. Don't forget any licensing, Application Insights and storage accounts.

A crucial aspect of gaining insight into these costs is using the right tags for every resource in the environment. This brings me to one of my top recommendations: please tag everything! Proper tagging greatly enhances the management and organization of your Azure environment. So start tagging every stage in your environment!

One graph to rule them all

Zero user costs is indeed an interesting metric, and to truly appreciate its value, it's essential to visualize it in an appealing graph. As Gollum famously said, "My Precious," which perfectly captures my sentiment towards the zero user cost graph. This graph aids in determining various factors when dealing with VM-style or App services-style cloud implementations. I realize I haven't mentioned AKS, but that sophisticated creature deserves its own article.

Upon examining the graph below, you might observe a smooth, linear line representing the accumulated costs for the month of August. You may think that this predictable, stable line is a positive sign. However, appearances can be deceiving!

Geen alternatieve tekst opgegeven voor deze afbeelding

Drawing from our previous supermarket example, it's common knowledge that when the store closes, employees go home and the lights are turned off. This makes sense, as there are no customers, so the store owner shouldn't incur unnecessary costs. The same principle applies to your infrastructure: why would you need all four instances up and running in the middle of the night? A linear line in the graph suggests that you likely have the same compute power available 24/7, which is a waste of money. Additionally, reducing energy consumption and carbon emissions is currently a hot topic for organizations, making it even more crucial to optimize resource usage. So having een Zero user costs which is fixed for each moment in time means an unoptimised cloud environment.

You might be thinking that providing the best possible user experience justifies spending more on potentially unused compute power. While this is a commendable mindset in terms of user experience, the business case may be less convincing. Let's consider a real-life example: say you have an app running on an Azure App Service using a P2V3 App Service Plan, which currently costs €455.62 per month, or €0.61 per hour. It may not seem like much, but even small savings can accumulate.

By implementing good auto-scaling practices, scaling down instances, and using horizontal scaling when needed, you can achieve considerable economic benefits. During daytime hours, when you want similar performance, you can deploy a P1V3 instances, each costing €227.81 per month. Only during 'opening hours' do you need two instances to handle the load. Nighttime hours, from 22:00 to 07:00, have a lower load that can be managed by a single instance.

By using auto-scaling and reducing your zero user costs in the process, your monthly bill would be €370.19. This is already an 18% decrease in costs, just for the App Service. Such savings can be achieved simply by applying scheduled auto-scaling. Apply this on a large scale and you all ready can see the benefits this has.

Implementing auto-scaling based on metrics or events can lead to even greater cost reductions, ensuring that compute power is only used when actually needed. The graph below illustrates the daily cost for an application and serves as a good example. In the beginning, we see a steady, fixed zero user cost due to no traffic on the app. When traffic increases following a new release, costs rise, and then decrease after the load spike, aligning with user activity on the application.

Notably, there is an increase in zero user costs around October 2nd and October 5th. This serves as a valuable indicator for the development team to investigate the cause of the increase. In this instance, increased logging led to significantly higher storage usage. The team added this issue to be addressed in a future release. Without utilizing cost management information in Azure, this problem may have gone unnoticed or been discovered later.?

Geen alternatieve tekst opgegeven voor deze afbeelding

TL;DR

Microsoft Azure offers numerous capabilities, but managing expenses can be challenging. The "Four Pillars of Economical Cloud Design" framework, including the "Zero User Costs" metric, helps assess and optimize Azure Cloud environments.

Zero User Costs represents the cost of running a cloud environment without user-based activity. By combining this metric with user activity and implementing proper tagging and auto-scaling practices, organizations can optimize resource allocation, reduce costs, and improve efficiency. Monitoring zero user costs helps identify potential issues, enabling development teams to address them promptly. Overall, the framework assists organizations in optimizing their Azure environments, reducing expenses, and enhancing efficiency.

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

社区洞察

其他会员也浏览了