Intro to RDS
Database infrastructure can be one of the most difficult resources to manage. Other components of an application architecture can reasonably well designed to handle faillure well. But when it comes to databases, making sure they are highly available, scale well, and failover properly is difficult.
AWS engineers, with their experience running Amazon.com, knew first hand how difficult it was to handle database infrastructure. So they decided to do something about it. Thus the Relational Database Service (RDS) was born. The goal of the service is to take care of all the difficult parts of managing databases so that developers and DBAs could focus on the things like configuration and optimization.
Like their other services, RDS allows customers to instantly start a rather complex system. After going through a few steps in a wizard you can have a fully functional Oracle, SQL Server, MySQL, or Postgres database server. This can be configured in a high-availability mode that will deploy nodes across two datacenters.
What is RDS?
AWS touts RDS as an "...easy to set up, operate, and scale a relational database in the cloud." It provides management of core, but mundane, tasks such as the installation, backup, and patching of database applications. In this lesson we will take a look at some of the characteristics that make up the service.
Managed Software
RDS provides management of the core RDBMS engine. This includes tasks such as installation, logging, and patching. The service balances the ability to provide a consistent software environment for customers, while also allowing them to customize it through various parameters and options.
Managed Changes
Database installations rarely stay the same over the course of an application's life. Popular applications will need to grow. This might require a vertical scaling event, such as making the primary database server more powerful with a RAM and CPU adjustment. Or, it might involve adding additional read slaves. In either case, RDS provides options and upgrade paths.
On the software side, the database engine itself might need to be upgraded to another major revision, or have a security patch applied. RDS will manage these changes as well.
Failure Recovery
The good architect knows that failure cannot be avoided. The makers of RDS know it as well. So they included several features that make it extremely easy to operate a highly-available database installation. At the core of this is something they call Multi-AZ, which means that at the check of a box they will deploy a primary and secondary RDS instance in two separate datacenters, and manage the replication of data and failover process if something bad happens.
On the disaster recovery side, RDS is being backed up to S3, which will enable you to restore the entire database in event of a catastrophic failure to AWS infrastructure.
Anatomy of RDS
RDS does a great job at making diffult tasks simple to perform. This lesson will help you understand how it is able to do this. We will take a look at a common RDS installation and explore all of the components involved.
Region & AZ
RDS instances exist within a specific region and availability zone. You select the region and AZ when launching the instance.
Database Engine
RDS makes several database engines available. You need to choose the right engine for the application you are building.
Instance Type
RDS has several different instance types. These are a subset the EC2 instance types available. When launching an instance you will need to specifify what instance type you want to start with.
Storage Type
RDS uses EBS as its storage system. That gives you the option of using magnetic or SSD volumes. Which one you choose will impact performance (SSD are faster), and cost (SSD are more expensive).
Configuration Options
While RDS does take care of the installation and patching, it leaves some configuration up to the developer. It provides parameters and options settings that can be configured to fit the application requirements.
Network & Security Groups
RDS can be launched into a specific VPC subnet. This subnet can be configured to allow routing to the interent, or made completely private.