I’ve used and worked with Microsoft Azure for a decade now. Often I’m working in customer subscriptions, and don’t have to worry about the cost that much. Obviously many times customers are querying about long-term cost, and what operating expenses they should plan and budget for.
My own Azure subscriptions are financed by myself, and I get some credits through the Microsoft MVP program also. I try to minimize services that cost more, and often use free tiers or shutdown and destroy instances I don’t need for a few weeks.
I wrote about tracking and working with AKA.MS URLs in March this year. In essence, it’s a small solution that triggers whenever someone tweets anything that matches http[s]://aka.ms, resolves the actual URL and its title, and stores the results in an Azure SQL database.
The service has been running great for over a year now. The earliest timestamp in my database for a captured URL is from April 2018. In total, I have 145,487 URLs collected since then.
The solution consists of a few Azure Functions that parse and process data, a Logic App that captures Twitter data, and the Azure SQL database for storing data.
Relevant bits of the solution are:
The cost per month is about 26 € for this solution. In my original article, I had a much lower cost estimate, but this changed as I saw the amount of data growing rapidly. The Azure SQL database started choking, as I was using the cheapest (and most limited, in terms of performance) tier. You can see from mid-July the moment I upgraded the Azure SQL database:
The database is responsible for over 80% of the overall cost. Logic Apps is 17%, and Azure Functions, App Insights and Storage only about 1.3% of the overall cost.
I’m using Cost Analysis, which is part of Azure Cost Management to track these. It allows for setting a budget also. To verify if I need a budget, I’m using ShareGate’s Overcast service to create a CostHub to track cost over time.
I see that the costs for my akaMS solution fluctuate quite a bit:
Once again, thinking I know how much my solution costs is not equivalent to actually tracking and monitoring cost.
So, I end up paying about 26 € each month for a service that stores URLs from Twitter to a database. I already mentioned I had 145K URLs stored, so let’s have a quick peek at the results.
I’m currently executing about 40,000 AKA.MS lookups per month, but about 7,000 of these fail for numerous reasons. Often because the URL is not valid, inaccessible or it contains something weird. Sometimes it’s simply because the Twitter connector is lagging, or producing garbage:
This resulted in about 6,000 unique URLs in my database. As such, over 95% of all URLs captured are duplicates. Twitter is full of chatter, for sure!
I really like that the solution captures content with emoji’s also!
Perhaps my solution could use some optimization, but at the rate, it’s currently running I’m perfectly fine with the accruing costs. The beautiful aspect of Azure and a solution like this is that I get to scale everything to a minimum if I need to. That essentially cuts my cost from 26 € to around 5 € for the month. And the service still runs, but obviously would produce a challenge in ingesting all that data I’m getting.
The lesson for me is to keep a better eye on costs, and perhaps set a budget. This is especially important now that the summer holiday season is over and more content is anticipated again, than last year.
I work with Azure and frequently write about my experiences. Former Microsoft Most Valuable Professional & Microsoft Regional Director, ex-MSFT. Based in Helsinki, Finland.