MIGRATION TO CLOUD & COST REDUCTION
You have recently migrated your Infrastructure and Applications to Cloud, spent lot of IT Budget on Transition & Transformation and wanted to see the reduction in costs. But, you do not see any cost reduction (and worst sometimes you see the costs have increased for your unit/business!).
Entire community is talking about cost benefit of cloud migration, but you don’t see this benefit and seems your business case is failing. Also, you are seeing many new category of costs in your invoice from cloud provider, which you have not seen previously while managing your Infrastructure/Applications in on-premise environment.
If this sounds similar, I would suggest you to go through this article. Even if you are not facing this situation, you may go through this article to understand the basic cloud-native technology which you may consider during/after migration. You do not need any previous cloud related knowledge to understand this explanation. Although I have used technical jargons from AWS (Amazon Web Services) , the concepts remain the same for other cloud providers as well.
There are various ways to optimize the costs of your resources in cloud, but this is only possible when you use cloud native concept and technology. If the cloud migration strategy is just Lift & Shift, you may not be able to see cost benefit of cloud related technology.
Below are some of the factors which impact the cost of cloud resources and hence these need to be analyzed to reduce the cost:
I. Use of Elasticity:
Cloud provides multiple tools & techniques to increase/decrease your capacity as per the business need and hence you can control costs based on actual usage. The effective use of Elasticity is sometimes overlooked during cloud migration (due to strict timeline, lift & shift approach etc) and hence the benefit is also not realized.
For customer using AWS, Time-Based Elasticity or Volume Based Elasticity can be used to reduce costs.
There are various ways to implement time-based elasticity by using services such as AWS Instance Scheduler, Lambda, AWS Cloudwatch, API tools etc. These can be used to stop resources based on time of day (e.g development environment should run only from 9 AM to 5 PM and switched off outside this window).
Similarly, there are multiple services such as Autoscaling, Cloudwatch, Dynamic provisioning of capacity etc to implement volume-based elasticity (e.g you may need higher number of resources during peak hours and lesser number during off-peak hours).
The use-case of each service and technique should be discussed, reviewed and implemented to get associated cost benefits.
II. Use of Reserved Resources:
There are various cost model for cloud resources and most of resources can be reserved for long term (typically 1, 3 years) at reduced cost. The cost saving can be in range of ~30–60% just by using reserved resources.
If you reserve an AWS EC2 Instance for 3 years, you may get typically ~60% reduction in cost as compared to On-Demand Instance. Similar reservation can be used for other resources as per the business requirement.
Cloud providers also gives a possibility to use their resources for a shorter duration based on bidding price from customers (to use last minute available capacity). This can be very cheap , almost with ~80% cost reduction as compared to on-demand price, but this can be used only for limited use cases.
You may use AWS Spot fleet or Spot Instance for certain use cases, which may offer ~50–80% cost reduction depending on last min availability of resources.
III. Use of Cost allocation tags and Cost Optimization tools:
If you see your cloud invoice for the first time, it will look quite cryptic but there is an easy way to identify the cost for each resources (or group of resources) based on cost allocation tags. These tags are used to categorize the costs in your invoice and can be used for further analysis & optimization based on each resource or group.
There can be various other tools from your cloud provider which can be used to analyze the costs and then you may plan to reduce the cost going forward.
Ex: AWS provides many such tools such as Cost Allocations Tags, Cost Explorer, Cost & Usage reports, Pricing Calculator, Billing Alarms etc to help customers to analyze their costs and take actions to reduce the cost. AWS Trusted Advisor provides real time guidance to reduce overall costs as per AWS best practices.
IV. Data Transfer & Storage Cost:
You may not be specifically aware of Data Transfer & Storage cost while working with on-premise environment but this cost will be visible after cloud migration.
Every cloud provider charges data transfer cost based on multiple scenario. This cost may increase when your workload is distributed both in on-premises and cloud (virtual) datacenter and on-premise Application/Infrastructure/Process may need to interact more often with cloud resources.
Ex: If you are using AWS S3 (Simple Storage Service) to store your data(or objects) and your application is storing/delivering data into or out of S3, you will see costs for Storage, Data Retrieval requests, Data Transfer to Internet/other AWS resources. This cost will increase further if you have implemented replication of data to another region(s) depending upon your Disaster Recovery requirements.
There are various technology which can be used to reduce Storage cost based on the category of data and its usage. AWS S3 storage cost can be reduced by implementing Life cycle policy and moving the data to Infrequent access, Glacier or Deep Archive storage as per the need. The storage cost may vary by ~20 times depending on the storage class you choose.
The data transfer cost can be reduced (to some extent) by using AWS Cloud Front (Content Delivery Network).
There can be other alternatives to reduce this cost based on your cloud provider and business case.
V. Use of Monitoring
The cloud provider charges customer based on actual usage and that’s why they measure usage of every resources in detailed way such as duration of use, number of API calls, type of requests, storage size etc. For example, AWS measures and charges compute time of Lambda in precision of a millisecond.
You can also use this available monitoring services free (most of times) or for a small charge. This service helps to estimate the cost on periodic basis (i.e daily or weekly) and you may take proactive actions based on actual situation.
In AWS, there are services such as Cloudwatch Alarms, cost related reports, Cloud Trail, SNS and Lambda, which are used in monitoring, alerting and can help to keep cost under control.
VI. Others Cost reduction opportunity:
There are multiple concepts and technology such as use of serverless resources, moving data to low cost storage based on machine learning, consolidating accounts in a hierarchy etc to reduce overall costs of your architecture.
You may reduce cost by consolidating the usage from all accounts across an organization. In this case, discount is given based on consolidated usage of a group of accounts within a hierarchy.
You may also automate the launch, stop, terminate actions for Infrastructure resource using popular programming language such as Python, Java, Go etc. This concept is known as Infrastructure as Code (IaC) and this provides agility, scalability, elasticity of cloud resources.
Ex: AWS provides many serverless resources, e.g Lambda which can be used based on per invocation and paid based on exact duration of use (in millisecond).
AWS Organization can be used to consolidate usages and cost from multiple accounts into a central account and cost benefit can be seen based on consolidated usage.
Overall, cloud migration can help an organization to implement elastic, reliable, efficient and secure solutions with reduced cost. But, these benefits can only be achieved when the above mentioned cost optimization techniques (and many more) are considered during migration.
If you believe these were not implemented fully during your cloud journey, you may implement it with help of your cloud architect.
I am sure that following these measures can definitely help to reduce overall costs and justify your cloud migration business case in much stronger way.