Introduction To Amazon Aurora, Amazon Aurora
applying a Service-oriented architecture
to the database
Aurora Makes it Easy to Run Your Databases
Aurora simplifies storage management
Aurora simplifies Data Security
Aurora is Highly Available
2. Current DB Architectures are Monolithic
Multiple layers of
functionality all on a
single box
SQL
Transactions
Caching
Logging
This is also a problem.
For cost. For flexibility. And for availability.
5/9/2018 Dztech 2
3. Introduction To Amazon Aurora
• Amazon Aurora is a MySQL-compatible, enterprise-grade relational
database engine built for the cloud.
• Amazon Aurora is to overcome the performance, scalability, and
availability limitations of traditional databases in a cost-effective
manner similar to open-source databases. Amazon uses service-
oriented Architecture.
5/9/2018 Dztech 3
4. Amazon Aurora
applying a Service-oriented architecture
to the database
• Moved the logging and storage layer
into a multi-tenant, scale-out
database-optimized storage service
• Integrated with other AWS Services
like EC2, VPC, DynamoDB, SWF,
Route 53 for control plane
operations
• Integrated with S3 for continuous
backup and 99.999999999%
durability
Logging + Storage
SQL
Transactions
Caching
Control PlaneData Plane
Amazon S3
DynamoDB
Amazon SWF
Amazon Route 53
5/9/2018 Dztech 4
5. Aurora Makes it Easy to Run Your Databases
• Create a database in minutes
• Automatic patching
• Push-button scaling
• Failure detection and failover.
• Read Replica’s are available as failover targets, with no data loss
Amazon
RDS
5/9/2018 Dztech 5
6. Aurora simplifies storage management
• Instant creation of user-snapshots
• Continuous backups to S3
• Automatic storage scaling up to 64 TB -
no performance or availability impact
• Automatic restriping, mirror repair, hot
spot management, encryption
Amazon
RDS
5/9/2018 Dztech 6
7. Aurora simplifies Data Security
• Encryption to secure data at rest
–
–
–
AES-256; hardware accelerated
All blocks on disk and in Amazon S3 encrypted
Key management via AWS KMS
•
•
SSL to secure data in transit
Network isolation via Amazon VPC
by default
•
•
No direct access to nodes
Supports industry standard security
and data protection certifications
AZ 1 AZ 3
Primary
Instance
Amazon S3
Replica
Instance
Customer
VPC
Internal
VPC
MySQLApp
AZ 2
5/9/2018 Dztech 7
8. •
Aurora is Highly Available
Highly available by default
–
–
–
6-way replication across 3 AZs
4 of 6 write quorum
• Automatic fallback to
3 of 4 if an AZ is unavailable
3 of 6 read quorum
•
•
SSD, scale-out, multi-tenant storage
– Seamless storage scalability
– Up to 64TB database size
– Only pay for what you use
Log-structured storage
– Many small segments, each with
their own redo logs
–
–
Log pages used to generate data pages
Eliminates chatter between database and storage
AZ 1
SQL
Transaction
s
AZ 2 AZ 3
Caching
Amazon S3
5/9/2018 Dztech 8
9. Self-healing and fault-tolerant
•
•
•
Lose 2 copies or an AZ failure without read or write availability impact
Lose 3 copies without read availability impact
Automatic detection, replication and repair
AZ 1 AZ 2 AZ 3
SQL
Transaction
Caching
AZ 1 AZ 2 AZ 3
SQL
Transaction
Caching
Read & Write AvailabilityRead Availability5/9/2018 Dztech 9
10. Checkpointed Data Redo Log
Traditional Databases
• Have to replay logs since the
last checkpoint
• Single threaded in MySQL;
requires a large number of
disk accesses
Crash at T0 requires
a re-application of the
SQL in the redo log since
last checkpoint
T0 T0
Amazon Aurora
• Underlying storage replays
redo records on demand as
part of a disk read
• Parallel, distributed,
asynchronous
Crash at T0 will result in redo
logs being applied to each segment
on demand, in parallel, asynchronously
Aurora Has Instant Crash Recovery
5/9/2018 Dztech 10
11. Aurora’s Cache Survives a DB Restart
•
•
We moved the cache out of
the database process
Cache remains warm in the
•
event of a database restart
Lets you resume fully
•
loaded operations much
faster
Instant crash recovery +
survivable cache = quick
and easy recovery from DB
failures
SQL
Transactions
Caching
SQL
Transactions
Caching
SQL
Transactions
Caching
Caching Process is Outside the DB process
and remains warm across a database restart
5/9/2018 Dztech 11
12. •
•
•
•
Replicas must replay logs
Replicas place additional load on master
Replica lag can grow indefinitely
Failover results in data loss
Page cache
invalidation
30% Read
Aurora Master
70% Write
Aurora Replica
100% New
Reads
Shared Multi-AZ Storage
30% Read
MySQL Master
70% Write
30% New Reads
MySQL Replica
70% Write
Multiple failover targets, without data loss.
Single
threaded
binlog apply
Data Volume
MySQL Read Scaling
Data Volume
5/9/2018 Dztech 12
14. Amazon Aurora migration options
Source database From where
RDS
EC2, on-premises
EC2, on-premises, RDS
Recommended option
Console based automated
snapshot ingestion and catch
up via binlog replication.
Binary snapshot ingestion
through S3 and catch up via
binlog replication.
Schema conversion using
SCT and data migration via
DMS.
5/9/2018 Dztech 14
15. DB snapshot migration
One-click migration from
RDS MySQL 5.6 to Aurora
Automatic conversion from
MyISAM to InnoDB
Most migrations take <1 hr,
longer for large databases
One click replication from
RDS MySQL to Amazon
Aurora
DB
Snapshot
One-click
Migrate
RDS MySQL
Master/Slave New Aurora
Cluster
5/9/2018 Dztech 15
16. Migrating from self-managed MySQL to Aurora
• Import MySQL snapshots into Aurora through
S3
1)
2)
3)
4)
5)
Execute Percona XtraBackup
Upload database snapshot to S3
Import snapshot from S3 to Aurora cluster
Setup logical replication to catch-up
Transition database workload to Aurora
cluster
•
•
Faster migration for large databases (1+ TB)
Import schema and data in one operation
5/9/2018 Dztech 16
17. Creating an Amazon Aurora Database
• At the top-right corner, choose the AWS Region in which you want to create the Amazon Aurora cluster, and
then choose Get Started Now. On the next screen, choose Amazon Aurora, and then choose Select as
shown following.
Step: 1
5/9/2018 Dztech 17
18. • Next, on the DB details page, you select the size for your Amazon Aurora primary instance and provide other
details like the database identifier, master user name, and password, as shown following. You then choose
Next Step.
Step: 2
5/9/2018 Dztech 18
19. • On the next screen, you can customize additional settings for your Amazon Aurora database cluster like VPC
selection, database name, port number, and so on. Accept the default settings, and choose Launch DB
Instance. Your Amazon Aurora instance will launch in a few minutes.
Step: 3
5/9/2018 Dztech 19
20. Connecting to Your Amazon Aurora Database
• Navigate to the Instances tab in the RDS dashboard, and you will see your Amazon Aurora instance listed
there. You can see the details of your Amazon Aurora cluster like the cluster endpoint and the port number, as
shown following
• Use the endpoint and port number in your JDBC and ODBC connection strings to connect from your
application or standard tools. You can use your favorite tools like MySQL Workbench, Navicat, Webyog, Toad,
or Oracle SQL Developer to connect and work with your Amazon Aurora database.
Step: 4
5/9/2018 Dztech 20
21. Conclusion
• Amazon Aurora is a high performance, highly available, enterprise-grade database built for the cloud. Amazon
Aurora is offered as a managed service without the common and time-consuming administrative tasks
associated with managing a database on your own, freeing you to focus on your applications and business. An
Amazon Aurora cluster can be created in just a few clicks and is extremely easy to use, manage, and scale.
• With Amazon Aurora, there are no license fees or up-front commitment. You simply pay an hourly charge for
each Amazon Aurora cluster that you create, and when you’re finished you simply delete the cluster and stop
paying. You can scale your Amazon Aurora cluster up or down as required with just a few clicks. Your Amazon
Aurora primary instance can scale up to 32 vCPUs and 244 GiB memory, and you can add up to 15 Amazon
Aurora Replicas each, with up to 32 vCPUs and 244 GiB memory to further scale read capacity. Amazon Aurora
storage automatically grows as needed from 10 GB to 64 TB; there is no need to provision or manage storage.
5/9/2018 Dztech 21