The common misconception is
that if we move to cloud the cost will reduce automatically but in most
scenarios that is not the case. How much cost you save in cloud will be
determined by the services you choose and next will be determined by which cost
saving strategies you are following in your environment.
There are several strategies we can follow to optimize cost in Cloud environment. We will see high level view of those strategies here.
- Removal of Unused
Resources :
Yes, as per my experience one of the biggest mistakes cloud teams,
especially migration teams, do is not tracking the resources that are
created as part of migration activities. As multiple technical teams are
involved in cloud migration projects the main vacuum that appears is not
knowing what all resources are getting created by what all technical
teams. So, one important task cloud migration teams should add to their
project is tracking all the resources that are getting created as part of
the project and cleaning up of all the resources that are not in use on a
regular basis. This will amount to lots of cost saving for the customer.
Also, no need to mention separately that most of this tracking and removal
of resources can be automated.
- Turn off the lights when
not needed :
This strategy is straight forward shutting down of the resources when they
are not in use. Except production servers the other servers like Dev, Test
will not be in use round the clock. So, any lower environment servers
which are not required to be running after business hours need to be
stopped on a regular basis. This will save lot of cost its similar to
turning off the lights in the house when you are going out.
- Which size fits you? : This is one of
the most overlooked aspect. We all know there is no one size that fits all
of us in a similar way; we should not assume blindly that one size of VM
or one series of VM will suit all servers in a particular environment. For
example, there is no guarantee that all the VMs in a Test environment will
be of the same size or will require the same level performance. In a
environment each server will have its own resource requirements so while
deciding the server sizes or compute of any environment we should first
carefully calculate how much resources that particular VM require and
accordingly we should select the suitable series\sizing.
- Are you using it? : This
reminds of my friend who took a loan of 10 lakhs when he needed a loan of
7 lakhs. Now, he pays interest for entire 10 lakhs instead of his required
7 lakhs. Similarly, we should never equip the resources with more than
what they require. So regularly monitor how the cloud resources are used
and if you notice a pattern of any cloud resources which are underutilized
then you should plan and size those resources right. For example, if all a
server needs is the performance of medium web traffic and you are using H
series or F series, then it's obvious that it's underutilized so
monitoring the server usage patterns and reducing it to D series will save
a significant amount of money.
- Does this DB need a
dedicated VM ? : Now as part of cloud migration the majority
of the SQL Server instances are moved to cloud IaaS environment and this
is one of the sections where a lot of cost can be saved. I have seen
several VMs which are holding 2 to 5 databases that too non-critical
databases and getting migrated to cloud as it is to IaaS. In on-premises
we don't have any such option or facility to run database as
an independent resource but that is not the case in the cloud
where we can run only a single database without needing to configure VM,
we should make use of it. Evaluate all your database servers before
migration or even post migration and wherever possible move to PaaS
instead of IaaS.
- Group the DBs : One of
our customers has made a correct decision and moved several SQL Server VMs
to PaaS while migrating to cloud. But the catch is they moved each DB to a
separate PaaS resource and ended up resulting in high cost in cloud. Now
after analyzing what we realized is the move to PaaS is correct, but they
should have used DB Elastic Pools instead of individual Azure SQL DBs so
that bunch of DBs in pool would use common resources whenever required and
this would have saved lot of cost instead of allocating resources to each
Azure SQL DB separately.
- Budgeting : Another
strategy to track and optimize cost is budgeting. In Azure you can create
budgeting and set up alerting for actual costs and forecast costs. This
helps in understanding the actual usage and also to forecast the cost
according to the on-going spending. Accordingly, decisions can be made to
optimize the costs. One good example is one of our test subscription which
has to be taken down after analyzing the budget forecast as the cost of
the subscription started to go way more than expected.
- Licensing : A lot can be
saved when it comes to Licensing in Azure. There are multiple
strategies like Azure Hybrid Benefit (where you can use your on-prem
license in cloud), Azure Reservations (reserving required resources for
certain time period to avail discount price provided by MS instead of Pay
as you go) and so on.
There are many other ways as
well to reduce the cloud spending but as your cloud usage increases and cloud
environment starts expanding you can plan and implement suitable strategies as
per your environment.
Share what are the different
cost optimization strategies you use in your environment that help readers.
Thanks VV!!
#costoptimization #cloudmigration #azure #sqlserver #azurearchitect