Cloud Cost Optimization
Summary
The top two challenges for the organization moving to the cloud are managing cloud spend and cloud security. This article will discuss cloud spend optimization strategies. In the cloud adoption journey, as more assets are moved to cloud, organizations are now starting to see actual cost numbers. Unmanaged spend in this space will invariably result into cost overruns and unpleasant surprises. Till now, for many organizations, the focus has been on understanding cloud technology, laying out cloud development standards, and defining the architecture and design of cloud deployed assets. For many this has inadvertently resulted in lower focus on the overall strategy of cloud spend management. It is imperative for organizations to put in place a cost optimization strategy without impeding upon the overall agility of DevOps teams and the quality of the deliverables. In the new world of ‘pay per use’ and ‘pay as you go’, there is a need for continual monitoring, managing, and optimization of cloud spend.
Cloud Spend Management
Cloud spend management is a cross cutting concern with continual effort across multiple teams. There are many strategies that could be employed to contain overall costs. However, the key operating principle of any cost spend management strategy has to be to ensure that it should not impede upon the core premise of the cloud, which is the Agility of Dev and Ops teams working to deliver the promised business value.
Strategies and Principles for Cloud Spend Management
Cloud spend management strategy can be implemented using the following six principles.
Simplification – Simplify deployment and application architecture.
Rationalization - Review existing assets for right sizing and right tooling.
Consolidation - Consolidate logical groupings of assets.
Standardization - Standardize on the deployment architecture after going through simplification.
Automation - Automate monitoring of costs and proactive visibility of spend for stakeholders.
Visualization - Continually visualize active assets and associated costs for enabling corrective measures as needed.
Other approaches
Enterprise Contract – Negotiate enterprise contracts to avail discounts from the cloud provider.
Use of cheaper regions – Use of cheaper cloud regions for non-critical applications. E.g. Azure services cost different in different regions.
Identify slow performing applications and transactions. Monitor for slower and longer running applications as well as data base transactions to optimize compute power utilization. Employ Profilers to get visibility into these issues. We must be judicious in going down this route as this could be very time consuming and may not provide the necessary ROI. We are better off training teams while the applications are in development to build applications with requisite quality.
Use of cheaper cloud storage option. Most of the cloud service providers offer features to move the least used and rarely used data to cheaper storage. Azure cold storage is one of these options.
Applying Cost Optimization Principles
Simplification
Review of application deployment architecture to remove redundancies and unneeded components. The principle to follow here is to over engineering. Review the use of expensive services within application deployments to see if these services are really needed. Start off with asking questions for expensive services, for instance, do we need both Application Gateway and Ingress Controller within Kubernetes Cluster Deployments on Azure. Can you consolidate multiple Application Gateways?
Rationalization
Are cloud deployed assets right sized? Do we have the right set of tools or have we over-engineered the tools space? For instance, do we need many monitoring and logging tools, or can we rationalize and standardize specific tool(s) which are just enough to solve the problem at hand. Defining standards will help in the rationalization decisions.
Consolidation
Another high-impact area for optimizing costs is the consolidation of assets. This can be done on multiple fronts such as consolidating within an application, consolidating across different applications, and consolidating across clusters. Defining deployment standards and providing guiding principles to teams will help internalize consolidation.
Standardization
Standardization of application architecture and deployment architecture is key in providing cost optimization guidance to teams, and accelerating decision making, mutualization and consolidation. Standardization of architecture is preceded by the simplification step.
For instance,
· Standardizing on Kubernetes Container Services as a preferred choice for deployment architecture will enable better ability for consolidating related applications on group of Kubernetes nodes.
· Defining Kubernetes Cluster strategy will reduce redundant control plane nodes and upgrade efforts.
· Moving towards the use of SQL Elastic Pools for Azure SQL cost optimization to avoid the creation of new DB instances for each application.
Automation
Automation can be a critical enabler for various cost optimization strategies. A CD pipeline could be employed to
• Automate validation of standards and principles within CI/CD pipeline
• Use cloud Cost APIs to provide estimated costs for current deployment.
• Delete staging slots used in blue-green deployments automatically after certain days.
• Auto scale down applications to the minimal number of Nodes and Pods during off peak hours.
• Auto shut down non-production assets that are not needed. Explore use of services like Park My Cloud. https://www.parkmycloud.com/ to achieve this.
Visualization
Visualization could act as very powerful cost optimization mechanism. Visualization generally invokes actionable next steps from stakeholders. In the case of Azure, you could use the Azure billing portal and EA portal – https://ea.azure.com/. While these tools provide some level of insight into the costs, they are not great at providing enhanced visualization or reporting capabilities. Many third-party tools available are very expensive and defeat the purpose of cost optimization. PowerBI could be employed to build internal reporting, however its time consuming, cumbersome, and will need up keep as the platform evolves.
It is worthwhile to invest in inexpensive services like https://azure-costs.com/ for powerful visualization and reporting.
Stakeholders - CTO, Dev, Ops, Finance, Business
Summary
In summary, cloud spend management is a continual effort with cross-cutting concerns across various stakeholder teams. Cost optimization can be achieved by applying various strategies like simplification, rationalization, consolidation, standardization, automation and visualization.