Product
|
Cloud costs
|
released
March 31, 2022
|
3
min read
|

Introducing AutoStopping for AWS RDS

Updated
9/1/2023

Idle resources are one of the major contributors to cloud bills. Compute resources like AWS EC2 instances, Kubernetes workloads, and databases like AWS 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 the 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, an AWS EC2 instance running a web server depends on an AWS 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 cloud savings.

AutoStopping currently supports AWS EC2 instances, AWS ECS, and Kubernetes. With this launch, we are now adding support for AutoStopping for AWS RDS. 

Amazon RDS is one of the most popular managed database services. The trends that led us to prioritize support for AutoStopping for AWS 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 AWS 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. 

EC2 Rule With RDS Dependency

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. 

RDS-Only Rule

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 AWS RDS

The setup process for an RDS AutoStopping Rule is very simple. 

  1. First, select the AWS account where you want to enable the Rule.
Select Cloud Account Type
  1. Define the AutoStopping Rule with a name and idle time (time after which RDS will be stopped if no traffic is detected).
Define AutoStopping Rule
  1. Select RDS instances and add a database from one of the AWS regions.
Select RDS Instances and Database
  1. (Optional) Add Dependency on another Rule or create a fixed schedule. 
Set Up Advanced Config
  1. Click Next, Review, and Save. That’s it! You’re on your way to huge cost savings.

Conclusion

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!

Sign up now

Sign up for our free plan, start building and deploying with Harness, take your software delivery to the next level.

Get a demo

Sign up for a free 14 day trial and take your software development to the next level

Documentation

Learn intelligent software delivery at your own pace. Step-by-step tutorials, videos, and reference docs to help you deliver customer happiness.

Case studies

Learn intelligent software delivery at your own pace. Step-by-step tutorials, videos, and reference docs to help you deliver customer happiness.

We want to hear from you

Enjoyed reading this blog post or have questions or feedback?
Share your thoughts by creating a new topic in the Harness community forum.

Sign up for our monthly newsletter

Subscribe to our newsletter to receive the latest Harness content in your inbox every month.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
Cloud Cost Management