Aurora Governor helps maintain application and database availability and allows scaling the Amazon Aurora replica capacity according to conditions defined via scaling policies. It can be used to ensure that the desired number of Amazon Aurora replicas are run at any given time and/or condition.
Aurora Governor automatically increases the number of replicas when demand increases during traffic jumps, DoS attacks, CDN cache purges or on schedule to maintain performance and availability and decreases capacity during off hours to reduce costs. This product unleashes the full power of EC2 Auto Scaling, which is already built into Amazon AWS services, and lets you use familiar tools such as EC2 AutoScaling groups, EC2 ELBs, CloudWatch alarms and monitors to maintain desired capacity of Aurora replicas.
Installation of the product takes fives minutes or less and is as easy as creating a new stack from the CloudFormation template we supply. To start using the dynamic pool of Aurora replicas you just need to point your application to the ELB created automatically during installation process as shown in the graphic below:
Install on Amazon RDS/EC2
1. Aurora Governor on AWS Marketplace
Click the Aurora Governor AMI on AWS Marketplace button to view the Aurora Governor product page.
Click on the Continue button on that page; you will be taken to the Launch on EC2: page.
2. Launch on EC2
Click on the Accept Software Terms. After accepting the Software Terms click on "Launch with CloudFormation Console". You'll be taken to "Create Stack" page.
3. Create Stack
Stack name: Specify free-form stack name
DBClusterIdentifier: Specify database cluster id. Cluster IDs can be found on 'https://console.aws.amazon.com/rds/home?#dbclusters:' page.
KeyName: Select SSH key name that you can use to SSH into EC2 proxy instances. This is only needed for debugging purposes. You can skip this step.
RDSInstanceType: Type of Aurora RDS replica taht wil be created during auto-scaling activities.
VPC: Select your VPC.
Subnets: Select all subnets from the VPC and click Next.
You do not need to specify anything on this screen. Just click "Next".
Select on I acknowledge that AWS CloudFormation might create IAM resources checkbox and click "Create".
After clicking "Create" on the previous screen you'll be taken to the https://console.aws.amazon.com/cloudformation page. Wait until you stack is in CREATE_COMPLETE status and click "outputs" tab. The table will contain "ReaderEndpoint" which is the DNS name of the auto-scaled load-balanced pool of Aurora replicas.
1. Control number of Aurora replicas
To set the exact number of Aurora replicas go to https://console.aws.amazon.com/ec2/autoscaling, select your autoscaling group (which is always named after your database cluster) and set "min" and "max" to the desired values.
If you want to temporarily change number of database replicas (during a code push or DoS attack) set "desired" to the new value. After the "cooldown" period the autoscaling polices will kick in and adjust capacity accordingly.
You can also use a combination of "min", "max" and "desired" values to fix the lower or upper group boundary while making the other boundary adjustable by the autoscaling policies.
2. Adjust alarm thresholds
Go to https://console.aws.amazon.com/cloudwatch and adjust threshold values of the cluster_up and cluster_down alarms where cluster is the name of your database cluster.
3. Adjust scaling policies
Go to https://console.aws.amazon.com/ec2/autoscaling, select checkbox next to the autoscaling group named after your cluster, click on Scaling Policies tab and make adjustments to add instance and add instance scaling policies.
Setting min, max and desired Aurora replica pool capacity allows to prepare for predictable jumps or lulls in database demand. To create new schedule click on your autoscaling group and go to the Scheduled Actions tab.
5. Aurora instance types
By default Aurora Governor uses m3.medium replicas. You can change the type during stack creation or update
6. Proxy instance types
By default Aurora Governor uses t2.nano instances as EC2 proxies to Aurora replicas. It's enough for any database size.
7. Master proxy
The pool of read-only replicas always contain a proxy for the master database to make sure load is distributed evenly and to allow for "zero replicas" configuration
To uninstall Aurora Governor just remove the Cloud Formaiton stack from https://console.aws.amazon.com/cloudformation console.
We charge 10% of the cost of each Aurora replica, i.e.:
|RDS Replica Type||Total|
Note:This software is priced along a consumption dimension. Your bill will be determined by the size of your data.
Note:Amazon will charge you separately for the load balancer (approximately 20$ a month) and for each ec2 proxy instance (approximately 5$ a month).