Click here to Skip to main content
Click here to Skip to main content

Azure Contest: Cost Profiling\Tracking

, 1 May 2013
Rate this:
Please Sign up or sign in to vote.
Adding cost counters to accurately monitor your application as it uses Azure services

Please note

This article is an entry in our Windows Azure Developer Challenge. Articles in this sub-section are not required to be full articles so care should be taken when voting. Create your free Azure Trial Account to Enter the Challenge.

Introduction

  I've been working on ASP.NET applications for the better part of 10yrs, and for all of them they have ran within datacenters on dedicated servers. Provisioning a couple of VMs for a new application, or adding a few more to an existing one wasn't such a big deal, the cost of doing so was basically nil--though when you need to buy more servers that is when things can get more expensive.

Azure turns this around by promising virtually unlimited capacity and frees you from having to worry about capacity planning, hardware maintenance, OS patching--at the expense of charging on a pay-as-you-go pricing model, and this is what has kept me out of the cloud. How exactly can you mitigate out of control costs without just taking your site offline--or better, prevent it from happening on your production site?

The Application

Microsoft has done a good job with creating performance counters to monitor all aspects of your application from a performance perspective. What I am going to do for this contest is build out cost counters so that you can monitor and track all activities within your application that incur a cost. This will yield two benefits:

  1. Real time tracking on which areas of your application are incurring costs
  2. For multi-tenant applications, those charges can be associated to the tenant(s)

The goal then will be to load test the application for performance issues, but also to find any changes in the costs for running the site--which is something I have never had to worry about!

The application will start as a generic\demo web site with the cost counters integrated. Enough of the Azure platform will be leveraged to give a feel of what types of data points we can capture: Compute\Storage\Bandwidth, etc. and the granularity they can provide.

With these data metrics captured, I will then build out the framework to store real time data to storage.

Each day, a batch job will kick off to process the prior day's data and roll it into a full day's summary and tie it back to the application\tenant. This will be saved off to a database for easier access for reporting, which is the final part of this application.

Once everything is in place, we can create real time reports and summary reports. This would be most useful to send out alerts via push notification\email whenever the costs deviate from the norm. Further, it will assist is validating a pricing model against a tenant's usage to make sure the model works.

If all goes well, it means load testing should find any performance issues as well as any increases in cost for your azure application.

History

  v1.0 Contest 1 challenge: Application description (Done!) Smile | :)

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

Farcus32
Software Developer
United States United States
No Biography provided

Comments and Discussions

 
-- There are no messages in this forum --
| Advertise | Privacy | Mobile
Web01 | 2.8.140709.1 | Last Updated 2 May 2013
Article Copyright 2013 by Farcus32
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid