Monday, March 21, 2016

Cost Optimization Tips for Azure Cloud-PartII

Cloud computing comes with myriad benefits with its various as-a-service models and hence most businesses consider it wise to move their IT infrastructure to cloud. However, many IT admins worry that hidden costs will lower their department’s total cost of ownership. 

We believe that it is more about estimating your requirements correctly and managing resources in the right way.

Microsoft Azure Pricing


Microsoft Azure allows you to quickly deploy infrastructures and services to meet all of your business needs. You can run Windows and Linux based applications in 22 Azure data-center regions, delivered with enterprise grade SLAs. Azure services come with:

  • No upfront costs
  • No termination fees
  • Pay only for what you use
  • Per minute billing

You can calculate your expected monthly bill using Pricing Calculator and track your actual account usage and bill at any time using the billing portal.


How To Save Cost On Azure Cloud?


1. Azure allows you to set a monthly spending limit on your account. So, if you forget to turn off your VMs, your Azure account will get disabled before you run over your predefined monthly spending limit. You can also set email billing alerts if your spend goes above a preconfigured amount.

2. It is not enough to shut down VMs from within the instance to avoid being billed because Azure continues to reserve the compute resources for the VM including a reserved public IP. Unless you need VMs to be up and running all the time, shut down and deallocate them to save on cost. This can be achieved from Azure Management portal or Windows Powershell.



3. Delete the unused VPN gateway and application gateway as they will be charged whether they run inside virtual network or connect to other virtual networks in Azure. Your account will be charged based on the time gateway is provisioned and available.



4. At least one VM is required to be running all the time, with one reserved IP included in 5 reserved public IP in use, in order to avoid reserved IP address charges. If you down all your VMs in service, then Microsoft is likely to reassign that IP to some other customer’s cloud service, which can hamper your business.



5. Minimize the number of compute hours by using auto scaling. Auto scaling can minimize the cost by reducing the total compute hours so that the number of nodes on Azure scales up or down based on demand.



6. When an end-user's PC makes a DNS query, recursive DNS servers run by enterprises and ISPs cache the DNS responses. These cached responses don't incur charge as they don’t reach the Traffic Manager Name servers. The caching duration is determined by the "TTL" parameter in the original DNS response. With larger TTL value, you can reduce DNS query charges but it would result in longer end-user failover times. On the other hand, shorter TTL value will reduce caching resulting in more query counts against Traffic Manager Name server. Hence, configure TTL in Traffic Manager based on your business needs.

7. Blob storage offers a cost effective solution to store graphics data. Blob storage of type Table and Queue of 2 GB costs $0.14/month and type block blob costs just $0.05/month.

A SQL Database of similar capacity will cost $4.98/month. Hence, use blob storage to store images, videos and text files instead of storing in SQL Database.


To reduce the cost and increase the performance, put the large items in the blob storage and store the blob record key in SQL database.

Above tips will definitely help you cut cost on Azure and leverage the power of cloud computing to the best!

Related Articles : Cost Optimization Tips for Azure Series

Part 1: Cost Optimization Tips for Azure Cloud

Part 2: Cost Optimization Tips for Azure Cloud

Part 3: Cost Optimization Tips for Azure Cloud

Wednesday, March 2, 2016

Cost Optimization Tips for Azure Cloud-Part I


In general there are quite a few driving forces behind rapid adoption of cloud platforms off late, but within the industry Cost saving has been one of the most talked about reasoning. Though the key benefit from public cloud providers like Azure is its pay-as-you-go pricing model which makes customers immune of any capital investment.


But still If you observer it closely ,you will notice that the expenses in cloud start to add up and can soon get out of control if we are not practicing effective cost management. It needs attention and care to “Take Control over Your Cloud Costs” and decide about a better cost management strategy.

Under these Articles I will try to outline few of the Azure’s cost saving and optimization considerations .Its gonna be 3 part article first of this can be subtitled as “7 consideration for highly effective azure architecture “ because it covers the stuff from an architect’s point of view---

1. Design for Elasticity
Elasticity has been one of the fundamental properties of Azure that drives many of its economic benefits. By designing you architecture for elasticity you will avoid Over Provisioning of resources, that way you should always restrict yourself to use only what is needed. There are umbrella of service in azure which helps customers getting rid of under-utilization of resources. (Always make use of services like VM scale set & Auto scaling).
2. Leverage Azure Application Services (Notification, Queue, Service Bus etc.)
Application services in azure doesn’t only help you in performance optimization but they can greatly affect the cost of overall infrastructure. Judicially decide on which all are the service needed for your workload and provision them in optimum way. Make use of the existing service don’t try to reinvent the wheel.
When you install software’s to suffice the requirements there is a benefit of Customize features but the trade-off is immense you have to have an instance for this which intern restrict the availability of these software’s by tying in to a particular VM. Whereas if you choose different services from Azure you enjoy the inbuilt Availability, Scalability and High Performance with option of Pay as you go.
3. Always Use Resource Group
Keep the related resource in close proximity that way you can save money on communication among the services in addition to that application will get boost on performance as latency would no longer be a factor. In the latter articles I will specifically talk about other benefits this particular service can offer.
4. Off Load From Your Architecture
Try to offload as much as possible by distributing things to their more suited services it doesn’t only reduce the maintenance headache but help in optimizing the cost too.Move the session related data out of server, Optimize the infrastructure for performance and cost by caching and edge caching static content.

Combine Multiple JS & CSS files into one and then perform the Compression for minification. Once bundled into compressed form move them to azure blob.When you’re content (Static content) is popular frontend it with Azure Content delivery network. Use Blob + Azure CDN as it will reduce the cost as well as latency (depends on cache-hit ratio).For anything related to media streaming make use of Azure CDN as it frees you from running Adobe FMS.
5. Caching And Compression For CDN Content
After analyzing multiple Customer subscriptions, we can derive a pattern of modest to huge CDN spends. As a common practice, customers would have forgotten to enable caching for CDN resources either at origin servers like Azure Blob. You should enable compression for content like CSS, JavaScript, Text Files, JSON, HTML etc. to ensure cost savings on bandwidth. Also, frequently deploy production changes and often forget to enable caching & compression for static resources, dynamic content like text/HTML/JSON etc. We recommend you to have post-deploy job as a part of your release automation to ensure client side caching, server-side compression etc. are enabled for your application and resources.
6. Continuous Optimization In Your Architecture
If you are using Azure for the past few years, there is high possibility of using outdated services, Though once designed you should not do too much tinkering with architecture but it’s good to have a look and see if there are things which can be replaced with new generation service. They might be best fit for the workload and can offer same results in less expenses. Always match resources with the workload.
With that it doesn’t only give you instant benefits but offers you recurring savings in your next month’s bill.

7. Optimize The Provisioning Based On Consumption Trend
You need to be aware of what you are using. There is no need of wasting your money on expensive instances or services if you don’t need them. Automatically turn off what you don’t need, there are services like Azure Automation which can help you achieving that.Make use of azure service like auto-scaling, VM scale set and azure automation for uninterrupted services even when traffic tends to increase beyond expectations.Special mention for Azure DevTest- a service specially designed for Development and testing scenarios. With this service azure helps end users to model their infrastructure where they will be charged only for office hours (usually 8*5) these settings are customizable which makes it even more flexible.While dealing with Azure storage, make use of Appropriate Storage Classes with required redundancy options. Service like File Storage, Page-Blob, Block-Blob etc. have their specific purpose so be clear while designing your architecture.

Related Articles : Cost Optimization Tips for Azure Series
Part 1: Cost Optimization Tips for Azure Cloud
Part 2: Cost Optimization Tips for Azure Cloud
Part 3: Cost Optimization Tips for Azure Cloud

Thursday, February 25, 2016

Puppet - An Introduction


Most common issue while building and maintaining large infrastructure has always been wastage of time. Amount of redundant work performed by each member within team is significant. The idea of automatically configuring and deploying infrastructures has evolved out of a wider need to address this particular problem.


Puppet and Chef are few among the many configuration management packages available. They offer a framework for describing your application/server configuration in a text-based format. Instead of manually installing IIS on each of your web servers, you can instead write a configuration file which says "all web servers must have IIS installed".

Azure offers puppet as an extension, while provisioning the VM's all you have to do is click a check box for puppet and then provide your Puppet Master End Point.

What Is Puppet ?

Puppet is Ruby -based configuration management software, and it can run in either client-server or stand-alone mode. It can be used to manage configuration on UNIX (including OS X), Linux, and Microsoft Windows platforms. It is designed to interact with your hosts in continuous fashion,Unlike other provisioning tools that build your hosts and leave them on their own. 

You define a "Desired State" for every node (agents) on puppet master. If agent node doesn't resemble desired state, in puppet terms "drift” has occurred. Actual decision on how your machine is suppose to look is done by the master, whereas agents only provides data about itself and then responsible for actually applying those decisions. By default each agent will contact master every 30 min, which can be customized. The way this entire process work can be summed with this workflow.



  1. Each nodes sends its current information (current state) in the form of facts.
  2. Puppet master will use these facts and compile a catalog about desired state of that agent, and send it back to agent.
  3. Agent will enforce the configuration as specified in catalog, and send the report back to master to indicate the success/failure.
  4. Puppet Master will generate the detailed report which can be feed to any third party tool for monitoring.