SlideShare une entreprise Scribd logo
1  sur  63
Télécharger pour lire hors ligne
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS re:INVENT
DAT202: Getting started with Amazon Aurora
D e b a n j a n S a h a , G e n e r a l M a n a g e r , A m a z o n W e b S e r v i c e s
G u r m i t S i n g h G h a t o r e , P r i n c i p a l D a t a b a s e E n g i n e e r , E x p e d i a
B r a n d o n O ’ B r i e n , P r i n c i p a l S o f t w a r e E n g i n e e r , E x p e d i a
What is Amazon Aurora ……
Datab ase re imag ine d for the clou d
 Speed and availability of high-end commercial databases
 Simplicity and cost-effectiveness of open source databases
 Drop-in compatibility with MySQL and PostgreSQL
 Simple pay as you go pricing
Delivered as a managed service
Re-imagining relational database
Automate administrative tasks – fully managed service
1
2
3
Scale-out and distributed design
Service-oriented architecture leveraging AWS services
Scale-out, distributed architecture
Master Replica Replica Replica
Availability
Zone 1
Shared storage volume
Availability
Zone 2
Availability
Zone 3
Storage nodes with SSDs
 Purpose-built log-structured distributed
storage system designed for databases
 Storage volume is striped across
hundreds of storage nodes distributed
over 3 different availability zones
 Six copies of data, two copies in each
availability zone to protect against
AZ+1 failures
 Plan to apply same principles to other
layers of the stack
SQL
Transactions
Caching
SQL
Transactions
Caching
SQL
Transactions
Caching
Leveraging cloud ecosystem
Lambda
S3
IAM
CloudWatch
Invoke Lambda events from stored procedures/triggers.
Load data from S3, store snapshots and backups in S3.
Use IAM roles to manage database access control.
Upload systems metrics and audit logs to CloudWatch.
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
Aurora is used by ¾ of the
top 100 AWS customers
Aurora customer adoption
Fastest growing service in AWS history
Who are moving to Aurora and why?
Customers using
commercial engines
Customers using
MySQL engines
 Higher performance – up to 5x
 Better availability and durability
 Reduces cost – up to 60%
 Easy migration; no application change
 One tenth of the cost; no licenses
 Integration with cloud ecosystem
 Comparable performance and availability
 Migration tooling and services
Cassandra (>100 nodes) Aurora (~10 clusters)
RM
DNA analysis and matching
(millions of reads and writes)
Large genealogy company achieved <10ms read latency and an order of
magnitude reduction in projected costs by migrating to Aurora
 Data sharded across ~10 Aurora R3.XLarge clusters - sufficient room for vertical scaling
 OLAP + OLTP: DNA matching algorithms require millions of reads and batch updates
RM
RM
Data store for high-performance applications
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
An on demand video streaming service stores metadata for millions of videos in in-
memory data structures.
 Regular backups required; high and ever-increasing cost due to years worth of video metadata.
 Aurora used as the persistent data-store with Redis front-end cache to provide HA and optimal
performance at lower costs, and eliminating the need for costly backups.
…
Amazon Aurora
In-memory store
Backups
$$$
Highly-available persistent data store
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
S3 Amazon Aurora
Transform and insert
EMR
Redshift
• Transaction streams from various sources comes to different S3 buckets.
• S3 event invoke a Lambda function, which reads the file and upload to Aurora
• Aurora is used for data processing, validation and operational reporting
• Processed data is loaded into Redshift and EMR for deep-analytics
Data processing pipeline
Amazon Aurora is fast …
5x faster than MySQL
WRITE PERFORMANCE READ PERFORMANCE
MySQL SysBench results
R3.8XL: 32 cores / 244 GB RAM
5X faster than RDS MySQL 5.6 & 5.7
Five times higher throughput than stock MySQL
based on industry standard benchmarks.
0
25,000
50,000
75,000
100,000
125,000
150,000
0
100,000
200,000
300,000
400,000
500,000
600,000
700,000
Aurora MySQL 5.6 MySQL 5.7
Aurora Scaling
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
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
How did we achieve this?
DATABASES ARE ALL ABOUT I/O
NETWORK-ATTACHED STORAGE IS ALL ABOUT PACKETS/SECOND
HIGH-THROUGHPUT PROCESSING IS ALL ABOUT CONTEXT SWITCHES
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
DISTRIBUT
ED 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
Aurora I/O profile
Scan
Delete
Aurora lock management
Scan
Delete
Insert
Scan Scan
Insert
Delete
Scan
Insert
Insert
MySQL lock manager Aurora lock manager
 Same locking semantics as MySQL
 Concurrent access to lock chains
Needed to support many concurrent sessions, high update throughput
 Multiple scanners in individual lock chains
 Lock-free deadlock detection
New performance enhancements
► Smart selector
► Logical read ahead
► Read views
► Hash joins *coming soon*
► Parallel query *coming soon*
Read performance
Write performance
Meta-data access
► NUMA aware scheduler
► Latch-free lock manager
► Instant schema update
► B-Tree concurrency
► Catalog concurrency
► Faster index build
Online DDL: Aurora vs. MySQL
 Full Table copy; rebuilds all indexes
 Needs temporary space for DML operations
 DDL operation impacts DML throughput
 Table lock applied to apply DML changes
Index
LeafLeafLeaf Leaf
Index
Root
table name operation column-name time-stamp
Table 1
Table 2
Table 3
add-col
add-col
add-col
column-abc
column-qpr
column-xyz
t1
t2
t3
 Use schema versioning to decode the block.
 Modify-on-write primitive to upgrade to latest schema
 Currently support add NULLable column at end of table
 Add column anywhere and with default coming soon.
MySQL Amazon Aurora
Online DDL performance
On r3.large
On r3.8xlarge
Aurora MySQL 5.6 MySQL 5.7
10GB table 0.27 sec 3,960 sec 1,600 sec
50GB table 0.25 sec 23,400 sec 5,040 sec
100GB table 0.26 sec 53,460 sec 9,720 sec
Aurora MySQL 5.6 MySQL 5.7
10GB table 0.06 sec 900 sec 1,080 sec
50GB table 0.08 sec 4,680 sec 5,040 sec
100GB table 0.15 sec 14,400 sec 9,720 sec
What about availability
“Performance only matters if your database is up”
Six copies across three availability zones
4 out 6 write quorum; 3 out of 6 read quorum
Peer-to-peer replication for repairs
Volume striped across hundreds of storage nodes
SQL
Transaction
AZ 1 AZ 2 AZ 3
Caching
SQL
Transaction
AZ 1 AZ 2 AZ 3
Caching
Read and write availabilityRead availability
6-way replicated storage
Su rvive s catastrop hic failu re s
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 *
Database fail-over time
0.00%
5.00%
10.00%
15.00%
20.00%
25.00%
30.00%
35.00%
1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35
0 - 5s – 30% of fail-overs
0.00%
5.00%
10.00%
15.00%
20.00%
25.00%
30.00%
35.00%
40.00%
45.00%
50.00%
1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35
5 - 10s – 40% of fail-overs
0%
10%
20%
30%
40%
50%
60%
1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35
10 - 20s – 25% of fail-overs
0%
5%
10%
15%
20%
1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35
20 - 30s – 5% of fail-overs
Cross-region read replicas
Faste r disaste r re cove ry and e nhance d data locality
Promote read-replica to a master
for faster recovery in the event of
disaster
Bring data close to your
customer’s applications in
different regions
Promote to a master for easy
migration
Availability is about more than HW failures
You also incur availability disruptions when you
1. Patch your database software – Zero Down Time Patch
2. Perform large scale database reorganizations – Fast Cloning
3. DBA errors requiring database restores – Online Point-in-time Restore
Zero downtime patching
Networking
state
Application
state
Storage Service
App
state
Net
state
App
state
Net
state
BeforeZDP
New DB
Engine
Old DB
Engine
New DB
Engine
Old DB
Engine
WithZDP
User sessions terminate
during patching
User sessions remain
active through patching
Storage Service
Database backtrack
Backtrack brings the database to a point in time without requiring restore from backups
• Backtracking from an unintentional DML or DDL operation
• Backtrack is not destructive. You can backtrack multiple times to find the right point in time
t0 t1 t2
t0 t1
t2
t3 t4
t3
t4
Rewind to t1
Rewind to t3
Invisible Invisible
Security and Monitoring
Security and compliance
 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
 Encrypted cross-region replication,
snapshot copy - SSL to secure data in
transit
 Advanced auditing and logging without
any performance impact
 Database activity monitoring
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
*NEW*
Aurora Auditing
MariaDB server_audit plugin Aurora native audit support
We can sustain over 500K events/sec
Create event string
DDL
DML
Query
DCL
Connect
DDL
DML
Query
DCL
Connect
Write
to File
Create event string
Create event string
Create event string
Create event string
Create event string
Latch-free
queue
Write to File
Write to File
Write to File
MySQL 5.7 Aurora
Audit Off 95K 615K 6.47x
Audit On 33K 525K 15.9x
Sysbench Select-only Workload on 8xlarge Instance
Database activity monitoring
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
Industry certifications
 Amazon Aurora gives each database
instance IP firewall protection
 Aurora offers transparent encryption at rest
and SSL protection for data in transit
 Amazon VPC lets you isolate and control
network configuration and connect
securely to your IT infrastructure
 AWS Identity and Access Management
provides resource-level permission
controls
*New* *New* *New*
Performance Insights
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
Amazon Aurora is easy to use
Automated storage management, security and compliance,
advanced monitoring, database migration.
Simplify storage management
 Continuous, incremental backups to Amazon S3
 Instantly create user snapshots—no performance impact
 Automatic storage scaling up to 64 TB—no performance impact
 Automatic restriping, mirror repair, hot spot management, encryption
Up to 64TB of storage – auto-incremented in 10GB units
up to 64 TB
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
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
DevTest environments
Master Replica
Shared storage volume
Clone
Shared storage volume
Master Replica
Production Account Development Account
Cross-account snapshot
Test on prod data
• Create a clone of multi-terabyte DB clusters in minutes. Use for diagnosis and pre-
prod testing
• Restore a production DB cluster in a development accounts for development, staging,
or partnering with other teams
Leverage MySQL and AWS ecosystems
Query and
Monitoring
Business
Intelligence
Source: Amazon
Data Integration
“We ran our compatibility test suites against Amazon Aurora and everything
just worked." - Dan Jewett, Vice President of Product Management at Tableau
Lambda IAM
CloudWatch
S3
Route53
KMS
AWS Ecosystem
VPC SWF
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Hybrid operations and migration
Amazon Aurora
Corporate Data Center
Replication
Analytics
Prod apps
Provider of an online marketplace for short-term rentals replicates on-premise
production data into Aurora for read-only analytics workloads.
 Seamless replicate to Aurora: Full compatibility with MySQL and PostgreSQL
 Data replicated in minutes – run analytics on near real-time data
 Provides a clean waypoint towards full write/read migration
MySQL
Amazon Aurora migration options
Source database From where Recommended option
RDS
EC2, on premise
EC2, on premise, RDS
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.
Amazon Aurora saves you money
1/10th of the cost of commercial databases
Cheaper than even MySQL
Cost of ownership: Aurora vs. MySQL
MySQL config u ration hou rly cost
Primary
r3.8XL
Standby
r3.8XL
Replica
r3.8XL
Replica
R3.8XL
Storage
6 TB / 10 K PIOP
Storage
6 TB / 10 K PIOP
Storage
6 TB / 5 K PIOP
Storage
6 TB / 5 K PIOP
$1.33/hr
$1.33/hr
$1.33/hr $1.33/hr
$2,42/hr
$2,42/hr $2,42/hr
Instance cost: $5.32 / hr
Storage cost: $8.30 / hr
Total cost: $13.62 / hr
$2,42/hr
Cost of ownership: Aurora vs. MySQL
Au rora config u ration hou rly cost
Instance cost: $4.86 / hr
Storage cost: $4.43 / hr
Total cost: $9.29 / hr
Primary
r3.8XL
Replica
r3.8XL
Replica
R3.8XL
Storage / 6 TB
$1.62 / hr $1.62 / hr $1.62 / hr
$4.43 / hr
*At a macro level Aurora saves over 50% in
storage cost compared to RDS MySQL.
31.8%
Savings
 No idle standby instance
 Single shared storage volume
 No PIOPs – pay for use I/O
 Reduction in overall IOP
Cost of ownership: Aurora vs. MySQL
Fu rthe r op p ortu nity for saving
Instance cost: $2.43 / hr
Storage cost: $4.43 / hr
Total cost: $6.86 / hrStorage IOPs assumptions:
1. Average IOPs is 50% of Max IOPs
2. 50% savings from shipping logs vs. full pages
49.6%
Savings
Primary
r3.8XL
Replica
r3.8XL
Replica
r3.8XL
Storage / 6TB
$0.81 / hr $0.81 / hr $0.81 / hr
$4.43 / hr
r3.4XL r3.4XL r3.4XL
 Use smaller instance size
 Pay-as-you-go storage
Higher performance, lower Cost
 Fewer instances needed
 Smaller instances can be used
Safe.com lowered their bill by 40% by switching from sharded
MySQL to a single Aurora instance.
Double Down Interactive (gaming) lowered their bill by 67%
while also achieving better latencies (most queries ran faster)
and lower CPU utilization.
 No need to pre-provision storage
 No additional storage for read replicas
Higher performance, lower Cost
Our application usage had grown exponentially over the last year. We were
looking for horizontal scaling of our database to address the increased load.
Amazon Aurora’s relatively low replication lag has helped us handle current load
and positions us well for future growth.
“
7x 10x
Database connections CPU utilization
2x
Response time
“
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
G u r m i t S i n g h G h a t o r e , P r i n c i p a l D a t a b a s e E n g i n e e r
B r a n d o n O ’ B r i e n , P r i n c i p a l S o f t w a r e E n g i n e e r
Expedia – Journey to Amazon Aurora
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
PRODUCT ENGINEERING
Real-time contextual pricing Low-latency pricing service
• Enhance traveler’s shopping
experience with contextual
pricing e.g. strikethrough price
• Build a system that computes
lodging price in real time
• Build a serving layer to surface
prices to live Expedia traffic
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
START OF THE JOURNEY
Flexibility
Single use case
$$ High operational costs
Ad hoc queries
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
TRANSITION TO AMAZON AURORA
Scalable Low maintenance High performance
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
WORKLOAD HIGHLIGHTS
1B+ 4,000 25,000
rows writes/second reads/second
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
ON THE PATH - INFRASTRUCTURE DETAILS
Shared storage volume
Primary Replica Replica…
12 EC2 instances
c3.8xlarge
6 Aurora Replicas
db.r3.8xLarge
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
ARCHITECTURE
Shared storage volume
Primary Replica Replica…
Client
Shared storage volume
Primary Replica Replica…
Node.js
Client
Lodgin
g
service
us-west-2 us-east-1
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
REQUIREMENTS AND SOLUTIONS
<100 ms
99% of read responses
• Node.js splits the incoming read
request into smaller batches and
fires off to all read replicas in
parallel.
• Results returned by Aurora are
combined in Node.js
Balanced resource utilization
• Aurora provides connection load
balancing rather than individual
queries.
• We built application connection
pools to load balance across all
read replicas evenly.
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
REQUIREMENTS AND SOLUTIONS (CONT.)
High-volume data ingestion
• Storm cluster parallelizes workload
across storm nodes.
• Each node uses JDBC micro batch
inserts.
Multi-region presence
• Storm persists data to independent
Aurora clusters in local and remote
regions
Why didn’t we use in-built cross-region read replica feature?
Aurora (as of now) supports only one cross-region replica. Also, we can’t create replicas from replica. Adopted solution
allows creating multiple replicas from local primary for regional scale-out with cross region data-out cost only once.
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
REQUIREMENTS AND SOLUTIONS (CONT.)
Schema changes
Fast DDL
We leveraged Aurora Fast DDL to make in-
place simple schema changes to live tables.
AWS Data Migration Service
For complex schema changes, create new schema
table, transfer data and switch.
We utilized AWS DMS service for transferring data
to new schema table.
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
PERFORMANCE SOLUTIONS
Performance degradation over time as client requests and volume increased.
Scale out database Parallelize queries
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
PERFORMANCE NUMBERS
<20 ms <50 ms <10 %
Replication lag Select latency CPU utilization
<1 ms 40+ GB
Insert latency Free-able memory
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
MONETARY AND MAINTENANCE BENEFITS
10-15%
Cost saving vs. Cassandra
<10 minutes
End-to-end downtime
• Applying patches and updates is easy
with very low tolerable downtime
• Initially time was spent in resolving
performance bottlenecks. Later on
maintenance time was on upgrades
and monitoring only.
• Real saving comes from multiple use
of same data with different read
pattern.
• Adhoc querying capability became a
non-event.
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
KEY TAKEAWAYS
Parallelize. Parallelize. Parallelize. Custom load balance reads
Cross-region replication could be challenging (esp. for large volumes).
Explore alternatives.
Complex schema/index changes can be handled with ease using
Aurora features. Leverage Aurora features as much as possible.
Aurora’s low maintenance resulted in increased product velocity.
>
>
>
> >
Some Other Aurora Sessions
DAT301
Deep Dive on Amazon Aurora MySQL compatible
Edition
#1 Wednesday 4:45p
#2 Friday 11:30am
DAT315
A Practitioner’s Guide on Migrating to, and
Running on Amazon Aurora
Thursday 4pm
DAT334 Amazon Aurora Performance Optimization Wednesday 12pm
DAT331 Airbnb Runs on Amazon Aurora Wednesday 1pm
DAT336
Amazon Aurora Storage Demystified: How It All
Works
Wednesday 4pm
DAT338 Migrating from Oracle to Amazon Aurora Thursday 5:30pm
DAT402
Deep Dive on the Amazon Aurora PostgreSQL-
compatible Edition
Wednesday 4pm
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Thank You

Contenu connexe

Tendances

Exploring Oracle Database Performance Tuning Best Practices for DBAs and Deve...
Exploring Oracle Database Performance Tuning Best Practices for DBAs and Deve...Exploring Oracle Database Performance Tuning Best Practices for DBAs and Deve...
Exploring Oracle Database Performance Tuning Best Practices for DBAs and Deve...
Aaron Shilo
 

Tendances (20)

Exploring Oracle Database Performance Tuning Best Practices for DBAs and Deve...
Exploring Oracle Database Performance Tuning Best Practices for DBAs and Deve...Exploring Oracle Database Performance Tuning Best Practices for DBAs and Deve...
Exploring Oracle Database Performance Tuning Best Practices for DBAs and Deve...
 
Oracleのソース・ターゲットエンドポイントとしての利用
Oracleのソース・ターゲットエンドポイントとしての利用Oracleのソース・ターゲットエンドポイントとしての利用
Oracleのソース・ターゲットエンドポイントとしての利用
 
ClickHouse Monitoring 101: What to monitor and how
ClickHouse Monitoring 101: What to monitor and howClickHouse Monitoring 101: What to monitor and how
ClickHouse Monitoring 101: What to monitor and how
 
PLPgSqL- Datatypes, Language structure.pptx
PLPgSqL- Datatypes, Language structure.pptxPLPgSqL- Datatypes, Language structure.pptx
PLPgSqL- Datatypes, Language structure.pptx
 
PostgreSQL and RAM usage
PostgreSQL and RAM usagePostgreSQL and RAM usage
PostgreSQL and RAM usage
 
Highly efficient backups with percona xtrabackup
Highly efficient backups with percona xtrabackupHighly efficient backups with percona xtrabackup
Highly efficient backups with percona xtrabackup
 
Streaming Data Analytics with ksqlDB and Superset | Robert Stolz, Preset
Streaming Data Analytics with ksqlDB and Superset | Robert Stolz, PresetStreaming Data Analytics with ksqlDB and Superset | Robert Stolz, Preset
Streaming Data Analytics with ksqlDB and Superset | Robert Stolz, Preset
 
Vacuum徹底解説
Vacuum徹底解説Vacuum徹底解説
Vacuum徹底解説
 
A Thorough Comparison of Delta Lake, Iceberg and Hudi
A Thorough Comparison of Delta Lake, Iceberg and HudiA Thorough Comparison of Delta Lake, Iceberg and Hudi
A Thorough Comparison of Delta Lake, Iceberg and Hudi
 
Presto
PrestoPresto
Presto
 
【旧版】Oracle Gen 2 Exadata Cloud@Customer:サービス概要のご紹介 [2021年12月版]
【旧版】Oracle Gen 2 Exadata Cloud@Customer:サービス概要のご紹介 [2021年12月版]【旧版】Oracle Gen 2 Exadata Cloud@Customer:サービス概要のご紹介 [2021年12月版]
【旧版】Oracle Gen 2 Exadata Cloud@Customer:サービス概要のご紹介 [2021年12月版]
 
Real-time, Exactly-once Data Ingestion from Kafka to ClickHouse at eBay
Real-time, Exactly-once Data Ingestion from Kafka to ClickHouse at eBayReal-time, Exactly-once Data Ingestion from Kafka to ClickHouse at eBay
Real-time, Exactly-once Data Ingestion from Kafka to ClickHouse at eBay
 
Fig 9-02
Fig 9-02Fig 9-02
Fig 9-02
 
How to build a streaming Lakehouse with Flink, Kafka, and Hudi
How to build a streaming Lakehouse with Flink, Kafka, and HudiHow to build a streaming Lakehouse with Flink, Kafka, and Hudi
How to build a streaming Lakehouse with Flink, Kafka, and Hudi
 
Apache Flink in the Cloud-Native Era
Apache Flink in the Cloud-Native EraApache Flink in the Cloud-Native Era
Apache Flink in the Cloud-Native Era
 
[Postgre sql9.4新機能]レプリケーション・スロットの活用
[Postgre sql9.4新機能]レプリケーション・スロットの活用[Postgre sql9.4新機能]レプリケーション・スロットの活用
[Postgre sql9.4新機能]レプリケーション・スロットの活用
 
PostgreSQL WAL for DBAs
PostgreSQL WAL for DBAs PostgreSQL WAL for DBAs
PostgreSQL WAL for DBAs
 
What is new in PostgreSQL 14?
What is new in PostgreSQL 14?What is new in PostgreSQL 14?
What is new in PostgreSQL 14?
 
Problems with PostgreSQL on Multi-core Systems with MultiTerabyte Data
Problems with PostgreSQL on Multi-core Systems with MultiTerabyte DataProblems with PostgreSQL on Multi-core Systems with MultiTerabyte Data
Problems with PostgreSQL on Multi-core Systems with MultiTerabyte Data
 
ksqlDB: A Stream-Relational Database System
ksqlDB: A Stream-Relational Database SystemksqlDB: A Stream-Relational Database System
ksqlDB: A Stream-Relational Database System
 

Similaire à DAT202_Getting started with Amazon Aurora

Similaire à DAT202_Getting started with Amazon Aurora (20)

AWS re:Invent 2016: Amazon Aurora Deep Dive (GPST402)
AWS re:Invent 2016: Amazon Aurora Deep Dive (GPST402)AWS re:Invent 2016: Amazon Aurora Deep Dive (GPST402)
AWS re:Invent 2016: Amazon Aurora Deep Dive (GPST402)
 
Deep Dive on Amazon Aurora
Deep Dive on Amazon AuroraDeep Dive on Amazon Aurora
Deep Dive on Amazon Aurora
 
AWS re:Invent 2016: Getting Started with Amazon Aurora (DAT203)
AWS re:Invent 2016: Getting Started with Amazon Aurora (DAT203)AWS re:Invent 2016: Getting Started with Amazon Aurora (DAT203)
AWS re:Invent 2016: Getting Started with Amazon Aurora (DAT203)
 
Deep Dive on Amazon Aurora
Deep Dive on Amazon AuroraDeep Dive on Amazon Aurora
Deep Dive on Amazon Aurora
 
AWS November Webinar Series - Aurora Deep Dive
AWS November Webinar Series - Aurora Deep DiveAWS November Webinar Series - Aurora Deep Dive
AWS November Webinar Series - Aurora Deep Dive
 
AWS re:Invent 2016: Workshop: Stretching Scalability: Doing more with Amazon ...
AWS re:Invent 2016: Workshop: Stretching Scalability: Doing more with Amazon ...AWS re:Invent 2016: Workshop: Stretching Scalability: Doing more with Amazon ...
AWS re:Invent 2016: Workshop: Stretching Scalability: Doing more with Amazon ...
 
AWS December 2015 Webinar Series - Amazon Aurora: Introduction and Migration
AWS December 2015 Webinar Series - Amazon Aurora: Introduction and MigrationAWS December 2015 Webinar Series - Amazon Aurora: Introduction and Migration
AWS December 2015 Webinar Series - Amazon Aurora: Introduction and Migration
 
Deep Dive on Amazon Aurora
Deep Dive on Amazon AuroraDeep Dive on Amazon Aurora
Deep Dive on Amazon Aurora
 
Amazon Aurora TechConnect
Amazon Aurora TechConnect Amazon Aurora TechConnect
Amazon Aurora TechConnect
 
(DAT207) Amazon Aurora: The New Amazon Relational Database Engine
(DAT207) Amazon Aurora: The New Amazon Relational Database Engine(DAT207) Amazon Aurora: The New Amazon Relational Database Engine
(DAT207) Amazon Aurora: The New Amazon Relational Database Engine
 
Getting Started with Amazon Aurora
Getting Started with Amazon AuroraGetting Started with Amazon Aurora
Getting Started with Amazon Aurora
 
(DAT312) Using Amazon Aurora for Enterprise Workloads
(DAT312) Using Amazon Aurora for Enterprise Workloads(DAT312) Using Amazon Aurora for Enterprise Workloads
(DAT312) Using Amazon Aurora for Enterprise Workloads
 
Deep Dive on Amazon Aurora
Deep Dive on Amazon AuroraDeep Dive on Amazon Aurora
Deep Dive on Amazon Aurora
 
Build on Amazon Aurora with MySQL Compatibility (DAT348-R4) - AWS re:Invent 2018
Build on Amazon Aurora with MySQL Compatibility (DAT348-R4) - AWS re:Invent 2018Build on Amazon Aurora with MySQL Compatibility (DAT348-R4) - AWS re:Invent 2018
Build on Amazon Aurora with MySQL Compatibility (DAT348-R4) - AWS re:Invent 2018
 
AWS June 2016 Webinar Series - Amazon Aurora Deep Dive - Optimizing Database ...
AWS June 2016 Webinar Series - Amazon Aurora Deep Dive - Optimizing Database ...AWS June 2016 Webinar Series - Amazon Aurora Deep Dive - Optimizing Database ...
AWS June 2016 Webinar Series - Amazon Aurora Deep Dive - Optimizing Database ...
 
Getting Started with Amazon Redshift
Getting Started with Amazon RedshiftGetting Started with Amazon Redshift
Getting Started with Amazon Redshift
 
Getting Started with Amazon Redshift
Getting Started with Amazon RedshiftGetting Started with Amazon Redshift
Getting Started with Amazon Redshift
 
Amazon Aurora for the Enterprise - August 2016 Monthly Webinar Series
Amazon Aurora for the Enterprise - August 2016 Monthly Webinar SeriesAmazon Aurora for the Enterprise - August 2016 Monthly Webinar Series
Amazon Aurora for the Enterprise - August 2016 Monthly Webinar Series
 
Amazon RDS with Amazon Aurora | AWS Public Sector Summit 2016
Amazon RDS with Amazon Aurora | AWS Public Sector Summit 2016Amazon RDS with Amazon Aurora | AWS Public Sector Summit 2016
Amazon RDS with Amazon Aurora | AWS Public Sector Summit 2016
 
AWS January 2016 Webinar Series - Amazon Aurora for Enterprise Database Appli...
AWS January 2016 Webinar Series - Amazon Aurora for Enterprise Database Appli...AWS January 2016 Webinar Series - Amazon Aurora for Enterprise Database Appli...
AWS January 2016 Webinar Series - Amazon Aurora for Enterprise Database Appli...
 

Plus de Amazon Web Services

Tools for building your MVP on AWS
Tools for building your MVP on AWSTools for building your MVP on AWS
Tools for building your MVP on AWS
Amazon Web Services
 
How to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckHow to Build a Winning Pitch Deck
How to Build a Winning Pitch Deck
Amazon Web Services
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without servers
Amazon Web Services
 
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
Amazon Web Services
 

Plus de Amazon Web Services (20)

Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
 
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
 
Esegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS FargateEsegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS Fargate
 
Costruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSCostruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWS
 
Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot
 
Open banking as a service
Open banking as a serviceOpen banking as a service
Open banking as a service
 
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
 
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
 
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows WorkloadsMicrosoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
 
Computer Vision con AWS
Computer Vision con AWSComputer Vision con AWS
Computer Vision con AWS
 
Database Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatareDatabase Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatare
 
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJSCrea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
 
API moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e webAPI moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e web
 
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatareDatabase Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
 
Tools for building your MVP on AWS
Tools for building your MVP on AWSTools for building your MVP on AWS
Tools for building your MVP on AWS
 
How to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckHow to Build a Winning Pitch Deck
How to Build a Winning Pitch Deck
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without servers
 
Fundraising Essentials
Fundraising EssentialsFundraising Essentials
Fundraising Essentials
 
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
 
Introduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceIntroduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container Service
 

DAT202_Getting started with Amazon Aurora

  • 1. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS re:INVENT DAT202: Getting started with Amazon Aurora D e b a n j a n S a h a , G e n e r a l M a n a g e r , A m a z o n W e b S e r v i c e s G u r m i t S i n g h G h a t o r e , P r i n c i p a l D a t a b a s e E n g i n e e r , E x p e d i a B r a n d o n O ’ B r i e n , P r i n c i p a l S o f t w a r e E n g i n e e r , E x p e d i a
  • 2. What is Amazon Aurora …… Datab ase re imag ine d for the clou d  Speed and availability of high-end commercial databases  Simplicity and cost-effectiveness of open source databases  Drop-in compatibility with MySQL and PostgreSQL  Simple pay as you go pricing Delivered as a managed service
  • 3. Re-imagining relational database Automate administrative tasks – fully managed service 1 2 3 Scale-out and distributed design Service-oriented architecture leveraging AWS services
  • 4. Scale-out, distributed architecture Master Replica Replica Replica Availability Zone 1 Shared storage volume Availability Zone 2 Availability Zone 3 Storage nodes with SSDs  Purpose-built log-structured distributed storage system designed for databases  Storage volume is striped across hundreds of storage nodes distributed over 3 different availability zones  Six copies of data, two copies in each availability zone to protect against AZ+1 failures  Plan to apply same principles to other layers of the stack SQL Transactions Caching SQL Transactions Caching SQL Transactions Caching
  • 5. Leveraging cloud ecosystem Lambda S3 IAM CloudWatch Invoke Lambda events from stored procedures/triggers. Load data from S3, store snapshots and backups in S3. Use IAM roles to manage database access control. Upload systems metrics and audit logs to CloudWatch.
  • 6. 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
  • 7. Aurora is used by ¾ of the top 100 AWS customers Aurora customer adoption Fastest growing service in AWS history
  • 8. Who are moving to Aurora and why? Customers using commercial engines Customers using MySQL engines  Higher performance – up to 5x  Better availability and durability  Reduces cost – up to 60%  Easy migration; no application change  One tenth of the cost; no licenses  Integration with cloud ecosystem  Comparable performance and availability  Migration tooling and services
  • 9. Cassandra (>100 nodes) Aurora (~10 clusters) RM DNA analysis and matching (millions of reads and writes) Large genealogy company achieved <10ms read latency and an order of magnitude reduction in projected costs by migrating to Aurora  Data sharded across ~10 Aurora R3.XLarge clusters - sufficient room for vertical scaling  OLAP + OLTP: DNA matching algorithms require millions of reads and batch updates RM RM Data store for high-performance applications
  • 10. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. An on demand video streaming service stores metadata for millions of videos in in- memory data structures.  Regular backups required; high and ever-increasing cost due to years worth of video metadata.  Aurora used as the persistent data-store with Redis front-end cache to provide HA and optimal performance at lower costs, and eliminating the need for costly backups. … Amazon Aurora In-memory store Backups $$$ Highly-available persistent data store
  • 11. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. S3 Amazon Aurora Transform and insert EMR Redshift • Transaction streams from various sources comes to different S3 buckets. • S3 event invoke a Lambda function, which reads the file and upload to Aurora • Aurora is used for data processing, validation and operational reporting • Processed data is loaded into Redshift and EMR for deep-analytics Data processing pipeline
  • 12. Amazon Aurora is fast … 5x faster than MySQL
  • 13. WRITE PERFORMANCE READ PERFORMANCE MySQL SysBench results R3.8XL: 32 cores / 244 GB RAM 5X faster than RDS MySQL 5.6 & 5.7 Five times higher throughput than stock MySQL based on industry standard benchmarks. 0 25,000 50,000 75,000 100,000 125,000 150,000 0 100,000 200,000 300,000 400,000 500,000 600,000 700,000 Aurora MySQL 5.6 MySQL 5.7
  • 14. Aurora Scaling 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
  • 15. 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 How did we achieve this? DATABASES ARE ALL ABOUT I/O NETWORK-ATTACHED STORAGE IS ALL ABOUT PACKETS/SECOND HIGH-THROUGHPUT PROCESSING IS ALL ABOUT CONTEXT SWITCHES
  • 16. 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 DISTRIBUT ED 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 Aurora I/O profile
  • 17. Scan Delete Aurora lock management Scan Delete Insert Scan Scan Insert Delete Scan Insert Insert MySQL lock manager Aurora lock manager  Same locking semantics as MySQL  Concurrent access to lock chains Needed to support many concurrent sessions, high update throughput  Multiple scanners in individual lock chains  Lock-free deadlock detection
  • 18. New performance enhancements ► Smart selector ► Logical read ahead ► Read views ► Hash joins *coming soon* ► Parallel query *coming soon* Read performance Write performance Meta-data access ► NUMA aware scheduler ► Latch-free lock manager ► Instant schema update ► B-Tree concurrency ► Catalog concurrency ► Faster index build
  • 19. Online DDL: Aurora vs. MySQL  Full Table copy; rebuilds all indexes  Needs temporary space for DML operations  DDL operation impacts DML throughput  Table lock applied to apply DML changes Index LeafLeafLeaf Leaf Index Root table name operation column-name time-stamp Table 1 Table 2 Table 3 add-col add-col add-col column-abc column-qpr column-xyz t1 t2 t3  Use schema versioning to decode the block.  Modify-on-write primitive to upgrade to latest schema  Currently support add NULLable column at end of table  Add column anywhere and with default coming soon. MySQL Amazon Aurora
  • 20. Online DDL performance On r3.large On r3.8xlarge Aurora MySQL 5.6 MySQL 5.7 10GB table 0.27 sec 3,960 sec 1,600 sec 50GB table 0.25 sec 23,400 sec 5,040 sec 100GB table 0.26 sec 53,460 sec 9,720 sec Aurora MySQL 5.6 MySQL 5.7 10GB table 0.06 sec 900 sec 1,080 sec 50GB table 0.08 sec 4,680 sec 5,040 sec 100GB table 0.15 sec 14,400 sec 9,720 sec
  • 21. What about availability “Performance only matters if your database is up”
  • 22. Six copies across three availability zones 4 out 6 write quorum; 3 out of 6 read quorum Peer-to-peer replication for repairs Volume striped across hundreds of storage nodes SQL Transaction AZ 1 AZ 2 AZ 3 Caching SQL Transaction AZ 1 AZ 2 AZ 3 Caching Read and write availabilityRead availability 6-way replicated storage Su rvive s catastrop hic failu re s
  • 23. 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. Database fail-over time 0.00% 5.00% 10.00% 15.00% 20.00% 25.00% 30.00% 35.00% 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 0 - 5s – 30% of fail-overs 0.00% 5.00% 10.00% 15.00% 20.00% 25.00% 30.00% 35.00% 40.00% 45.00% 50.00% 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 5 - 10s – 40% of fail-overs 0% 10% 20% 30% 40% 50% 60% 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 10 - 20s – 25% of fail-overs 0% 5% 10% 15% 20% 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 20 - 30s – 5% of fail-overs
  • 25. Cross-region read replicas Faste r disaste r re cove ry and e nhance d data locality Promote read-replica to a master for faster recovery in the event of disaster Bring data close to your customer’s applications in different regions Promote to a master for easy migration
  • 26. Availability is about more than HW failures You also incur availability disruptions when you 1. Patch your database software – Zero Down Time Patch 2. Perform large scale database reorganizations – Fast Cloning 3. DBA errors requiring database restores – Online Point-in-time Restore
  • 27. Zero downtime patching Networking state Application state Storage Service App state Net state App state Net state BeforeZDP New DB Engine Old DB Engine New DB Engine Old DB Engine WithZDP User sessions terminate during patching User sessions remain active through patching Storage Service
  • 28. Database backtrack Backtrack brings the database to a point in time without requiring restore from backups • Backtracking from an unintentional DML or DDL operation • Backtrack is not destructive. You can backtrack multiple times to find the right point in time t0 t1 t2 t0 t1 t2 t3 t4 t3 t4 Rewind to t1 Rewind to t3 Invisible Invisible
  • 30. Security and compliance  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  Encrypted cross-region replication, snapshot copy - SSL to secure data in transit  Advanced auditing and logging without any performance impact  Database activity monitoring 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 *NEW*
  • 31. Aurora Auditing MariaDB server_audit plugin Aurora native audit support We can sustain over 500K events/sec Create event string DDL DML Query DCL Connect DDL DML Query DCL Connect Write to File Create event string Create event string Create event string Create event string Create event string Latch-free queue Write to File Write to File Write to File MySQL 5.7 Aurora Audit Off 95K 615K 6.47x Audit On 33K 525K 15.9x Sysbench Select-only Workload on 8xlarge Instance
  • 32. Database activity monitoring 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
  • 33. Industry certifications  Amazon Aurora gives each database instance IP firewall protection  Aurora offers transparent encryption at rest and SSL protection for data in transit  Amazon VPC lets you isolate and control network configuration and connect securely to your IT infrastructure  AWS Identity and Access Management provides resource-level permission controls *New* *New* *New*
  • 34. Performance Insights 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
  • 35. Amazon Aurora is easy to use Automated storage management, security and compliance, advanced monitoring, database migration.
  • 36. Simplify storage management  Continuous, incremental backups to Amazon S3  Instantly create user snapshots—no performance impact  Automatic storage scaling up to 64 TB—no performance impact  Automatic restriping, mirror repair, hot spot management, encryption Up to 64TB of storage – auto-incremented in 10GB units up to 64 TB
  • 37. 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
  • 38. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. DevTest environments Master Replica Shared storage volume Clone Shared storage volume Master Replica Production Account Development Account Cross-account snapshot Test on prod data • Create a clone of multi-terabyte DB clusters in minutes. Use for diagnosis and pre- prod testing • Restore a production DB cluster in a development accounts for development, staging, or partnering with other teams
  • 39. Leverage MySQL and AWS ecosystems Query and Monitoring Business Intelligence Source: Amazon Data Integration “We ran our compatibility test suites against Amazon Aurora and everything just worked." - Dan Jewett, Vice President of Product Management at Tableau Lambda IAM CloudWatch S3 Route53 KMS AWS Ecosystem VPC SWF
  • 40. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Hybrid operations and migration Amazon Aurora Corporate Data Center Replication Analytics Prod apps Provider of an online marketplace for short-term rentals replicates on-premise production data into Aurora for read-only analytics workloads.  Seamless replicate to Aurora: Full compatibility with MySQL and PostgreSQL  Data replicated in minutes – run analytics on near real-time data  Provides a clean waypoint towards full write/read migration MySQL
  • 41. Amazon Aurora migration options Source database From where Recommended option RDS EC2, on premise EC2, on premise, RDS 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.
  • 42. Amazon Aurora saves you money 1/10th of the cost of commercial databases Cheaper than even MySQL
  • 43. Cost of ownership: Aurora vs. MySQL MySQL config u ration hou rly cost Primary r3.8XL Standby r3.8XL Replica r3.8XL Replica R3.8XL Storage 6 TB / 10 K PIOP Storage 6 TB / 10 K PIOP Storage 6 TB / 5 K PIOP Storage 6 TB / 5 K PIOP $1.33/hr $1.33/hr $1.33/hr $1.33/hr $2,42/hr $2,42/hr $2,42/hr Instance cost: $5.32 / hr Storage cost: $8.30 / hr Total cost: $13.62 / hr $2,42/hr
  • 44. Cost of ownership: Aurora vs. MySQL Au rora config u ration hou rly cost Instance cost: $4.86 / hr Storage cost: $4.43 / hr Total cost: $9.29 / hr Primary r3.8XL Replica r3.8XL Replica R3.8XL Storage / 6 TB $1.62 / hr $1.62 / hr $1.62 / hr $4.43 / hr *At a macro level Aurora saves over 50% in storage cost compared to RDS MySQL. 31.8% Savings  No idle standby instance  Single shared storage volume  No PIOPs – pay for use I/O  Reduction in overall IOP
  • 45. Cost of ownership: Aurora vs. MySQL Fu rthe r op p ortu nity for saving Instance cost: $2.43 / hr Storage cost: $4.43 / hr Total cost: $6.86 / hrStorage IOPs assumptions: 1. Average IOPs is 50% of Max IOPs 2. 50% savings from shipping logs vs. full pages 49.6% Savings Primary r3.8XL Replica r3.8XL Replica r3.8XL Storage / 6TB $0.81 / hr $0.81 / hr $0.81 / hr $4.43 / hr r3.4XL r3.4XL r3.4XL  Use smaller instance size  Pay-as-you-go storage
  • 46. Higher performance, lower Cost  Fewer instances needed  Smaller instances can be used Safe.com lowered their bill by 40% by switching from sharded MySQL to a single Aurora instance. Double Down Interactive (gaming) lowered their bill by 67% while also achieving better latencies (most queries ran faster) and lower CPU utilization.  No need to pre-provision storage  No additional storage for read replicas
  • 47. Higher performance, lower Cost Our application usage had grown exponentially over the last year. We were looking for horizontal scaling of our database to address the increased load. Amazon Aurora’s relatively low replication lag has helped us handle current load and positions us well for future growth. “ 7x 10x Database connections CPU utilization 2x Response time “
  • 48. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. G u r m i t S i n g h G h a t o r e , P r i n c i p a l D a t a b a s e E n g i n e e r B r a n d o n O ’ B r i e n , P r i n c i p a l S o f t w a r e E n g i n e e r Expedia – Journey to Amazon Aurora
  • 49. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. PRODUCT ENGINEERING Real-time contextual pricing Low-latency pricing service • Enhance traveler’s shopping experience with contextual pricing e.g. strikethrough price • Build a system that computes lodging price in real time • Build a serving layer to surface prices to live Expedia traffic
  • 50. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. START OF THE JOURNEY Flexibility Single use case $$ High operational costs Ad hoc queries
  • 51. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. TRANSITION TO AMAZON AURORA Scalable Low maintenance High performance
  • 52. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. WORKLOAD HIGHLIGHTS 1B+ 4,000 25,000 rows writes/second reads/second
  • 53. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. ON THE PATH - INFRASTRUCTURE DETAILS Shared storage volume Primary Replica Replica… 12 EC2 instances c3.8xlarge 6 Aurora Replicas db.r3.8xLarge
  • 54. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. ARCHITECTURE Shared storage volume Primary Replica Replica… Client Shared storage volume Primary Replica Replica… Node.js Client Lodgin g service us-west-2 us-east-1
  • 55. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. REQUIREMENTS AND SOLUTIONS <100 ms 99% of read responses • Node.js splits the incoming read request into smaller batches and fires off to all read replicas in parallel. • Results returned by Aurora are combined in Node.js Balanced resource utilization • Aurora provides connection load balancing rather than individual queries. • We built application connection pools to load balance across all read replicas evenly.
  • 56. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. REQUIREMENTS AND SOLUTIONS (CONT.) High-volume data ingestion • Storm cluster parallelizes workload across storm nodes. • Each node uses JDBC micro batch inserts. Multi-region presence • Storm persists data to independent Aurora clusters in local and remote regions Why didn’t we use in-built cross-region read replica feature? Aurora (as of now) supports only one cross-region replica. Also, we can’t create replicas from replica. Adopted solution allows creating multiple replicas from local primary for regional scale-out with cross region data-out cost only once.
  • 57. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. REQUIREMENTS AND SOLUTIONS (CONT.) Schema changes Fast DDL We leveraged Aurora Fast DDL to make in- place simple schema changes to live tables. AWS Data Migration Service For complex schema changes, create new schema table, transfer data and switch. We utilized AWS DMS service for transferring data to new schema table.
  • 58. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. PERFORMANCE SOLUTIONS Performance degradation over time as client requests and volume increased. Scale out database Parallelize queries
  • 59. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. PERFORMANCE NUMBERS <20 ms <50 ms <10 % Replication lag Select latency CPU utilization <1 ms 40+ GB Insert latency Free-able memory
  • 60. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. MONETARY AND MAINTENANCE BENEFITS 10-15% Cost saving vs. Cassandra <10 minutes End-to-end downtime • Applying patches and updates is easy with very low tolerable downtime • Initially time was spent in resolving performance bottlenecks. Later on maintenance time was on upgrades and monitoring only. • Real saving comes from multiple use of same data with different read pattern. • Adhoc querying capability became a non-event.
  • 61. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. KEY TAKEAWAYS Parallelize. Parallelize. Parallelize. Custom load balance reads Cross-region replication could be challenging (esp. for large volumes). Explore alternatives. Complex schema/index changes can be handled with ease using Aurora features. Leverage Aurora features as much as possible. Aurora’s low maintenance resulted in increased product velocity. > > > > >
  • 62. Some Other Aurora Sessions DAT301 Deep Dive on Amazon Aurora MySQL compatible Edition #1 Wednesday 4:45p #2 Friday 11:30am DAT315 A Practitioner’s Guide on Migrating to, and Running on Amazon Aurora Thursday 4pm DAT334 Amazon Aurora Performance Optimization Wednesday 12pm DAT331 Airbnb Runs on Amazon Aurora Wednesday 1pm DAT336 Amazon Aurora Storage Demystified: How It All Works Wednesday 4pm DAT338 Migrating from Oracle to Amazon Aurora Thursday 5:30pm DAT402 Deep Dive on the Amazon Aurora PostgreSQL- compatible Edition Wednesday 4pm
  • 63. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Thank You