SlideShare a Scribd company logo
Amazon Aurora는 어떻게 다른가?
김일호 | Solutions Architect
MySQL-compatible relational database
Performance and availability of
commercial databases
Simplicity and cost-effectiveness of
open source databases
What is Amazon Aurora?
§ 4	client	machines	with	1,000	connections	 each
WRITE PERFORMANCE READ PERFORMANCE
Single	client	machine	with	1,600	connections
MySQL SysBench
R3.8XL with 32 cores and 244 GB RAM
SQL benchmark results
Reproducing these results
h t t p s : / / d 0. a ws s t a t i c. c o m / p r o d u c t - m a rk e t i n g/ A u r o r a / R DS _ A u r o r a _ Pe r f o r m a n c e _A s s es s me n t _ B e n c h m a r k i ng _v 1 - 2. p d f
AMAZON	
AURORA	
R3.8XLARGE
R3.8XLARGE
R3.8XLARGE
R3.8XLARGE
R3.8XLARGE
• Create	an	Amazon	VPC	(or	use	an	existing	one).	
• Create	four	EC2	R3.8XL	client	instances	to	run	the	SysBench	
client.	All	four	should	be	in	the	same	AZ.	
• Enable	enhanced	networking	on	your	clients.
• Tune	your	Linux	settings	(see	whitepaper).
• Install	Sysbench	version	0.5.
• Launch	a	r3.8xlarge	Amazon	Aurora	DB	instance	in	the	sam
e	VPC	and	AZ	as	your	clients.
• Start	your	benchmark!
1
2
3
4
5
6
7
What makes Aurora fast.
Do fewer IOs
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 do we achieve these results?
DATABASESAREALLABOUT I/O
NETWORK-ATTACHED STORAGE IS ALL ABOUT PACKETS/SECOND
HIGH-THROUGHPUT PROCESSING DOES NOT ALLOW CONTEXT SWITCHES
IO traffic in RDS MySQL
BINLOG DATA DOUBLE-WRITELOG FRM	FILES
T YPE 	 O F 	WRI T E
MYSQL WITH STANDBY
Issue	write	to	EBS	– EBS	issues	to	mirror,	ack when	both	done
Stage	write	to	standby	instance	using	DRBD
Issue	write	to	EBS	on	standby	instance
IO FLOW
Steps	1,	3,	5	are	sequential	and	synchronous
This	amplifies	both	latency	and	jitter
Many	types	of	writes	for	each	user	operation
Have	to	write	data	blocks	twice	to	avoid	torn	writes
OBSERVATIONS
780K	transactions
7,388K	I/Os per	million	txns (excludes	mirroring,	standby)
Average	7.4	I/Os per	transaction
PERFORMANCE
30	minute	SysBench	write-only	workload,	100	GB	data	set,	RDS	SingleAZ,	30K	PIOPS
EBS	mirrorEBS	mirror
AZ	1 AZ	2
Amazon S3
EBS
Amazon	Elastic	Bloc
k	Store	(EBS)
Primary
instance
Standby
instance
1
2
3
4
5
IO traffic in Aurora (database)
AZ	1 AZ	3
Primary
instance
Amazon S3
AZ	2
Replica
instance
AMAZON AURORA
ASYNC
4/6	QUORUM
DISTRIBUTED	WRITE
S
BINLOG DATA DOUBLE-WRITELOG FRM	FILES
T YPE 	 O F 	WRI T E
30	minute	SysBench	write-only	workload,	100	GB	data	set
IO FLOW
Only	write	redo	log	records;	all	steps	asynchronous
No	data	block	writes	(checkpoint,	cache	replacement)
6X more log	writes,	but	9X lessnetwork	traffic
Tolerant	of	network	and	storage	outlier	latency
OBSERVATIONS
27,378K	transactions	 35X MORE
950K	I/Os per	1M	txns (6X	amplification) 7.7X LESS
PERFORMANCE
Boxcar	redo	log	records	– fully	ordered	by	LSN
Shuffle	to	appropriate	segments	– partially	ordered
Boxcar	to	storage	nodes	and	issue	writes
IO traffic in Aurora (storage node)
LOG	RECORDS
Primary	in
stance
INCOMING	QUEUE
STORAGE	NODE
S3	BACKUP
1
2
3
4
5
6
7
8
UPDATE	
QUEUE
ACK
HOT
LOG
DATA
BLOCKS
POINT	IN	TIME
SNAPSHOT
GC
SCRUB
COALESCE
SORT
GROUP
PEER-TO-PEER	GOSSIPPeer
storage
nodes
All	steps	are	asynchronous
Only	steps	1	and	2	are	in	foreground	latency	path
Input	queue	is	46X lessthan	MySQL	(unamplified,	per	node)
Favor	latency-sensitive	operations
Use	disk	space	to	buffer	against	spikes	in	activity
OBSERVATIONS
IO FLOW
① Receive	record	and	add	to	in-memory	queue
② Persist	record	and	ACK	
③ Organize	records	and	identify	gaps	in	log
④ Gossip	with	peers	to	fill	in	holes
⑤ Coalesce	log	records	into	new	data	block	versions
⑥ Periodically	stage	log	and	new	block	versions	to	S3
⑦ Periodically	garbage	collect	old	versions
⑧ Periodically	validate	CRC	codes	on	blocks
Asynchronous group commits
Read
Write
Commit
Read
Read
T1
Commit	(T1 )
Commit	(T2 )
Commit	 (T3)
LSN	1 0
LSN	1 2
LSN	22
LSN	5 0
LSN	30	
LSN	34
LSN	41
LSN	47
LSN	20
LSN	49
Commit	 (T4)
Commit	 (T5)
Commit	 (T6)
Commit	 (T7)
Commit	(T8 )
LSN	GROWTH
Durable	LSN	at	head-node	
COMMIT	QUEUE
Pending	commits	in	LSN	order
TIME
GROUP
COMMIT
TRANSACTIONS
Read
Write
Commit
Read
Read
T1
Read
Write
Commit
Read
Read
Tn
§ TRADITIONAL APPROACH AMAZON AURORA
Maintain a buffer of log records to write out to disk
Issue write when buffer full or time out waiting for writes
First writer has latency penalty when write rate is low
Request I/O with first write, fill buffer till write picked up
Individual write durable when 4 of 6 storage nodes ACK
Advance DB durable point up to earliest pending ACK
§ Re-entrant connections multiplexed to active threads
§ Kernel-space epoll() inserts into latch-free event queue
§ Dynamically size threads pool
§ Gracefully handles 5,000+ concurrent client sessions on r3.8xl
Standard MySQL – one thread per connection
Doesn’t scale with connection count
MySQL EE – connections assigned to thread group
Requires careful stall threshold tuning
CLIENT	CONNECTION
CLIENT	CONNECTION
LATCH	FREE
TASK	QUEUE
epoll()
MYSQL THREAD MODEL AURORA THREAD MODEL
Adaptive thread pool
IO traffic in Aurora (read replica)
PAGE	CACHE
UPDATE
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
SINGLE-THREADED
BINLOG	APPLY
Data	volume Data	volume
§ Logical: Ship	SQL	statements	to	replica.
§ Write	workload	similar	on	both	instances.
§ Independent	storage.
§ Can	result	in	data	drift	between	master	and	
replica.
Physical: Ship	redo	from	master	to	replica.
Replica	shares	storage.	No	writes	performed.
Cached	pages	have	redo	applied.
Advance	read	view	when	all	commits	seen.
MYSQL READ SCALING AMAZON AURORA READ SCALING
Improvements over the past few months
Write	batch	size	tuning	
Asynchronous	send	for	read/write	I/Os
Purge	thread	performance
Bulk insert performance
BATCH OPERATIONS
Failover	time	reductions
Malloc reduction
System	call	reductions
Undo	slot	caching	patterns
Cooperative log apply
OTHER
Binlog and	distributed	transactions
Lock compression
Read-ahead
CUSTOMER FEEDBACK
Hot	row	contention
Dictionary	statistics
Mini-transaction	commit	code	path
Query	cache	read/write	conflicts
Dictionary system mutex
LOCK CONTENTION
What makes Aurora highly available.
Storage node availability
§ Quorum system for read/write; latency tolerant
§ Peer-to-peer gossip replication to fill in holes
§ Continuous backup to S3 (designed for 11 9s
durability)
§ Continuous scrubbing of data blocks
§ Continuous monitoring of nodes and disks for
repair
§ 10 GB segments as unit of repair or hotspot
rebalance to quickly rebalance load
§ Quorum membership changes do not stall writes
AZ	1 AZ	2 AZ	3
Amazon S3
Traditional databases
§ Have to replay logs since the last
checkpoint
§ Typically 5 minutes between checkpoints
§ Single-threaded in MySQL; requires a
large number of disk accesses
Amazon Aurora
§ Underlying storage replays redo records
on demand as part of a disk read
§ Parallel, distributed, asynchronous
§ No replay for startup
Checkpointed data Redo	log
Crash	at	T0 requires
a	reapplication	of	the
SQL	in	the	redo	log	since
last	checkpoint
T0 T0
Crash	at	T0 will	result	in	redo	logs	being	applied	t
o	each	segment	on	demand,	in	parallel,	asynchro
nously
Instant crash recovery
Survivable caches
§ 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
Faster, more predictable failover
App
runningFailure	detection DNS	propagation
Recovery Recovery
DB
failure
MYSQL
App
running
Failure	detection DNS	propagation
Recovery
DB
failure
AURORA	WITH	MARIADB	DRIVER
1 5 - 2 0 	 s e c
3 - 2 0 	 s e c
Amazon Aurora Testimonials
§ “Amazon Aurora was able to satisfy all of our scale
requirements with no degradation in performance. With
Alfresco on Amazon Aurora we scaled to 1 billion documents
with a throughput of 3 million per hour, which is 10 times
faster than our MySQL environment. It just works!"
- John Newton, Founder and CTO of Alfresco
§ “We ran our compatibility test suites againstAmazon Aurora and
everything just worked.Amazon Aurora paired with Tableau means
data users can take advantage of the 5x throughputAmazon Aurora
provides and deliver faster analytic insights throughouttheir
organizations.We look forward to offering our Amazon Aurora Tableau
connector."
- Dan Jewett, Vice President of Product Managementat Tableau
§ "기존 RDS는 스토리지의 용량과 IOPS의 필요치를 예측해서 설정해야 했습니다. 하지만
Aurora에서는 이를 예측할 필요 없이 필요한 만큼 사용할 수 있습니다.덕분에 비용 절감은
물론이고, I/O 병목에 대한 걱정을 덜 수 있었습니다."
§ "기존 DB에서 Aurora로 migration하는 데에 어려움이 있었습니다.하지만 최근에 나온 AWS
Database Migration Service를 활용하면 좀 더 쉽게 migration을 진행할 수 있으리라
봅니다."
Thank you!

More Related Content

PDF
20180704(20190520 Renewed) AWS Black Belt Online Seminar Amazon Elastic File ...
PDF
AWS BlackBelt Online Seminar 2017 Amazon CloudFront + AWS Lambda@Edge
PDF
Amazon Aurora Deep Dive (김기완) - AWS DB Day
PDF
AWS 기반 클라우드 아키텍처 모범사례 - 삼성전자 개발자 포털/개발자 워크스페이스 - 정영준 솔루션즈 아키텍트, AWS / 유현성 수석,...
PDF
AWS Black Belt Online Seminar 2017 AWS Elastic Beanstalk
PDF
Amazon DocumentDB vs MongoDB 의 내부 아키텍쳐 와 장단점 비교
PDF
20190424 AWS Black Belt Online Seminar Amazon Aurora MySQL
PDF
20190911 AWS Black Belt Online Seminar AWS Batch
20180704(20190520 Renewed) AWS Black Belt Online Seminar Amazon Elastic File ...
AWS BlackBelt Online Seminar 2017 Amazon CloudFront + AWS Lambda@Edge
Amazon Aurora Deep Dive (김기완) - AWS DB Day
AWS 기반 클라우드 아키텍처 모범사례 - 삼성전자 개발자 포털/개발자 워크스페이스 - 정영준 솔루션즈 아키텍트, AWS / 유현성 수석,...
AWS Black Belt Online Seminar 2017 AWS Elastic Beanstalk
Amazon DocumentDB vs MongoDB 의 내부 아키텍쳐 와 장단점 비교
20190424 AWS Black Belt Online Seminar Amazon Aurora MySQL
20190911 AWS Black Belt Online Seminar AWS Batch

What's hot (20)

PDF
AWS Black Belt Online Seminar Amazon Aurora
PDF
AWS 고객이 주로 겪는 운영 이슈에 대한 해법-AWS Summit Seoul 2017
PDF
20190828 AWS Black Belt Online Seminar Amazon Aurora with PostgreSQL Compatib...
PDF
Amazon VPC와 ELB/Direct Connect/VPN 알아보기 - 김세준, AWS 솔루션즈 아키텍트
PDF
20180322 AWS Black Belt Online Seminar AWS Snowball Edge
PDF
20190522 AWS Black Belt Online Seminar AWS Step Functions
PDF
20190130 AWS Black Belt Online Seminar AWS Identity and Access Management (AW...
PDF
20190521 AWS Black Belt Online Seminar Amazon Simple Email Service (Amazon SES)
PDF
AWS Black Belt Online Seminar 2017 Amazon ElastiCache
PDF
20190730 AWS Black Belt Online Seminar Amazon CloudFrontの概要
PDF
AWS Transit Gateway를 통한 Multi-VPC 아키텍처 패턴 - 강동환 솔루션즈 아키텍트, AWS :: AWS Summit ...
PDF
浸透するサーバーレス 実際に見るユースケースと実装パターン
PDF
AWS Black Belt Online Seminar 2017 Amazon Kinesis
PDF
EC2のストレージどう使う? -Instance Storageを理解して高速IOを上手に活用!-
PDF
20201118 AWS Black Belt Online Seminar 形で考えるサーバーレス設計 サーバーレスユースケースパターン解説
PDF
Amazon VPC VPN接続設定 参考資料
PDF
20190320 AWS Black Belt Online Seminar Amazon EBS
PDF
20190326 AWS Black Belt Online Seminar Amazon CloudWatch
PDF
Amazon Aurora 100% 활용하기
PDF
AWS Black Belt Online Seminar 2016 AWS上でのActive Directory構築
AWS Black Belt Online Seminar Amazon Aurora
AWS 고객이 주로 겪는 운영 이슈에 대한 해법-AWS Summit Seoul 2017
20190828 AWS Black Belt Online Seminar Amazon Aurora with PostgreSQL Compatib...
Amazon VPC와 ELB/Direct Connect/VPN 알아보기 - 김세준, AWS 솔루션즈 아키텍트
20180322 AWS Black Belt Online Seminar AWS Snowball Edge
20190522 AWS Black Belt Online Seminar AWS Step Functions
20190130 AWS Black Belt Online Seminar AWS Identity and Access Management (AW...
20190521 AWS Black Belt Online Seminar Amazon Simple Email Service (Amazon SES)
AWS Black Belt Online Seminar 2017 Amazon ElastiCache
20190730 AWS Black Belt Online Seminar Amazon CloudFrontの概要
AWS Transit Gateway를 통한 Multi-VPC 아키텍처 패턴 - 강동환 솔루션즈 아키텍트, AWS :: AWS Summit ...
浸透するサーバーレス 実際に見るユースケースと実装パターン
AWS Black Belt Online Seminar 2017 Amazon Kinesis
EC2のストレージどう使う? -Instance Storageを理解して高速IOを上手に活用!-
20201118 AWS Black Belt Online Seminar 形で考えるサーバーレス設計 サーバーレスユースケースパターン解説
Amazon VPC VPN接続設定 参考資料
20190320 AWS Black Belt Online Seminar Amazon EBS
20190326 AWS Black Belt Online Seminar Amazon CloudWatch
Amazon Aurora 100% 활용하기
AWS Black Belt Online Seminar 2016 AWS上でのActive Directory構築
Ad

Viewers also liked (20)

PDF
2015 AWS 리인벤트의 모든것 - 강환빈 :: 2015 리인벤트 리캡 게이밍
PDF
AWS re:Invent re:Cap - 새로운 관계형 데이터베이스 엔진: Amazon Aurora - 양승도
PDF
Gaming on AWS - 2. Amazon Aurora 100% 활용하기 - 신규 기능 및 이전 방법 시연
PDF
Gam301 Real-Time Game Analytics with Amazon Redshift, Amazon Kinesis, and Ama...
PDF
AWS re:Invent re:Cap - 자동화된 반응형 코드 구동: Amazon Lambda - 정윤진
PDF
Amazon Aurora (Debanjan Saha) - AWS DB Day
PDF
Criando o seu datacenter virtual vpc e conectividade
KEY
Sybase To Oracle Migration for Developers
PDF
AWS Summit Seoul 2015 - AWS 최신 서비스 살펴보기 - Aurora, Lambda, EFS, Machine Learn...
PDF
관계형 데이터베이스의 새로운 패러다임 Amazon Aurora :: 김상필 :: AWS Summit Seoul 2016
PDF
게임 서비스 품질 향상을 위한 데이터 분석 활용하기 - 김필중 솔루션즈 아키텍트:: AWS Cloud Track 3 Gaming
PDF
컴퓨팅 서비스 업데이트 - EC2, ECS, Lambda (김상필) :: re:Invent re:Cap Webinar 2015
PDF
AWS를 활용한 Big Data 실전 배치 사례 :: 이한주 :: AWS Summit Seoul 2016
PDF
[AWSome Day] Opening Keynote
PDF
렌더링의 새로운 패러다임 - 정우근 :: AWS 클라우드 렌더링 세미나
PDF
Cloud Taekwon 2015 - 비트패킹컴퍼니 사례 공유
PDF
AWS Quicksight에서의 비즈니스 인텔리전스 - 김기완 :: 2015 리인벤트 리캡 게이밍
PDF
AWS에 대해 가장 궁금했던 열가지 - 정우근 매니저:: AWS Cloud Track 1 Intro
PDF
AWS 비즈니스 프로젝트 협력 방식 및 사례 소개 - 서수영 매니저:: AWS Cloud Track 1 Intro
PDF
성공적인 AWS클라우드로의 여정 그리고 5가지 궁금한 점 :: 김재성 :: AWS Summit Seoul 2016
2015 AWS 리인벤트의 모든것 - 강환빈 :: 2015 리인벤트 리캡 게이밍
AWS re:Invent re:Cap - 새로운 관계형 데이터베이스 엔진: Amazon Aurora - 양승도
Gaming on AWS - 2. Amazon Aurora 100% 활용하기 - 신규 기능 및 이전 방법 시연
Gam301 Real-Time Game Analytics with Amazon Redshift, Amazon Kinesis, and Ama...
AWS re:Invent re:Cap - 자동화된 반응형 코드 구동: Amazon Lambda - 정윤진
Amazon Aurora (Debanjan Saha) - AWS DB Day
Criando o seu datacenter virtual vpc e conectividade
Sybase To Oracle Migration for Developers
AWS Summit Seoul 2015 - AWS 최신 서비스 살펴보기 - Aurora, Lambda, EFS, Machine Learn...
관계형 데이터베이스의 새로운 패러다임 Amazon Aurora :: 김상필 :: AWS Summit Seoul 2016
게임 서비스 품질 향상을 위한 데이터 분석 활용하기 - 김필중 솔루션즈 아키텍트:: AWS Cloud Track 3 Gaming
컴퓨팅 서비스 업데이트 - EC2, ECS, Lambda (김상필) :: re:Invent re:Cap Webinar 2015
AWS를 활용한 Big Data 실전 배치 사례 :: 이한주 :: AWS Summit Seoul 2016
[AWSome Day] Opening Keynote
렌더링의 새로운 패러다임 - 정우근 :: AWS 클라우드 렌더링 세미나
Cloud Taekwon 2015 - 비트패킹컴퍼니 사례 공유
AWS Quicksight에서의 비즈니스 인텔리전스 - 김기완 :: 2015 리인벤트 리캡 게이밍
AWS에 대해 가장 궁금했던 열가지 - 정우근 매니저:: AWS Cloud Track 1 Intro
AWS 비즈니스 프로젝트 협력 방식 및 사례 소개 - 서수영 매니저:: AWS Cloud Track 1 Intro
성공적인 AWS클라우드로의 여정 그리고 5가지 궁금한 점 :: 김재성 :: AWS Summit Seoul 2016
Ad

Similar to Aurora는 어떻게 다른가 - 김일호 솔루션즈 아키텍트:: AWS Cloud Track 3 Gaming (6)

PDF
Introducing Amazon Aurora
PPTX
Amazon Aurora TechConnect
PDF
Amazon Aurora Let's Talk About Performance
PDF
Amazon Aurora: Amazon’s New Relational Database Engine
PDF
Amazon (AWS) Aurora
PDF
Aurora_session.pdf
Introducing Amazon Aurora
Amazon Aurora TechConnect
Amazon Aurora Let's Talk About Performance
Amazon Aurora: Amazon’s New Relational Database Engine
Amazon (AWS) Aurora
Aurora_session.pdf

More from Amazon Web Services Korea (20)

PDF
[D3T1S01] Gen AI를 위한 Amazon Aurora 활용 사례 방법
PDF
[D3T1S06] Neptune Analytics with Vector Similarity Search
PDF
[D3T1S03] Amazon DynamoDB design puzzlers
PDF
[D3T1S04] Aurora PostgreSQL performance monitoring and troubleshooting by use...
PDF
[D3T1S07] AWS S3 - 클라우드 환경에서 데이터베이스 보호하기
PDF
[D3T1S05] Aurora 혼합 구성 아키텍처를 사용하여 예상치 못한 트래픽 급증 대응하기
PDF
[D3T1S02] Aurora Limitless Database Introduction
PDF
[D3T2S01] Amazon Aurora MySQL 메이저 버전 업그레이드 및 Amazon B/G Deployments 실습
PDF
[D3T2S03] Data&AI Roadshow 2024 - Amazon DocumentDB 실습
PDF
AWS Modern Infra with Storage Roadshow 2023 - Day 2
PDF
AWS Modern Infra with Storage Roadshow 2023 - Day 1
PDF
사례로 알아보는 Database Migration Service : 데이터베이스 및 데이터 이관, 통합, 분리, 분석의 도구 - 발표자: ...
PDF
Amazon DocumentDB - Architecture 및 Best Practice (Level 200) - 발표자: 장동훈, Sr. ...
PDF
Amazon Elasticache - Fully managed, Redis & Memcached Compatible Service (Lev...
PDF
Internal Architecture of Amazon Aurora (Level 400) - 발표자: 정달영, APAC RDS Speci...
PDF
[Keynote] 슬기로운 AWS 데이터베이스 선택하기 - 발표자: 강민석, Korea Database SA Manager, WWSO, A...
PDF
Demystify Streaming on AWS - 발표자: 이종혁, Sr Analytics Specialist, WWSO, AWS :::...
PDF
Amazon EMR - Enhancements on Cost/Performance, Serverless - 발표자: 김기영, Sr Anal...
PDF
Amazon OpenSearch - Use Cases, Security/Observability, Serverless and Enhance...
PDF
Enabling Agility with Data Governance - 발표자: 김성연, Analytics Specialist, WWSO,...
[D3T1S01] Gen AI를 위한 Amazon Aurora 활용 사례 방법
[D3T1S06] Neptune Analytics with Vector Similarity Search
[D3T1S03] Amazon DynamoDB design puzzlers
[D3T1S04] Aurora PostgreSQL performance monitoring and troubleshooting by use...
[D3T1S07] AWS S3 - 클라우드 환경에서 데이터베이스 보호하기
[D3T1S05] Aurora 혼합 구성 아키텍처를 사용하여 예상치 못한 트래픽 급증 대응하기
[D3T1S02] Aurora Limitless Database Introduction
[D3T2S01] Amazon Aurora MySQL 메이저 버전 업그레이드 및 Amazon B/G Deployments 실습
[D3T2S03] Data&AI Roadshow 2024 - Amazon DocumentDB 실습
AWS Modern Infra with Storage Roadshow 2023 - Day 2
AWS Modern Infra with Storage Roadshow 2023 - Day 1
사례로 알아보는 Database Migration Service : 데이터베이스 및 데이터 이관, 통합, 분리, 분석의 도구 - 발표자: ...
Amazon DocumentDB - Architecture 및 Best Practice (Level 200) - 발표자: 장동훈, Sr. ...
Amazon Elasticache - Fully managed, Redis & Memcached Compatible Service (Lev...
Internal Architecture of Amazon Aurora (Level 400) - 발표자: 정달영, APAC RDS Speci...
[Keynote] 슬기로운 AWS 데이터베이스 선택하기 - 발표자: 강민석, Korea Database SA Manager, WWSO, A...
Demystify Streaming on AWS - 발표자: 이종혁, Sr Analytics Specialist, WWSO, AWS :::...
Amazon EMR - Enhancements on Cost/Performance, Serverless - 발표자: 김기영, Sr Anal...
Amazon OpenSearch - Use Cases, Security/Observability, Serverless and Enhance...
Enabling Agility with Data Governance - 발표자: 김성연, Analytics Specialist, WWSO,...

Recently uploaded (20)

PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PPTX
MYSQL Presentation for SQL database connectivity
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Approach and Philosophy of On baking technology
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
NewMind AI Monthly Chronicles - July 2025
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Empathic Computing: Creating Shared Understanding
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Encapsulation_ Review paper, used for researhc scholars
PPTX
Big Data Technologies - Introduction.pptx
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
The Rise and Fall of 3GPP – Time for a Sabbatical?
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
MYSQL Presentation for SQL database connectivity
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Approach and Philosophy of On baking technology
Diabetes mellitus diagnosis method based random forest with bat algorithm
Chapter 3 Spatial Domain Image Processing.pdf
Mobile App Security Testing_ A Comprehensive Guide.pdf
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Advanced methodologies resolving dimensionality complications for autism neur...
The AUB Centre for AI in Media Proposal.docx
NewMind AI Monthly Chronicles - July 2025
Digital-Transformation-Roadmap-for-Companies.pptx
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Empathic Computing: Creating Shared Understanding
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Encapsulation_ Review paper, used for researhc scholars
Big Data Technologies - Introduction.pptx

Aurora는 어떻게 다른가 - 김일호 솔루션즈 아키텍트:: AWS Cloud Track 3 Gaming

  • 1. Amazon Aurora는 어떻게 다른가? 김일호 | Solutions Architect
  • 2. MySQL-compatible relational database Performance and availability of commercial databases Simplicity and cost-effectiveness of open source databases What is Amazon Aurora?
  • 3. § 4 client machines with 1,000 connections each WRITE PERFORMANCE READ PERFORMANCE Single client machine with 1,600 connections MySQL SysBench R3.8XL with 32 cores and 244 GB RAM SQL benchmark results
  • 4. Reproducing these results h t t p s : / / d 0. a ws s t a t i c. c o m / p r o d u c t - m a rk e t i n g/ A u r o r a / R DS _ A u r o r a _ Pe r f o r m a n c e _A s s es s me n t _ B e n c h m a r k i ng _v 1 - 2. p d f AMAZON AURORA R3.8XLARGE R3.8XLARGE R3.8XLARGE R3.8XLARGE R3.8XLARGE • Create an Amazon VPC (or use an existing one). • Create four EC2 R3.8XL client instances to run the SysBench client. All four should be in the same AZ. • Enable enhanced networking on your clients. • Tune your Linux settings (see whitepaper). • Install Sysbench version 0.5. • Launch a r3.8xlarge Amazon Aurora DB instance in the sam e VPC and AZ as your clients. • Start your benchmark! 1 2 3 4 5 6 7
  • 6. Do fewer IOs 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 do we achieve these results? DATABASESAREALLABOUT I/O NETWORK-ATTACHED STORAGE IS ALL ABOUT PACKETS/SECOND HIGH-THROUGHPUT PROCESSING DOES NOT ALLOW CONTEXT SWITCHES
  • 7. IO traffic in RDS MySQL BINLOG DATA DOUBLE-WRITELOG FRM FILES T YPE O F WRI T E MYSQL WITH STANDBY Issue write to EBS – EBS issues to mirror, ack when both done Stage write to standby instance using DRBD Issue write to EBS on standby instance IO FLOW Steps 1, 3, 5 are sequential and synchronous This amplifies both latency and jitter Many types of writes for each user operation Have to write data blocks twice to avoid torn writes OBSERVATIONS 780K transactions 7,388K I/Os per million txns (excludes mirroring, standby) Average 7.4 I/Os per transaction PERFORMANCE 30 minute SysBench write-only workload, 100 GB data set, RDS SingleAZ, 30K PIOPS EBS mirrorEBS mirror AZ 1 AZ 2 Amazon S3 EBS Amazon Elastic Bloc k Store (EBS) Primary instance Standby instance 1 2 3 4 5
  • 8. IO traffic in Aurora (database) AZ 1 AZ 3 Primary instance Amazon S3 AZ 2 Replica instance AMAZON AURORA ASYNC 4/6 QUORUM DISTRIBUTED WRITE S BINLOG DATA DOUBLE-WRITELOG FRM FILES T YPE O F WRI T E 30 minute SysBench write-only workload, 100 GB data set IO FLOW Only write redo log records; all steps asynchronous No data block writes (checkpoint, cache replacement) 6X more log writes, but 9X lessnetwork traffic Tolerant of network and storage outlier latency OBSERVATIONS 27,378K transactions 35X MORE 950K I/Os per 1M txns (6X amplification) 7.7X LESS PERFORMANCE Boxcar redo log records – fully ordered by LSN Shuffle to appropriate segments – partially ordered Boxcar to storage nodes and issue writes
  • 9. IO traffic in Aurora (storage node) LOG RECORDS Primary in stance INCOMING QUEUE STORAGE NODE S3 BACKUP 1 2 3 4 5 6 7 8 UPDATE QUEUE ACK HOT LOG DATA BLOCKS POINT IN TIME SNAPSHOT GC SCRUB COALESCE SORT GROUP PEER-TO-PEER GOSSIPPeer storage nodes All steps are asynchronous Only steps 1 and 2 are in foreground latency path Input queue is 46X lessthan MySQL (unamplified, per node) Favor latency-sensitive operations Use disk space to buffer against spikes in activity OBSERVATIONS IO FLOW ① Receive record and add to in-memory queue ② Persist record and ACK ③ Organize records and identify gaps in log ④ Gossip with peers to fill in holes ⑤ Coalesce log records into new data block versions ⑥ Periodically stage log and new block versions to S3 ⑦ Periodically garbage collect old versions ⑧ Periodically validate CRC codes on blocks
  • 10. Asynchronous group commits Read Write Commit Read Read T1 Commit (T1 ) Commit (T2 ) Commit (T3) LSN 1 0 LSN 1 2 LSN 22 LSN 5 0 LSN 30 LSN 34 LSN 41 LSN 47 LSN 20 LSN 49 Commit (T4) Commit (T5) Commit (T6) Commit (T7) Commit (T8 ) LSN GROWTH Durable LSN at head-node COMMIT QUEUE Pending commits in LSN order TIME GROUP COMMIT TRANSACTIONS Read Write Commit Read Read T1 Read Write Commit Read Read Tn § TRADITIONAL APPROACH AMAZON AURORA Maintain a buffer of log records to write out to disk Issue write when buffer full or time out waiting for writes First writer has latency penalty when write rate is low Request I/O with first write, fill buffer till write picked up Individual write durable when 4 of 6 storage nodes ACK Advance DB durable point up to earliest pending ACK
  • 11. § Re-entrant connections multiplexed to active threads § Kernel-space epoll() inserts into latch-free event queue § Dynamically size threads pool § Gracefully handles 5,000+ concurrent client sessions on r3.8xl Standard MySQL – one thread per connection Doesn’t scale with connection count MySQL EE – connections assigned to thread group Requires careful stall threshold tuning CLIENT CONNECTION CLIENT CONNECTION LATCH FREE TASK QUEUE epoll() MYSQL THREAD MODEL AURORA THREAD MODEL Adaptive thread pool
  • 12. IO traffic in Aurora (read replica) PAGE CACHE UPDATE 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 SINGLE-THREADED BINLOG APPLY Data volume Data volume § Logical: Ship SQL statements to replica. § Write workload similar on both instances. § Independent storage. § Can result in data drift between master and replica. Physical: Ship redo from master to replica. Replica shares storage. No writes performed. Cached pages have redo applied. Advance read view when all commits seen. MYSQL READ SCALING AMAZON AURORA READ SCALING
  • 13. Improvements over the past few months Write batch size tuning Asynchronous send for read/write I/Os Purge thread performance Bulk insert performance BATCH OPERATIONS Failover time reductions Malloc reduction System call reductions Undo slot caching patterns Cooperative log apply OTHER Binlog and distributed transactions Lock compression Read-ahead CUSTOMER FEEDBACK Hot row contention Dictionary statistics Mini-transaction commit code path Query cache read/write conflicts Dictionary system mutex LOCK CONTENTION
  • 14. What makes Aurora highly available.
  • 15. Storage node availability § Quorum system for read/write; latency tolerant § Peer-to-peer gossip replication to fill in holes § Continuous backup to S3 (designed for 11 9s durability) § Continuous scrubbing of data blocks § Continuous monitoring of nodes and disks for repair § 10 GB segments as unit of repair or hotspot rebalance to quickly rebalance load § Quorum membership changes do not stall writes AZ 1 AZ 2 AZ 3 Amazon S3
  • 16. Traditional databases § Have to replay logs since the last checkpoint § Typically 5 minutes between checkpoints § Single-threaded in MySQL; requires a large number of disk accesses Amazon Aurora § Underlying storage replays redo records on demand as part of a disk read § Parallel, distributed, asynchronous § No replay for startup Checkpointed data Redo log Crash at T0 requires a reapplication of the SQL in the redo log since last checkpoint T0 T0 Crash at T0 will result in redo logs being applied t o each segment on demand, in parallel, asynchro nously Instant crash recovery
  • 17. Survivable caches § 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
  • 18. Faster, more predictable failover App runningFailure detection DNS propagation Recovery Recovery DB failure MYSQL App running Failure detection DNS propagation Recovery DB failure AURORA WITH MARIADB DRIVER 1 5 - 2 0 s e c 3 - 2 0 s e c
  • 20. § “Amazon Aurora was able to satisfy all of our scale requirements with no degradation in performance. With Alfresco on Amazon Aurora we scaled to 1 billion documents with a throughput of 3 million per hour, which is 10 times faster than our MySQL environment. It just works!" - John Newton, Founder and CTO of Alfresco
  • 21. § “We ran our compatibility test suites againstAmazon Aurora and everything just worked.Amazon Aurora paired with Tableau means data users can take advantage of the 5x throughputAmazon Aurora provides and deliver faster analytic insights throughouttheir organizations.We look forward to offering our Amazon Aurora Tableau connector." - Dan Jewett, Vice President of Product Managementat Tableau
  • 22. § "기존 RDS는 스토리지의 용량과 IOPS의 필요치를 예측해서 설정해야 했습니다. 하지만 Aurora에서는 이를 예측할 필요 없이 필요한 만큼 사용할 수 있습니다.덕분에 비용 절감은 물론이고, I/O 병목에 대한 걱정을 덜 수 있었습니다." § "기존 DB에서 Aurora로 migration하는 데에 어려움이 있었습니다.하지만 최근에 나온 AWS Database Migration Service를 활용하면 좀 더 쉽게 migration을 진행할 수 있으리라 봅니다."