Managing Azure Costs - Tips and Tools

Managing Azure Costs - Tips and Tools

Reduce cloud spend and optimise performance with tips and advice for Microsoft Azure.

Azure offers astonishing flexibility and choice, but managing costs can be challenging. Cloud computing can be cheaper than traditional on-premises IT, but it can be very expensive. Cloud computing costs can creep up on teams without careful planning and control.

We help teams plan cost-efficient Azure cloud solutions and help investigate issues that arise.

Why is Azure cloud cheaper (sometimes!)?

At its heart, cloud computing isn’t all that different to on-premises IT. Ultimately, the cloud is just a network of data centres with servers and networking. Obviously, there’s more to it – power, heating, cooling, fire protection, physical security etc. But a well-run on-premises data centre will have solved the same problems.

What allows Azure to be cheaper (or at least more cost-effective) is the sharing of infrastructure. Cloud computing is multi-tenanted. Many customers share the servers and infrastructure.

The multi-tenant nature of the cloud is fundamental to a key benefit beyond cost: flexibility. Resources can be scaled down when demands are low. When demand increases, the same resources can be scaled up (or additional resources deployed).

The Azure business model is based on their customers needing resources at different times. Their peak load is averaged across their customers. This load balancing allows Azure to share costs across their customers.

Why is Azure cloud more expensive (sometimes!)?

The constraints of on-premises IT simplify cost planning. A new project needs some se of a particular spec. These are quoted, purchased and deployed. The costs are depreciated over their life as ordinary capital expenditure. These fixed costs are simple and predictable.

The fixed nature of the capex costs is a limit to the costs. The IT equipment physically exists and has already been paid for. The disadvantage is the initial capacity planning. The fixed nature leads architects to plan for peak loads and can lead to over-estimating capacity. This excess capacity is often wasted.

The flexibility of cloud computing can make cost planning harder. Many cloud costs are directly related to demand. When demand increases, many of the costs increase.

There are other reasons why cloud costs can be greater than on-premises IT. Traditional IT required complex approval and provisioning processes. Cloud resources are often much easier to create.

Seven tips for managing Azure costs

  • Tip #1 – Good architecture and planning

    The design of an application often makes the most significant difference in cost. The architecture must consider the solution’s actual requirements.

    It’s easy for architects to over-engineer solutions. After all, it’s usually easier to remove features that turn out not to be needed than it is to add them in later. If required data isn’t stored, it may be uncoverable.

    Effective cost control needs a product’s owner to define the non-functional requirements for the solution. For example, what availability is required? What resilience to outages is required? What is the cost to the business if the solution is unavailable for a time? How responsive does the solution need to be to meet users’ expectations?

    The solution’s NFRs will drive key architectural decisions around whether multiple data centres should be used to improve availability and resilience.

    Reserved instances can reduce costs when a base level of capacity is expected. Azure offers significant discounts for solutions that can commit to agreed consumption. Importantly, this commitment can usually be applied across multiple subscriptions. This flexibility allows commitments to be consumed by applications that are otherwise separate. The reservations can also be switched to different Azure regions as required.

  • Tip #2 – Select the right resource types

    Azure offers a vast list of resources. These resources can deliver very similar features for sometimes significantly different costs. Solution designers must consider which features of a resource are required and whether alternative resources could meet their needs.

    For example, Azure SQL Database and Azure Cosmos DB both store data. Both resources could work for a wide range of applications. For many applications, the end user wouldn’t notice any difference. However, the access patterns for the two resource types are significantly different. Azure SQL Database may be more cost-effective than Cosmos DB when working with less data. Cosmos DB might prove less expensive when a solution needs to write high volumes of data with less frequent (or more specific) read requests.

    In some scenarios, a hybrid design might be the most cost-effective strategy. In the above example, one possible approach is to write the incoming data stream to Cosmos DB. Azure SQL Database would store a subset of the structured data. This structured data would include indexes to the Cosmos DB data, allowing an efficient query pattern.

  • Tip #3 – Select the right SKUs

    Beyond selecting the right resource types, the next decision is selecting an appropriate SKU. Most resource types have different options that balance performance, availability, features and cost.

    Some more expensive resource SKUs support features that actually reduce costs. For example, “standard” App Service Plans cost more than “basic” plans but support automatic scaling up and down. Auto-scaling helps reduce costs when demand is lower while maintaining performance when required.

    Other resource types have different charging models. Selecting the most cost-effective SKU requires the solution designer to understand how the resources will be used. For example, Azure SQL Database supports a DTU or vCore pricing model. The DTU model is often a good choice when the storage and compute needs of the database scale up in similar amounts. The vCore model can work well if, for example, the compute needs are low but the storage needs are high. Other factors such as how volatile the access patterns are can also affect the decision.

  • Tip #4 – Monitor usage levels

    Proactive monitoring can help identify increased consumption before the costs become significant. Reviewing how the resources are performing can help find ways to reduce costs. Under-utilised resources can be scaled down or reconfigured. Consolidating resources can also help, where appropriate.

    Configure resources with intermittent use to run on demand or to a schedule. Some simple automation scripts can generate significant cost savings.

    Metadata helps manage costs. Consider tagging resources with attributes, for example, cost centre, department, project and environment. These tags allow a more in-depth analysis of costs. It can also help to compare the cost of similar services by different projects.

To find out more, please contact us...