Development Notes
  • Introduction
  • Programming Langauges
    • Java
      • Cache
      • Java Fundamentals
      • Multithreading & Concurrency
      • Spring Boot
        • Spring Security
        • Development tips
      • ORM
        • Mybatis
      • Implementation & Testing
    • Node.js
      • Asynchronous Execution
      • Node.js Notes
    • Python
      • Memo
  • Data Structure & Algorithm
  • Database
  • Design Pattern
  • AWS Notes
    • Services
      • API Gateway
      • CloudHSM
      • Compute & Load Balancing
        • Auto Scaling Group
        • EC2
        • ECS
        • ELB
        • Lambda
      • Data Engineering
        • Athena
        • Batch
        • EMR
        • IoT
        • Kinesis
        • Video Streaming
        • Quicksight
      • Deployment
        • CloudFormation
        • Code Deploy
        • Elastic Beanstalk
        • OpsWorks
        • SAM
        • SSM
      • ElasticSearch
      • Identity & Federation
        • Directory Service
        • IAM
        • Organizations
        • Resource Access Manager (RAM)
        • SSO
        • STS
      • KMS
      • Management Tools
        • Catalog
        • CloudTrail
        • CloudWatch
        • Config
        • Cost Allocation Tags
        • GuardDuty
        • Savings Plans
        • Trusted Advisor
        • X-Ray
      • Migration
        • Cloud Migration: The 6R
        • Disaster Recovery
        • DMS
        • VM Migrations
      • Networking
        • ACM
        • CloudFront
        • Direct Connect
        • EIP & ENI
        • Network Security
        • PrivateLink
        • Route53
        • VPC
        • VPN
      • Service Commnucation
        • Amazon MQ
        • SNS
        • SQS
        • Step Functions
        • SWF
      • Storage
        • Aurora
        • DynamoDB
        • EBS
        • EFS
        • ElastiCache
        • RDS
        • Redshift
        • S3
        • Storage Gateway
      • Other Services
        • Alexa for Business, Lex, Connect
        • AppStream 2.0
        • CloudSearch
        • Comprehend
        • Data Tools
        • Elastic Transcoder
        • Mechanical Turk
        • Rekognition
        • WorkDocs
        • WorkSpaces
    • Well Architect Framework
      • Security
      • Reliability
      • Performance Effeciency
      • Cost Optimization
      • Operational Excellence
    • Labs
      • Webserver Implementation
      • ELB Implementation
      • Auto-scaling Implementation
      • A 3-tier Architecture In VPC
  • Architecture
    • Security
  • Spark
    • Memo
  • Conference Notes
    • Notes of JCConf 2017
  • AI Notes
Powered by GitBook
On this page

Was this helpful?

  1. AWS Notes
  2. Services
  3. Storage

RDS

PreviousElastiCacheNextRedshift

Last updated 4 years ago

Was this helpful?

Introduction

  • Relational database service (RDS), including:

    • Amazon Aurora

    • PostgreSQL

    • MySQL

    • MariaDB

    • Oracle

    • Microsoft SQL Server.

Feature

  • Storage with 10Gb per database in EBS (gp2 or io1)

  • 2 copies of data in each AZ with minimum of 3 AZs (can choose AZ, and have 6 copies at least)

  • Backups

    • Automated Backup

      • To recover database to any point in time in a retention period (5 minutes~35 days, 7 days as default).

      • Daily snapshots and transaction logs through the day (can do recovery down to a second)

      • Enabled by default, the backup takes the same size with DB and is saved on S3 freely

      • Will be deleted when DB is deleted

    • Snapshot

      • Manual operation, can copy cross region

      • Won't be deleted when DB is deleted

    • Additional support for Oracle

      • Oracle Export/Import Utilities

      • Oracle Data Pump Export and Import

      • Not support: Oracle Recovery Manager (RMAN), Replication Backups

  • Encryption (for EBS, Snapshot)

    • Using AWS Key Management Service (KMS)

    • If a RDS is encrypted, its automated backups, read replicas, snapshots are encrypted as well

    • To encrypt an existing DB is not supported, instead create a new DB instance with encryption enabled then migrate data

  • Disaster recovery with Multi-AZ deployments (synchronous replication for guarantee of durability)

    • supports:

      • PostgreSQL (physical replication)

      • MySQL (physical replication)

      • MariaDB (physical replication)

      • Oracle (physical replication)

      • SQL server (logical replication)

    • Have an exact copy of RDS in another AZ for automatic failover processing

    • DR for entire region down

      • Promote a read replica in a different region to stand alone DB (Single AZ).

      • Then reconfigure it as multi-AZ.

    • If being asked for data durability, still need to set up backups rather than only depending on multi-AZ.

  • Read Replica (for scalability, it's eventual consistent)

    • Improve performance by using asynchronous replication from the primary RDS instance to the read replicas

    • Must have automatic backups turned on in order to deploy a read replica

    • Can have up to 5 replicas to any database

    • Can have replicas of read replicas

    • Can become an independent database but break the replication

    • Support for:

      • Aurora

      • PostgreSQL

      • MySQL

      • MariaDB

    • Read replica can be in another region

    • Read Replicas use automatic backups for managing read replica logs

      • To disable automatic backup, remove the read replicas first.

    • Prepare an external MySQL DB instance.

    • Prepare the source RDS MySQL DB instance for replication.

    • Use the mysqldump utility to transfer the database from the source MySQL DB instance to the external MySQL database.

    • Start replication to the external MySQL database.

    • After the export completes, stop replication.

  • RDS maintenance

    • For updates marked as Required, You receive a notice from Amazon RDS indicating when the update will be performed, if you defer a required update.

    • For updates marked as Available, you can defer indefinitely.

  • are supported with Oracle, SQL Server.

  • IAM Authentication for MySQL and PostgreSQL (authorization still happens inside RDS).

  • Can copy an un-encrypted RDS snapshot into an encrypted one.

  • CloudTrail cannot be used to track queries within RDS.

  • Anti-patterns and suitable solutions

    • Lots of binary objects (S3)

    • Automated scalability, unstructured data, key-value data (DynamoDB)

    • Unsupport RDB types (Oracle DB2, SAP HANA), complete control of DB (EC2)

  • Cross region failover

DynamoDB Scaling vs RDS Scaling

  • DynamoDB offers a "push button" for easy scaling and leads no down time

  • RDS needs manual operation to scale out (add replicas)/up (add instance size)

  • RDS in on-premises VMware environments.

  • Migration to RDS by promoting RDS Read Replica, no need for DMS.

Read replica supports Multi-AZ
Difference between Multi-AZ and Read Replicas in Amazon RDS
To export RDS data to a MySQL instance running external to Amazon RDS
Transparent Data Encryption (TDE)
Amazon RDS on VMware database
RDS Cross Region Failover