More Related Content Similar to Deep Dive - Amazon Relational Database Services_AWSPSSummit_Singapore (20) More from Amazon Web Services (20) Deep Dive - Amazon Relational Database Services_AWSPSSummit_Singapore1. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
Julian Lau
Head of Solutions Architect ASEAN, Worldwide Public Sector, AWS
Deep Dive: Amazon Relational Database
Service (RDS)
2. AWS Database Services
Amazon
DynamoDB
Amazon
ElastiCache
Amazon
Neptune
The image
part with
relationship
ID rId2 was
not found in
the file.
The
image
part
with
relation
ship ID
rId4
was not
found
in the
file.
Th
e
ima
ge
par
t
wit
h
rela
tio
nsh
ip
ID
rId
6
wa
s
not
fou
nd
in
the
file.
Key value | Document Graph Database
Non-relational
AWS Database Migration
Service
Relational
Amazon Aurora Amazon Relational Database Service (RDS)
3. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Relational databases are complex
Our experience running Amazon.com
taught us that relational databases can
be a pain to manage and operate with
high availability
It’s expensive and complex to manage
administrative functions including regular
patching cycles, performance optimization,
and backup and disaster recovery—all for
constantly changing applications
4. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Lower TCO because we manage critical
administrative functions
• Automated hardware provisioning, database
setup, patching, & backups
• Get more leverage from your teams
• Focus on the things that differentiate you
Customers wanted a simpler way to run relational
databases on AWS with high performance and at less cost…
so we created Amazon Relational Database Service (RDS)
Built-in high availability and disaster
recovery across multiple data centers
• Enabled with a single API call or click of a
button in the console
• Even a small startup can leverage enterprise-
level availability, durability, and scalability
5. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Amazon RDS
Managed relational database service with a choice of popular database engines
No need to provision
infrastructure, install,
and maintain DB
software
Scale DB compute and
storage with a few
clicks; minimal
downtime for your
application
Automatic Multi-AZ
data replication;
automated
backup, snapshots,
and failover
SSD storage and
guaranteed
provisioned I/O; data
encryption at rest and
in transit
6. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Ease of administration
• Single console for managing all
your relational databases
• Hardware provisioning, patching,
backup/restore, scaling, and high
availability with a few clicks
• Security and monitoring is built in
7. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Multi-AZ deployments
Enterprise-grade high availability
Fault tolerance across
multiple data centers
• Automatic failover
• Synchronous replication
• Enabled with one click
Availability Zone A
Availability Zone B
Application
servers
Database
failure Standby
Primary
New standby
8. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Read Replicas
Read scaling and disaster recovery
RDS for MySQL, PostgreSQL,
MariaDB
• Relieve pressure on your master node
with additional read capacity
• Bring data close to your applications
in different regions
• Promote a read replica to a master for
faster recovery in the event of disaster
Asynchronous
replication
BI/reporting
application server
Read only
Read/write Primary
Read replica
9. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Automated backups
Point-in-time recovery for your DB instance
• Scheduled daily volume backup of
entire instance
• Archive database change logs
• 35–day maximum retention
• Minimal impact on database
performance
• Taken from standby when
running Multi-AZ
Every day during your backup
window, RDS creates a storage
volume snapshot of your instance
Every five minutes, RDS backs up the
transaction logs of your database
10. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Database snapshots
Backups of your entire DB instance in Amazon S3
Bucket
Volume
Snapshot 2Snapshot 1 Snapshot 3
• Always incremental
• Amazon S3 à
99.999999999% durability
• Supports encryption
• Copy across accounts,
across regions
11. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Scale compute and storage with ease
Scale compute to
handle increased load
• Up to 64 vCPU and 488
GiB of RAM
Scale storage for larger
data sets
• Scalable EBS storage
up to 16TB
• No downtime for
storage scaling
Scale down to
control costs
• As little as 1vCPU / 1
GiB of RAM
12. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Amazon Aurora Deep Dive
13. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Amazon Aurora is…
Fully managed service – automate administrative tasks
1
2
3
Scale-out, distributed, multi-tenant design
Service-oriented architecture leveraging AWS services
14. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Scale-out, distributed, multi-tenant architecture
Availability
Zone 1
Availability
Zone 2
Availability
Zone 3
Shared storage volume
Storage nodes with SSDs
Master
SQL
Transactions
Caching
• Purpose-built log-structured
distributed storage system
designed for databases
Replica Replica
SQL
Transactions
Caching
SQL
Transactions
Caching
• Storage volume is striped across
hundreds of storage nodes
distributed over 3 different
Availability Zones
• Master and replicas all point to
the same storage
• Six copies of data, two copies in
each Availability Zone to protect
against AZ+1 failures
15. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Automate administrative tasks
Schema design
Query construction
Query optimization
Automatic fail-over
Backup & recovery
Isolation & security
Industry compliance
Push-button scaling
Automated patching
Advanced monitoring
Routine maintenance
Takes care of your time-consuming database management tasks, freeing you
to focus on your applications and business
You
AWS
16. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Amazon Aurora is fast …
5x faster than MySQL
17. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
18. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
With user connection With number of tables
With database size - SYSBENCH With database size - TPCC
Connections
Amazon
Aurora
RDS MySQL
w/ 30K IOPS
50 40,000 10,000
500 71,000 21,000
5,000 110,000 13,000
Tables
Amazon
Aurora
MySQL
I2.8XL
local SSD
RDS MySQL
w/ 30K IOPS
(single AZ)
10 60,000 18,000 25,000
100 66,000 19,000 23,000
1,000 64,000 7,000 8,000
10,000 54,000 4,000 5,000
8x
U P T O
F A S T E R
11x
U P T O
F A S T E R
DB Size
Amazon
Aurora
RDS MySQL
w/ 30K IOPS
1GB 107,000 8,400
10GB 107,000 2,400
100GB 101,000 1,500
1TB 26,000 1,200
DB Size Amazon Aurora
RDS MySQL
w/ 30K IOPS
80GB 12,582 585
800GB 9,406 69
21
U P T O
F A S T E R
136x
U P T O
F A S T E R
Aurora Performance Scales with Heavy Workloads
19. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Do fewer I/Os
Minimize network packets
Cache prior results
Offload the database engine
DO LESS WORK
Process asynchronously
Reduce latency path
Use lock-free data structures
Batch operations together
BE MORE EFFICIENT
DATABASES ARE ALL ABOUT I/O
NETWORK-ATTACHED STORAGE IS ALL ABOUT PACKETS/SECOND
HIGH-THROUGHPUT PROCESSING IS ALL ABOUT CONTEXT SWITCHES
How does Aurora Achieve Higher Performance?
20. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
BINLOG DATA DOUBLE-WRITELOG FRM FILES
TYPE OF WRITE
MYSQL WITH REPLICA
EBS mirrorEBS mirror
AZ 1 AZ 2
Amazon S3
EBS
Amazon Elastic
Block Store (EBS)
Primary
Instance
Replica
Instance
1
2
3
4
5
AZ 1 AZ 3
Primary
Instance
Amazon S3
AZ 2
Replica
Instance
ASYNC
4/6 QUORUM
DISTRIBUTED
WRITES
Replica
Instance
AMAZON AURORA
780K transactions
7,388K I/Os per million txns (excludes mirroring, standby)
Average 7.4 I/Os per transaction
MySQL I/O profile for 30 min Sysbench run
27,378K transactions 35X MORE
0.95 I/Os per transaction (6X amplification) 7.7X LESS
Aurora IO profile for 30 min Sysbench run
Comparison of Aurora I/O Profile
21. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
What about availability
“Performance only matters if your database is up”
22. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Aurora has a 6-way replicated storage for HA
Six copies across three Availability Zones
• 4 out of 6 write quorum; 3 out of 6 read quorum
• Peer-to-peer replication for repairs
SQL
Transaction
AZ 1 AZ 2 AZ 3
Caching
SQL
Transaction
AZ 1 AZ 2 AZ 3
Caching
Read availabilityRead and write availability
23. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Also have up to 15 promotable read replicas
Master
Read
Replica
Read
Replica
Read
Replica
Shared distributed storage volume
Reader end-point
► Up to 15 promotable read replicas across multiple availability zones
► Re-do log based replication leads to low replica lag – typically < 10ms
► Reader end-point with load balancing and auto-scaling * NEW *
24. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
25. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Amazon Aurora is easy to use
Automated storage management, security and compliance,
advanced monitoring, database migration.
26. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Everything you get from Amazon RDS . . .
Power, HVAC, net
Rack and stack
Server maintenance
OS patches
DB software patches
Database backups
Scaling
High availability
DB software installs
OS installation
App optimization
Power, HVAC, net
Rack and stack
Server maintenance
OS patches
DB software patches
Database backups
Scaling
High availability
DB software installs
OS installation
App optimization
Power, HVAC, net
Rack and stack
Server maintenance
OS patches
DB software patches
Database backups
Scaling
High availability
DB software installs
OS installation
App optimization
Database on-premises Database on EC2 Amazon RDS
Managed
by you
Managed
by AWS
27. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
…and more
§ Automatic storage scaling up to 64 TB—no performance impact
Up to 64TB of storage – auto-incremented in 10GB units
up to 64 TB
§ Continuous, incremental backups to Amazon S3
§ Instantly create user snapshots—no performance impact
§ Automatic restriping, mirror repair, hot spot management, encryption
28. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Fast database cloning
Create a copy of a database without duplicate
storage costs
• Creation of a clone is nearly instantaneous –
we don’t copy data
• Data copy happens only on write – when
original and cloned volume data differ
Typical use cases:
• Clone a production DB to run tests
• Reorganize a database
• Save a point in time snapshot for analysis
without impacting production system.
Production database
Clone Clone
Clone
Dev/test
applications
Benchmarks
Production
applications
Production
applications
29. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Security and Monitoring
30. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Security and compliance
R Network isolation with Amazon Virtual Private
Cloud (VPC)
R AWS Identify and Access Management (IAM)
based resource-level permission controls
R Encryption to secure data at rest using
customer managed keys
• AES-256; hardware accelerated
• All blocks on disk and in Amazon S3 are encrypted
• Key management via AWS KMS
R Encrypted cross-region replication, snapshot
copy - SSL to secure data in transit
R Advanced auditing and logging without any
performance impact
Data Key 1 Data Key 2 Data Key 3 Data Key 4
Customer Master
Key(s)
Storage
Node
Storage
Node
Storage
Node
Storage
Node
Database
Engine
31. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Database activity monitoring and insights
Search: Look for specific events across log files.
Metrics: Measure activity in your Aurora DB cluster.
§ Continuously monitor activity in your DB clusters by sending these audit logs to CloudWatch Logs.
§ Export to S3 for long term archival; analyze logs using Athena; visualize logs with QuickSight.
Visualizations: Create activity dashboards
Alarms: Get notified or take actions
Amazon Aurora Amazon CloudWatch
Amazon Athena
Amazon QuickSight
S3
32. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
What’s new in Aurora Database?
33. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Aurora MySQL 5.7 compatibility Available Now
Aurora MySQL 1.x = MySQL 5.6 compatible
Aurora MySQL 2.x = MySQL 5.7 compatible
• Available now
o JSON support
o Generated Columns
o Spatial indexes (already supported in Aurora 5.6)
o …
o General performance improvements
• Coming later
o Performance Schema
o GTID
o Multi-source replication
o Selective replication
o …
34. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
“Backtrack” provides near-instantaneous restores
Available Now
Backtrack quickly brings the database to a desired point in time.
No restore from backup. No copying of data. Not destructive – can backtrack many times.
Quickly recover from unintentional DML/DDL operations.
T0 T1 T2
T0 T1
T2
T3 T4
T3
T4
REWIND TO T1
REWIND TO T3
INVISIBLE INVISIBLE
35. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Aurora Serverless Available Now
When you provision a database,
Aurora Serverless:
• Creates an Aurora storage volume
• Provisions proxy endpoint in your
VPC for application connection
• Configures network load balancing
behind proxy
• Initializes request routers to route
database traffic
• Provisions initial capacity
Use cases include: Infrequently used
applications (e.g. low-volume blog
site); spiky workload; Test &
Development databases
DATABASE STORAGE
APPLICATION
CUSTOMER VPC
VPC PROXY
ENDPOINTS
VPC
ENDPOINTS
NETWORK LOAD BALANCER
REQUEST
ROUTERS
INITIAL
CAPACITY
36. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Performance Insights Available Now
Dashboard showing
Load on Database
• Easy
• Powerful
Identifies source of bottlenecks
• Top SQL
Adjustable time frame
• Hour, day, week , month
• Up to 35 days of data
Max CPU