Calculating the cost consumption for a solution that runs in cloud can be sometimes challenging. First of all you need do a forecast of how many resources are required and secondly you need to put on the paper all things that are billable by the cloud provider.
Azure Price Calculator
The pricing calculator offered by Microsoft for Azure is a nice tool, that helps you to take into account all the items. It is able to persist the cost even if you close the tab and when you are done you can export it to an excel file. For basic estimations is good, but I expect that you'll end up pretty fast with a complex excel.
In the last few years, I was involved at least 2 time per month in Azure consumption estimations for different projects - from the small one that consume a few hundreds of euros per month to big ones where you end up with a bill that has six or seven figures per year.
You'll find different templates on the internet that you can use and don't be surprise if you end up creating your own template.
Tips and Tricks
I have a list of items that I take into account when I do price estimations for Azure. It doesn't covers everything, some things I ignore and other I consider them by default added them to the cost estimations. It's only a checklist for me, that I decided to share with others.
Things to consider
- Special support from Azure (premier support)
- In general computation is the main driver cost, but don't be surprised is traffic will also be around 20-30% of your cost, especially in IoT era
- Development, integration, testing environment also cost money, deallocate them when you don't use them
- Development, integration, testing environment don't need to run at full capacity
- Select the right tire - to big is just waste of money
- Change the tier based on your needs (not only VMs, also SQL tier)
- VMs disk are not included in VM price and needs to be included in estimations. You pay only what you use
- Outbound traffic from VM
- The minimal number of VMs of computation units is 2, never 1
- Scale down when you don't need all the power
- Outbound traffic for Azure Storage (blobs, Azure Table)
- Outbound traffic when you do a sync between two different Azure Regions (storage, DB, ...)
- Storage cost for backups
- Cost of transactions, especially on Azure Tables
- Size of the logs
- Use CDNs as much as possible
- Non-critical use cases can implement a back-off mechanism for cost optimization (reduce number of transactions)
- Storage cost of SQL Azure backup
- Outbound traffic for Service Bus, Event Hub and other messaging system
- Number of events price for Event Hub
- Number of messages for Service Bus
- Number of users
- Multi-factor authentication
- Number of applications
- Minimum number of VMs in cluster (is not 2)