RDS DISASTER RECOVERY
RDS (Relational Database Service)
A relational database is a data structure that allows you to link information from
different tables of different types of data bucket.
Tables are related to each other.
All fields must be filled.
Best suited for OLTP (online transaction processing)
Relational DB: MySQL, Oracle, DBMS, IBM DB2
A row of a table is also called records. It contains the specific information of
each individual entry in the table.
Each table has its own primary key.
A schema (design of database) is used to strictly define tables, columns, indexes
and relation between tables.
Relational DB are usually used in enterprises application/scenario. Exception in
MySQL which is used for web application.
About Business Continuity
Larger Scale, Less frequent, events :
• Natural disasters
• Technical Failures
• Human actions
Measures a one-time event :
• Recovery Time
• Recovery Point
RDS BACK-UPS
Two types of Backups :
Automated Backups
• DB Snapshots
Automated Backups:
• Automated backups allow you to recover your database to any
point in time within a "retention period". The retention period can
be between one and 35 days.
• Automated Backups will take a full daily snapshot and will also
store transaction logs throughout the day. When you do a recovery,
AWS will first choose the most recent daily back up, and then apply
transaction logs relevant to that day.
• Automated Backups are enabled by default
Snapshots:
• DB Snapshots are done manually (ie they are user initiated). They
are stored even after you delete the original RDS instance, unlike
automated backups.
Restoring Backups :
• Whenever you restore either an Automatic Backup or a manual
Snapshot, the restored version of the database will be a new RDS
instance with a new DNS endpoint.
MULTI-AZ
• Multi-AZ allows you to have an exact copy of your production
database in another AZ. AWS handles the replication for you,
so when your production database is written to, this write
will automatically be synchronized to the stand by database.
• In the event of planned database maintenance, DB Instance
failure, or an AZ failure, Amazon RDS will automatically
failover to the standby so that database operations can
resume quickly without administrative intervention.
• Both DB servers have same DNS endpoints.
• You can select multi AZ option during RDS DB instance launch.
• RDS service creates a standby instances in a different AZ in the same
region and configure “synchronous replication” between the primary
and standby.
• You cannot read/write to the standby RDS DB instances.
• You cannot select which AZ in the region will be chosen to create the
standby DB instance.
• You can however view, which AZ is selected after the standby is created.
• Depending on the instance class it may take 1 to few minutes to
failover to the standby instance.
• AWS recommends the use of provisioned IOPS instances for multi-AZ
RDS instance.
When Multi-AZ RDS Failover Triggers:
In case of failure of primary DB instance failure.
In case of AZ failure.
Loss of network connectivity to primary DB.
Loss of primary EC2 instance failure.
EBS failure of primary DB instance.
The primary DB instance is changed.
Patching the O.S of the DB instance.
Manual failover. (in case of rebooting.)
READ REPLICA
Read replicas allow you to have a read-only copy of your
production database. This is achieved by using
Asynchronous replication from the primary RDS instance to
the read replica.
You use read replicas primarily for very read-heavy database
workloads
Use for scaling. Not for DR.
You can have up to 5 RR copies of any database
Each RR will have its own DNS End Point