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

  1. Use multiple availability zones for the databases.
  2. Use Amazon MySQL RDS as the database service.
  3. Place a single LAMP stack (Drupal) with useful CNAME for demonstration purposes.

Demonstration of Process

  1. Begin with a small database instance size, and a working LAMP stack backed by that database.
  2. Drive traffic to the site and database by reloading repeatedly
  3. Perform a pre-determined procedure for upgrading to a different (larger) RDS instance type
  4. Deomstrate that, during this upgrade process, that the site remains up and responsive. 5> Demonstrate the procedure for downgrading if feasible.

Deployment features

  1. Provide scripts or cloud formation templates for setting up the test environment.
  2. Static data should be kept in an S3 bucket or locally and deployed remotely on demand.
  3. Configuration details of the resource URL and credentials should be dynamically injected into instances following 12 Factor standards.
  4. Separate build, release, and run stages where possible.
  5. Use cloud-init to bootstrap build and environment injection into instances
  6. 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

  1. All code and artifacts should be put into a single GitHub repository, unless pulling in code from external sources.
  2. Document your code layout and test environment setup process
  3. Document explicitly the procedure for upgrading the database in-situ.
  4. Document settings and tuning needed to ensure graceful failover.
  5. Provide links and references to external documentation and example used.