Idle resources are one of the major contributors to cloud bills. Compute resources like EC2 instances, Kubernetes workloads, and databases like RDS, are billed for every minute they are running, irrespective of whether or not they are actively used. So, for the time these resources are not serving any traffic, they are just adding to your wasted spend. This wasteful spending increases operating costs without adding any value and precludes you from investing those funds towards growing your business. Pre-production accounts are a major source of such costs, where resources are inactive for majority of the time and are used only when developers are either deploying or testing.
This is where Harness Cloud Cost Management will help you. Intelligent Cloud AutoStopping is a unique feature in Harness CCM that will reclaim wasted budget with no change to your infrastructure. AutoStopping can stop idle resources when no traffic is detected to the resource, and automatically start it when traffic is received. Customers using this feature see substantial savings in their pre-prod environments!
The main benefits of adding AutoStopping Rules to your cloud accounts are:
- Automate Savings: AutoStopping can maximize savings by automatically shutting down both the primary and dependent resources when the primary resource is idle. For example: EC2 instance running a webserver, depends on RDS database.
- Reduce Developer Toil: No need of maintaining and running additional scripts to start/stop resources.
- Minimize Number of Idle Resources: Unlike AutoScaling where minimum resource count is 1, Harness AutoStopping can reduce min resources to zero, resulting in added savings.
AutoStopping currently supports EC2 instances, ECS, and Kubernetes. With this launch, we are now adding support for AutoStopping for RDS.
Amazon RDS is one of the most popular managed database services. The trends that led us to prioritize support for AutoStopping for RDS are:
- Increased adoption of RDS database because of its simplicity and scalability.
- Used to store data from web applications running on EC2/EKS/ECS, cron/batch jobs, or even serverless functions.
- RDS costs can grow rapidly, even when the database is not actively used.
In the next section, we will go through various use cases that are supported today for AutoStopping with RDS.
Using AutoStopping Rules for RDS
There are three kinds of Rules that you can create with AutoStopping for RDS.
1- EC2 Rule With RDS Dependency – This is perfect for use cases where there is a webserver or application server that connects to an RDS database to access/store data.
In this scenario, if there is no traffic to the application server (EC2 instance), the AutoStopping Rule will stop both the application server and the RDS database that it connects to. As soon as traffic is received by the application server, the Rule will first start the RDS instance, and then the EC2 instance. This results in substantial cost savings for both instances.
You can achieve this by simply creating an EC2 AutoStopping Rule and adding an RDS Rule as a dependency.
2- RDS-Only Rule – This is suitable for use cases where an RDS database is used to store results or access data directly from a Background Job/Cron/Batch Job. These jobs could be running within a Lambda Function, AWS Batch, or any custom Cron Job.
In this scenario, if there is no traffic detected from background jobs to the RDS database for a preset amount of time, the RDS instance will be shut down. Additionally, as soon as the traffic is detected to the database, the RDS instance will be started automatically.
3- RDS Fixed Schedule Rule – This is suitable when the RDS database needs to be running for a fixed period of time. When a resource is configured to go up or down on a fixed schedule, it is unaffected by activity or idleness during that time period. For example: You might need the database to be active only during office hours from 8 am to 5 pm every day.
Let’s now look at how you can configure these rules in 5 simple steps.
How to Set Up AutoStopping Rules for RDS
The setup process for an RDS AutoStopping Rule is very simple.
- First, select the AWS account where you want to enable the Rule.
- Define the AutoStopping Rule with a name and idle time (time after which RDS will be stopped if no traffic is detected).
- Select RDS instances and add a database from one of the AWS regions.
- (Optional) Add Dependency on another Rule or create a fixed schedule.
- Click Next, Review, and Save. That’s it! You’re on your way to huge cost savings.
Efforts focused on reducing cloud spend and improving cost efficiency can have a significant impact on organization’s bottom line. These savings can be directed towards growing your business and putting it to productive use.
Automating idle resource management is one of the easiest ways to achieve cost savings in the cloud. Harness CCM makes it very easy to get started on your cost optimization journey. AutoStopping can help optimize your pre-prod environments with dynamic and fixed schedules. Sign up for a free trial and experience it for yourself!