Thursday, January 10, 2013

What is Amazon Relational Database Service (Amazon RDS)?

Amazon Relational Database Service (Amazon RDS)
  • MySQL database on the cloud
  • automatically backs up the database

What you need to know?
  • operates from a small instance (64-bit platform with 1.7 GB of RAM and 1 Elastic Computing Unit (ECU)) up to a quadruple extra-large instance (64-bit platform with 68 GB of RAM and 26 ECUs).
  • need to tune RAM and storage
  • use Amazon CloudWatch to help tuning

Scaling
  • can be scaled in several dimensions: database storage size, database instance compute capacity, 
  • and the number of Read Replicas
  • can partition/shard to spread workload over multiple RDS instances
  • use MySQL’s built-in asynchronous replication to scale heavy workloads

Backups
  • 2 types: automated and user-initiated
  • automated backup retains up to 8 days; can be restore to any point from start of retention period to about last 5 mins from current time
  • user-initiated snapshots are kept until explicitly deleted
  • backups are replicated across multiple availability zones within the same region

Multi-AZ deployment option

  • Synchronously replicate data across availability zones
  • When DB fails, RDS will automatically failover to the standby instance (takes ~3mins)

Database tuning factors

Database performance - scale up memory and cpu resources by choosing a larger instance

I/O performance and bandwidth - increase EBS volumes, use RAID 0 across multiple EBS

Use clustering, replication, multiple read slaves


Pricing - http://aws.amazon.com/rds/pricing/

Based on the DB instance hours (per hour), the amount of provisioned database storage (per GB-month and per million IO requests), additional backup storage (per GB-month), and Data Transfer in / out (per GB per month)


Anti-Patterns

index-and-query data - if you don't need joins or complex transactions, use SimpleDB

BLObs - use S3

Automatic elasticity - System admins need to configure RDS to achieve elasticity

Other databases - use EBS


Resources


Amazon Elastic Block Store (EBS) – http://aws.amazon.com/ebs
Amazon EC2 Instance Store Volumes – http://docs.amazonwebservices.com/AWSAmazon EC2/latest/UserGuide
(see sections on Instance Types, Instance Storage, and Block Device Mapping)
Amazon Simple Storage Service (Amazon S3) – http://aws.amazon.com/s3
Amazon Simple Queue Service (Amazon SQS) – http://aws.amazon.com/sqs
Amazon SimpleDB – http://aws.amazon.com/simpledb
Running Databases on AWS – http://aws.amazon.com/running_databases
Amazon Relational Database Service (Amazon RDS) – http://aws.amazon.com/rds

No comments:

Post a Comment