Downtime Free Database Upgrades in AWS - huit/cloud-boot-camp GitHub Wiki
Description
This exercise models a process where a heavily taxed site -- backed by a MySQL database -- can be upgraded in situ to a more robust RDS instance type.
Features of Solution
The solution will describe the process for upgrading an RDS multi-AZ database using graceful failover and a multi-step upgrade process.
Architectural features
- Use multiple availability zones for the databases.
- Use Amazon MySQL RDS as the database service.
- Place a single LAMP stack (Drupal) with useful CNAME for demonstration purposes.
Demonstration of Process
- Begin with a small database instance size, and a working LAMP stack backed by that database.
- Drive traffic to the site and database by reloading repeatedly
- Perform a pre-determined procedure for upgrading to a different (larger) RDS instance type
- Deomstrate that, during this upgrade process, that the site remains up and responsive. 5> Demonstrate the procedure for downgrading if feasible.
Deployment features
- Provide scripts or cloud formation templates for setting up the test environment.
- Static data should be kept in an S3 bucket or locally and deployed remotely on demand.
- Configuration details of the resource URL and credentials should be dynamically injected into instances following 12 Factor standards.
- Separate build, release, and run stages where possible.
- Use
cloud-init
to bootstrap build and environment injection into instances - Encapsulate the instance build process as either
- a startup phase of the instance, or
- as a AMI build process that builds a disk image ahead of time.
Documentation
- All code and artifacts should be put into a single GitHub repository, unless pulling in code from external sources.
- Document your code layout and test environment setup process
- Document explicitly the procedure for upgrading the database in-situ.
- Document settings and tuning needed to ensure graceful failover.
- Provide links and references to external documentation and example used.