Cloud optimisation is an continuous process to cut down on cloud resources not being used and save on cloud cost substantially
Here are some of the few basic optimization steps that you could follow for your cloud projects. The strategy works for across cloud providers.
Logs management – The storage for logs can grow exponentially, especially if you have central logging enabled. This is across environments (dev, test, prod etc).
The first step is to get a tab of log storage being used and filter out logs not being used. For instance, apart from log levels , you can filter out default service logs. Each environment can have a different log optimization strategy. For instance, for Google cloud you can exclude Google Kubernetes Engine container and pod logs based on GKE internal namespaces i.e knative-serving etc.
For reference look at – https://cloud.google.com/logging/docs/export/configure_export_v2#exclude_container_and_pod_logs
Network optimization – Keep a tab of network resources that are lying idle. For instance, Static IPs not associated with a resource adds to your cloud cost. Usually deleting a resource using the static ip, doesn’t delete the static ip and you many not realise this unless you look at the cloud bills in detail
Idle resource management – Build out a calendar to automate shutting down non-production resources when not-in use (i.e based on non-office hours, weekends). For instance, you can also suspend/hibernate the VM, you will be charged only for storage costs. Here is a AWS reference on using Lambda to turn off resources –https://aws.amazon.com/premiumsupport/knowledge-center/start-stop-lambda-eventbridge/
Turn on cloud recommendations – Each cloud provider provides certain recommendations to identify idle resources, oversized VMs etc.. For instance, Google Cloud has a Recommender API that provides a dashboard for these details.
Delete unwanted backups and snapshots – Automated database backups, storage and VM snapshots all add to the cloud cost. Each environment (dev, test, prod) needs a different strategy. Identify snapshots not required and delete them periodically.
The way you design cloud applications, what VMs you provision, choice of cloud services etc, strategy like multi-cloud also needs to be considered as part of the overall cloud optimization. These rules should also be part of Cloud FinOps. I will cover this in a future post.