While learning to build applications with Azure, developers and architects please learn economic of developing and deploying applications on windows Azure and SQL Azure. I see that developers and architects need to be connected to cost. Your manager would be interested in the following costs, but there is more you can help him.
• Number of hours you’ve reserved a virtual machine (VM)
• Number of CPUs in a VM
• Bandwidth, measured per GB in / out
• Amount of GB storage used
• Number of transactions on storage
• Database size on SQL Azure
• Number of connections on Windows Azure platform AppFabric
Effectively if the resources are used well, we save cost. If the resources are not used optimally, then we lose money. How can one take responsibility during application development to optimize Azure costs for deployment?
1. Extra Small Windows Azure instance is for the purpose of development and testing.
2. Windows Azure compute hours are charged only for when your application is deployed, Partial compute hours are billed as full hours.
3. Large allocation of shared resource helps in higher I/O performance.
4. License for the Windows Server 2008 R2 is covered through the Windows Azure VM Role licensing
5. You can’t change VM Size once you’re running your application
6. Hoe many number of hours of the application translates business?. When one deploys application, performs some operation and forgets to turn them off after use, one is charged for the unused compute power. Please un-deploy the application as soon as possible to stop paying for any inactive applications
7.How to decide the number of web roles and Worker Roles?. One can use one web role and one worker role. When we scale, we need to identify whether we need to decide whether we need to scale as two web role and two worker roles or two web roles and one worker role.
If the web role and storage are located in the same region (Both in “North America” for example), there would be no bandwidth bill for communication between Web role and storage.
o Keep Azure services coupled within the same Azure region.
o One can make use of CDN for cost-reduction measure, as it gets cached locally
o Keep in mind that cache expiration time can create challenges
People store session data in Azure blobs and table storage and the storage and transaction of writing and reading impacts the cost of deployment. Hence please separate the structures and data that needs to be placed in the session . Please also look at the article Understanding Windows Azure Storage Billing – Bandwidth, Transactions, and Capacity , Windows Azure Storage Abstractions and their Scalability Targets, How to get most out of Windows Azure Tables
Transactions :Every operation on a storage account is a transaction. Be smart of the operations that count as transaction.When performing an operation such as blob storage, for example, you would first check if the blob container exists. If not, you would have to create it and then store a blob. That’s at least two, possibly three, transactions. The same counts for hosting static content on blob storage. If you have n images to display on page, you can run up to 2n transactions or more. One can reduce to n +1 transaction just by removing the check whether the blob container exists or not to once at startup.