How to change the size of your AWS RDS with zero downtime

By | 2018-03-05

I was playing with a multi-AZ RDS the other day and noticed that I was burning money more quickly than I had anticipated/wanted, so I decided to go to a smaller instance size that wasn’t as expensive (until the environment was under production load performance wasn’t that important).

Maybe I should take a step back.  AWS offers a service called RDS (that stands for Relational Database Service).  The best description of this offering is straight from the AWS website: “Amazon RDS is a managed relational database service that provides you six familiar database engines to choose from, including Amazon AuroraMySQLMariaDBOracleMicrosoft SQL Server, and PostgreSQL. This means that the code, applications, and tools you already use today with your existing databases can be used with Amazon RDS. Amazon RDS handles routine database tasks such as provisioning, patching, backup, recovery, failure detection, and repair.”

Here’s the process to change the size of the multi-AZ RDS stack with zero downtime.  Please note that your RDS environment must be multi-AZ.  Obviously if you only have 1 server and turn it off…. you are going to have downtime 🙂  :

  1. Log into console
  2. Go to Services -> Relational Database Service
  3. Select Instances
  4. Select your “reader” instance:
  5. Choose Instance Action -> Modify:
  6. Select the size you want to change it to:
  7. Click Continue:
  8. Select “Apply Immediately” then click “Modify DB Instance”:
  9. In the RDS Instances window, wait for the instance Status to go from “modifying” to “available”:
  10. Now failover your current writer to reader status. Select your “writer” instance:
  11. Choose instance action -> failover
  12. Once the stack has failed over perform the same modification steps on the second RDS instances.  Once that is complete failback the stack.

All of the standard caveats apply:  If you are in production, you still need a maintenance window and you still need to notify your users/monitors/app teams 🙂

That’s it!  Let me know if you have any questions!

 

 

Category: AWS

Leave a Reply

Your email address will not be published. Required fields are marked *