One of the biggest questions you will be asked as you investigate moving workloads to the cloud is, How Much is this going to cost? This article will review a process, resources and questions you need to answer to provide realistic cost estimates to get more out of the Azure Pricing Calculator.
The key to realistic cost estimation is to look at the various elements within your architecture, determine the range of capacity requirements those need, and then determine how they are billed. Make sure that you look at this both initially during development as you may have a large initial load of history, plan for the initial production and then plan for growth.
Cost estimates focus on what usage patterns and volumes you are currently using if this is a migration project or what usage patterns you expect to have in the near term. Costing also leads to ongoing cost management, which we will wrap-up with at the end of the article.
We could get into the weeds on many aspects of this topic, such as
- Free services
- Pay as your GO
- Do you have an Enterprise Agreement?
- Can you pre-buy services such as saving costs for Azure Synapse Analytics charges with reserved capacity.
Note: There is also a great article, Determine what reservation to purchase, that goes into detail on metrics in Azure around an analysis of your daily usage patterns that help determine your baseline usage, which will help you determine if you are better to purchase using benefit.
Azure Architecture Elements
The key to starting well is to have a good plan on what you are trying to develop, focusing on detailing what business problem you are addressing with your solution. As an example, we are going to use the reference architecture pictured below at a high level.
There are several common elements to any architecture, so let’s review some of the basics we need to examine.
Note: There can be many moving parts to any solution architecture. Use this as a guide on some of the things you need to look at, but every solution is slightly different.
Network Bandwidth Costing
What I would look at there is the bandwidth plus moving data between data centers. Detail can be found under documentation, however bandwidth refers to data moving in and out of Azure data centers, as well as data moving between Azure data centers and other transfers are explicitly covered by the Content Delivery Network, ExpressRoute pricing , or Azure Peering Services. See also Choose between virtual network peering and VPN gateways.
Block Blob Storage is used for streaming and storing documents, videos, pictures, backups and other unstructured text or binary data.
The total cost of Block Blob Storage depends on:
- Volume of data stored per month
- Quantity and types of operations performed, along with any data transfer costs
- Data redundancy option
- Storage tier
The link above leads to costing on the various storage types;
- Block Blobs
- Azure Data Lake Storage Gen2
- Managed Disks
- Page Blobs
You can find more information on storage account types, and redundancy in the article Azure Storage Overview pricing
Next – Costing More Complex Azure Data Services
Now that we have a place to cost data storage, including movement between datacentres, we can look at the more complex services in our architecture. We will use the following diagram as an example to review costing decisions and capacity planning. Rather than cover every detail, I will hit some of the more essential elements and provide links to more information.
Note: See Azure data platform end-to-end for more detail on the example architecture in the diagram.
The key to getting good numbers is in determining the usage patterns of that architectural element of a solution your workload requirements may have, such as;
- maximums loads
- minimums and running loads
- edge cases such as history loads
- what seasonality fluctuations, such as back to school, year/quarter-end rush
Factors in Costing SQL Server
The data side of the architecture typically provides most of the questions and contains more variability in costing for most solutions. Databases, especially SQL Server, have many available architectural options, including the type of hosting as pictured below from the Costing Page.
Performance Typically the DBA team will want to determine whether the SQL Server or other database system performs optimally. They will take performance measurements regularly over time, even when no problems occur, to establish a server performance baseline you currently have. This can help a migration team develop a level of performance and service they plan to have in new solution architectures.
Licencing There are a couple of ways to look at this. Bring-Your-Own-Licence (BYOL) can be used if you have on-premises client access licences (Cals) that can be brought over. If not, Pay-As-You-GO (PAYG) options are available, which are built into the costs.
The following areas affect the performance of SQL Server:
- System resources (hardware)
- Network architecture
- The operating system
- Database applications
- Client applications
At a minimum, use baseline measurements to determine:
- Peak and off-peak hours of operation.
- Production-query and batch-command response times.
- Database backup and restore completion time
The following references in the links provide more detail on how to do this.
Monitoring performance using the Query Store – The SQL Server Query Store feature provides you with insight on query plan choice and performance. It simplifies performance troubleshooting by helping you find performance differences caused by query plan changes. Query Store automatically captures a history of queries, plans, and runtime statistics and retains these for your review.
Choose between the vCore and DTU purchasing models – Two different purchasing models, Virtual Core (vCore)-based purchasing model (recommended). This purchasing model provides a choice between a provisioned compute tier, plus a serverless compute tier and a Database transaction unit (DTU)-based purchasing model. This purchasing model provides bundled compute and storage packages balanced for common workloads.
- vCore model overview
- Service tiers in the DTU-based purchase model
- Migrate Azure SQL Database from the DTU-based model to the vCore-based model
Query Performance Insight for Azure SQL Database – Query Performance Insight provides intelligent query analysis for single and pooled databases. It helps identify the top resource consuming and long-running queries in your workload.
Troubleshoot with Intelligent Insights – This page provides information on Azure SQL Database and Azure SQL Managed Instance performance issues detected through the Intelligent Insights resource log.
Pricing Azure Data Factory Can Get Tricky
Azure Data Factory is the data and process orchestration layer for many solutions. For those new to the platform, the article, Understanding Data Factory pricing through examples provides a great walkthrough of pricing concepts for this service through several examples.
As pictured below, Pricing for Azure Data Factory varies with how you are using it.
Azure Databricks is a data analytics platform hosted in the Microsoft Azure cloud services platform. The service has two environments for developing data-intensive applications: Azure Databricks SQL Analytics and Azure Databricks Workspaces.
As pictured below, Azure Databricks pricing varies with your needs from the platform and the scale of performance. The key metric is that the platform can be a Pay-as-you-Go or has a pre-purchase reserved pricing option.
Cosmos DB Pricing
Cosmos DB costing is a little harder to price out as there are so many features and scale options. It is a fully managed NoSQL database service. Some of the features that affect pricing include;
- Get guaranteed single-digit millisecond response times
- 99.999 percent availability, backed by SLAs,
- Automatic and instant scalability,
- Open-source APIs for MongoDB and Cassandra.
- Enjoy fast writes and reads anywhere in the world with turnkey multi-master global distribution.
Pricing can be variable due to the service model you choose as there are virtually unlimited throughput and storage levels. With automatic, elastic scalability across regions, and consumption-based serverless options, estimations of the service cost can become more difficult but vary with usage and as you grow.
How to Monitor Azure Data Services
A different conversation surrounds cost management once you have deployed in Azure. I want to provide a couple of useful resources to monitor your costing and activity to ensure your actual usage matches your plan. Here are a couple of resource links to get started.
Youtube: How to use Azure Cost Management views | Azure Portal Series – Part of the Azure Portal “How To” series. The video covers the built-in cost views in Microsoft Azure Cost Management and how to create custom views.
Azure Cost Management and Billing – An Azure service and tools included in your Azure subscription to get more value out of the cloud and implement financial governance in your organization.
Tutorial: Explore and analyze costs with cost analysis – A great way to see what you can do, is by reviewing a quick start. Here you use cost analysis to explore and analyze your solution and organizational costs. You can view aggregated costs by an organization to understand where costs occur over time and identify spending trends. You can view accumulated costs over various time intervals to estimate monthly, quarterly, or even yearly cost trends against a budget.
Doing upfront planning for your solution’s costing can be tricky but needs to be done to make sure you set up, run and pay for only what you need. The combination of tools and having a good handle on your requirements can bring you to success.
The following references are included here so that you can go on a deeper dive into the topic. Costing is a complex exercise as it requires quite a bit of detail, but once you get started, it is an important process so you can control your spending.
Private Cloud Planning Guide for Infrastructure as a Service (IaaS) – A little out of date, but great theory and process review.
Azure Cost Management + Billing documentation – Azure Cost Management + Billing helps you understand your Azure invoice (bill), manage your billing account and subscriptions, monitor and control Azure spending and optimize resource use. Learn how to analyze costs, create and manage budgets, export data, and review and act on recommendations.
Plan to manage Azure costs – This article helps you get started with how to plan to manage your Azure costs. When you sign up for Azure, there are several things you can do to get a better idea of your spending:
Storage and SQL Server capacity planning and configuration – SharePoint Server – This is for SharePoint; however, it has a good number of definitions and design considerations discussions
Video Set – Azure SQL Capacity Planning
- Azure SQL Capacity Planning: Scenarios – Links to more detail inforamtion and videos.
- Part One – Azure SQL Capacity Planning: Overview
- Part Two – Azure SQL Capacity Planning: DTU or vCore?
Interesting Value Add – Infrastructure as Code Videos 🙂
The following two links are an interesting topic called “Infrastructure As Code” Being able to deploy your solution into infrastructure using code rather than building by hand. This gives you the ability to use CD/CI in your solution development and deployment.
Infrastructure as Code and Azure – A Match Made in the Cloud (Part 2) – In the second part of this two-part series, Hamish Watson shows us how to use infrastructure as code to deploy an Azure Kubernetes systems cluster.
Infrastructure as Code and Azure – A Match Made in the Cloud (Part 1) – In the first part of this two-part series with Hamish Watson, we will look at the various methods available to deploy an Azure SQL database, including PowerShell, Azure CLI and Terraform. Creating resources has never been easier or more standard than what we have now.