Upload
vudat
View
244
Download
6
Embed Size (px)
Citation preview
Amazon RDS for Aurora Deep Dive TA-02: Tech Deep Dive by Amazon
Yutaka HoshinoAmazon Data Services Japan K.K.
Amazon AuroraPreview
2015/6/2
( )
@con_mame facebook.com/conmame
AWS
Web / game / VideoLive Streaming
Amazon Aurora
S3
Amazon RDS
Amazon Aurora
re:Invent 2014RDS
Amazon1
OSS
Amazon Aurora Amazon AuroraRDS1 RDSMySQL / PostgreSQL / Oracle / MS SQL Server
Amazon Aurora
Limited Preview
Virginia / Oregon / Ireland
2015/5/20 preview Beta BetaSnapshot
vCPU Mem Hourly Price
db.r3.large 2 15.25 $0.29
db.r3.xlarge 4 30.5 $0.58
db.r3.2xlarge 8 61 $1.16
db.r3.4xlarge 16 122 $2.32
db.r3.8xlarge 32 244 $4.64
: $0.10/GB/month IO: $0.20 per million IO Virginia
Amazon Aurora pricing
Amazon Aurora
MySQL5.6
Amazon Aurora
MySQL5.6
10GB64TB
3AZ26 S3
VPC Security GroupNACL
Amazon Aurora99.99%
Amazon
DB
1
SQL
Transactions
Caching
Logging
SQL
Transactions
Caching
Logging
SQL
Transactions
Caching
Logging
Application
SQL
Transactions
Caching
Logging
SQL
Transactions
Caching
Logging
Application
SQL
Transactions
Caching
Logging
SQL
Transactions
Caching
Logging
Storage
Application
1970 AWS
MySQL
AWS
Service Oriented Architecture
EC2, Amazon DynamoDB, Amazon SWFAWS
Amazon S399.999999999%
Data Plane
Logging + Storage
SQL
Transactions
Caching
Amazon S3
Control Plane
Amazon DynamoDB
Amazon SWF
Amazon Route 53
SQL
Transactions
Caching
SQL
Transactions
Caching
SQL
Transactions
Caching
DBDB
Aurora SSD
10GB64TB
Highly available 3AZ6 2
1AZ3
3
Log structured Storage redo log Log pageData page
SQL Transactions
AZ 1 AZ 2 AZ 3
Caching
Amazon S3
Aurora
Amazon Aurora64
SSD10GB
Aurora
Log Structured Storage
S3
64TB
Log Structured Storage
GC
S3
data
data
data
data
data
2
3
SQLTransaction
AZ 1 AZ 2 AZ 3
Caching
SQL
Transaction
AZ 1 AZ 2 AZ 3
Caching
AZ 1 AZ 2
PrimaryInstance
StandbyInstance
EBS
Amazon S3
EBSmirror
EBS
EBSmirror
MySQL
PITR
AZ 1 AZ 3
PrimaryInstance
Amazon S3
AZ 2
ReplicaInstance
Consistency Latency vs network I/O
4/6
Amazon Aurora
BinlogDouble-write buffer metadata
Aurora Master
30% Read
70% Write
Aurora Replica
100% New Reads
Shared Multi-AZ Storage
MySQL Master
30% Read
70% Write
MySQL Replica
30% New Reads
70% Write
Binlog
Data Volume Data Volume
MySQL read scaling binlog / relay log
Amazon Aurora15
100 RDS for MySQL5 (30)
AES-256 () Amazon S3 AWS KMS
SSL
Amazon VPC
Storage
SQL
Transactions
Caching
Amazon S3
Application
DB
Amazon AuroraDB (Writer)(Reader)
Parameter GroupMaintenance WindowDB
1 Write
DB Parameter GroupDB Cluster Parameter Group
RDS for MySQLDB Parameter Group
Aurora DB Cluster Parameter Group: Aurora DB Parameter Group: Aurora
Throughput
Select Commit DML/DDL
Latency Select Commit DML/DDL
Cache Hit Ratio Buffer Cache Result Set
Deadlocks Login Failures Blocked Transactions
1
RDS for MySQL 10
1 Multi-AZAZ RDS for MySQL
AuroraAZ AZ AZ
WriterReaderWriter()
Aurora
Availability Zone A Availability Zone B
VPC subnet VPC subnet
VPC subnet VPC subnetAurora Writer Aurora Reader
Aurora
Aurora WriterCNAME
ReadReader
Write
Availability Zone A Availability Zone B
VPC subnet VPC subnet
VPC subnet VPC subnetAurora Writer Aurora Writer
Aurora
Write
MySQL
Amazon Aurora
Disk readredo log
Checkpointed Data Redo Log
T0
T0 T0
T0 redo
Streaming snapshotPITR
Amazon AuroraAmazon S3 Backup retention period
Amazon Aurora
PITR5Backup Retention Period
SQLSQL
: ALTER SYSTEM CRASH [{INSTANCE | DISPATCHER | NODE}]
:ALTER SYSTEM SIMULATE percentage_of_failure PERCENT
READ REPLICA FAILURE [ TO ALL | TO "replica name" ] FOR INTERVAL quantity [ YEAR | QUARTER | MONTH | WEEK| DAY | HOUR | MINUTE | SECOND ];
()
Aurora
Query cache write heavyoff CPUCPUMySQL
Availability Zone A
VPC subnet
VPC subnetAurora Writer
NW
NW
CPU/RDS for MySQL
5 5 re:Invent 5Sysbench4r3.8xlargeAurora
TPC-C r3.8xlarge2.5
Amazon Aurora
RDS for MySQL Amazon Aurora
RDS for MySQLAmazon Aurora
RDS for MySQL5.6
RDS for MySQLParameter Group : max_connection / innodb_buffer_pool_size / query_cache_*
EBS
MyISAM 3TB
MyISAM 1.5TB
Amazon AuroraInnoDB MyISAM
MySQL
MySQL5.6Amazon Aurora Amazon AuroraMySQL
Procedure
mysql > CALL mysql.rds_set_external_master (DB Hostname or IP address', 3306,user', password', Binlog', position, 0); mysql > CALL mysql.rds_start_replication;
MySQL
RDS for MySQLMySQL on EC2MySQLAmazon Aurora Aurora
Aurora
Amazon Aurora
Amazon Aurora CPU query cache
DB1
Amazon Aurora
AmazonRDBMS MySQL5.6
PITR Log Structured Storage SOA