You are on page 1of 12

Amazon Aurora

MySQL Compatible Edition

Armando Barrales
Solutions Architect

Uriel Ramirez
Solutions Architect

© 2020, Amazon Web Services, Inc. or its Affiliates.


Table of contents

• Introduction to Amazon Aurora

• Aurora Fundamentals

• HA/DR

© 2020, Amazon Web Services, Inc. or its Affiliates.


HA/DR with Amazon Aurora
Failure recovery, backup/restore, connection
management, Global Database, Multi-Master

© 2020, Amazon Web Services, Inc. or its Affiliates.


Tolerating compute failures

Any reader node can be Cluster


Endpoint
Reader
Endpoint
promoted to writer/master.
Writer Writer Reader
SQL SQL SQL
Failover tier determines Transactions Transactions Transactions
preference on failover reader Caching Caching Caching
candidates. 0 0 5

Failed instances/nodes are


SHARED CLUSTER STORAGE VOLUME
replaced and come online as
readers.

Readers reboot on writer failover.

AZ 1 AZ 2 AZ 3

© 2020, Amazon Web Services, Inc. or its Affiliates.


Continuous backup with point-in-time restore
Segment snapshot Log records

Segment 1

Segment 2

Segment 3

Recovery point Time

• Backup is performed without performance or availability impact by storage nodes


• Periodic snapshot of each segment is taken in parallel, and stored in S3
• Logs records streamed to Amazon S3 continuously
• At restore, appropriate segment snapshots and log records are retrieved by storage nodes
• At restore, log records are applied to segment snapshots in parallel and asynchronously

© 2020, Amazon Web Services, Inc. or its Affiliates.


Aurora backup and restore

Automated backups:
• Between 1 and 35 days retention Source Cluster Restored Cluster
• Recover up to the last ~5 min point in time Writer Reader Writer
SQL SQL SQL

Transactions Transactions Transactions

Snapshots: Caching Caching Caching

• Instantly create user snapshots


• No performance impact
VOLUME VOLUME
• Copy snapshots to another region
Automated backup Restore to t4
• Share snapshots with other AWS accounts
t t t Amazon S3
Restore: 0
1 2 6
0
5 6
2
3
RDS Service Managed

• Time depends on cluster volume size


• Always creates a new DB cluster Data changes over time

t0 t1 t2 t3 t4 t5 t6

© 2020, Amazon Web Services, Inc. or its Affiliates.


Aurora Backtrack

t4
Invisible
t2 t3 Invisible

t0 t1 Rewind to t3

Rewind to t1

t0 t1 t2 t3 t4

Backtrack brings the database to a point in time without requiring restore from backups
Recover from an unintentional DML or DDL operation
Backtrack is not destructive; you can backtrack multiple times to find the right point in time
Also useful for QA (rewind your DB between test runs)

© 2020, Amazon Web Services, Inc. or its Affiliates.


HA&DR: from one region to multiple regions…

Logical, using binary log replication


Cross-region read Up to 5 readable replica clusters
replicas Managed by the RDS service

Physical (redo log) based replication


Aurora Global Up to 1* readable replica cluster
Database Purpose built replication infrastructure

© 2020, Amazon Web Services, Inc. or its Affiliates.


Cross region read replicas (logical)

Promote remote readers to a master for faster


recovery in the event of disaster (low RTO/low
RPO solution).

Bring data close to your customer’s applications


in different regions

Promote to a master for easy migration

Replica clusters are writable unless you set


read_only = 1

Writer in replica cluster applies logical changes,


lag subject to workload, but isolates the replica

© 2020, Amazon Web Services, Inc. or its Affiliates.


Aurora Global Database

Faster disaster recovery and enhanced data locality Northern Virginia


(secondary region)

Inbound replication
Oregon Ohio
(secondary region) (primary region)
R R

Inbound replication
M R R Storage

R R
Storage
Ireland
Storage
Outbound replication (secondary region)

Inbound replication
High throughput:
R R
Low replica lag:
Fast recovery: Storage
multiple
in-place conversion

© 2020, Amazon Web Services, Inc. or its Affiliates.


HA: reducing the impact of downtime/failures

Multiple concurrent writer DB instances


Aurora Multi-Master
When one fails others are still available

Cluster-aware clients
Efficient Connection RDS Proxy
Management Failover optimization and testing

© 2020, Amazon Web Services, Inc. or its Affiliates.


Hands-on with Amazon Aurora (MySQL)

Suggested hands-on labs:

1. Prerequisites (20min, if not completed already, let CloudFormation provision the DB cluster)
2. Backtrack a DB Cluster (15 min)
3. Test Fault Tolerance (15-30 min)

Hands-on labs will exercise the following:


• Deployment automation via CloudFormation (if not completed already)
• Reverting accidental DML operations
• Testing, detecting and recovering from failovers

© 2019,
2020, Amazon Web Services, Inc. or its Affiliates.

You might also like