SlideShare ist ein Scribd-Unternehmen logo
1 von 35
Downloaden Sie, um offline zu lesen
Amazon Aurora 

migration
2018.9.19

jesang.yoon@hbsmith.io
HBSmith .
• HBSmith Co-Founder, CTO, SW Developer

• 2013 AWS 

• #Architecture 

• : & , AWS, Python, Apple, Youtube

• Email: jesang.yoon@hbsmith.io

• GitHub ID: yoonjs2
, ?
• HBSmith Business Logic & 

.

• AI Bot 24 365 

.

• .

• NaverLabs, KTH, , Wanted 



• hello@hbsmith.io https://hbsmith.io
.
• AWS 

• Amazon RDS Database 

• Amazon Aurora 

• 

• Amazon Aurora
Computing : Disk
• CPU 

• HDD 

• CPU 

HDD 

• SSD 

Reference: Intel newsroom
Backend Scale-out : RDBMS
• 

Scale-out 

• RDBMS 

( )

• DB Scale-out 

• Cache Sharding Read 

Replica
RDBMS :
• RDBMS 

• ACID 

• Atomicity: - 

• Consistency: - 

• Isolation: - 

• Durability: -source: Loginworks software
RDBMS Scale-out ?

: Split brain
• Sync 2 master node 

• Sync 

• DB 



• Sync 

(Consistency )

• RDBMS “ ” 

• Split Brain .
source: Trifork blog
: Split Brain Syndrome
• (腦梁梁) 





• , 

• 



.
source: Mrs. Eplin's IB Psychology Class Blog
RDBMS Scale-out ?

:
• Split brain
Master 1 

• Master 



• Master 1 SPOF

• Master Scale-up

• Scale-up 

• Sharding…
NoSQL RDBMS ?: CAP
• DBMS
3 2 .

• Consistency:
.

• Availability: 

.

• Partition Tolerance:
.
source: Wikipedia
NoSQL RDBMS ?
• NoSQL: CAP C 

A P !

• Consistency RDBMS


•
Consistency
...
Database ?
• Amazon Aurora AWS 

( )

• 

• AWS Amazon Aurora 



• 

(AWS Documentation ...)
Amazon Aurora Multi-master or Serverless
Amazon Aurora : Sixshop
• Builder ( : WIX)

• 2016 AWS 

• Amazon RDS MySQL

• 2 

• 10 DAU

• DB
• Downtime

• DBMS .

• .
• 1 : DB Snapshot Aurora .

• 2 : Aurora Replica Cluster .

• Downtime 2
AS-IS : Spec
• Risk .

• DBMS 

• Database Engine Version

• Network 

• DB ( , , )

• DB 

• DB Parameter
AS-IS : DBMS Parameter
• : RDS Web Console Parameter -> 2 DB -> Compare
• : RDS MySQL Parameter 1 , Aurora MySQL 1 , 1 

• : encoding, engine, timezone .
AS-IS : Table Schema
• 

• Schema ( )

• Table ( )

• Table Row Count
AS-IS : DB
• 

• ?

: Sixshop 3~4 

• / ?

: Sixshop 1~2 

• ?

: Sixshop 

• Architecture ?

:
AS-IS :
• DB VPC 

• DB VPC 

• : DB VPC 

VPC Peering Connection 

TO-BE:
• DB SQL Engine , Instance Tier Aurora 

• : Aurora MySQL 5.6 .

5.5 RDS MySQL 5.6 



• AS-IS 

Step-by-Step .

• AWS Root AS-IS TO-BE Step-by-Step
.

• : Step Step 





: Step 0 - Migration
• DB VPC 

• DB VPC 

• : DB VPC 

VPC Peering Connection 

: Step 1 - Aurora Read Replica ,
• Aurora Read Replica migration

• DB Aurora
Cluster slave 

• Aurora Cluster
master
( )
: Step 1 - Aurora Read Replica ,
source: AWS Documentation
: Step 1 - Aurora Read Replica ,
1. Source DB Snapshot .

2. 1) Snapshop Aurora Read Replica .
(Cluster Instance )

3. Source DB Read Replica Replication = Source DB
Replica Replica .
Aurora Read Replica
: Step 2 - Replica Lag
• Replication Replica Lag 

• Replica Lag 0 

• Aurora Query Replica Lag
Permission 

• CloudWatch
: Step 2 - Replica Lag
: https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Aurora.Monitoring.html
: Step 3 - Replica Lag 0 WAS
• Replica Lag 0 DB 



• DB Write Transaction 

• 



• DB 

Write Transaction 

• WAS ELB
: Step 3 - Replica Lag 0 WAS
• DB 

Row Count 

• Row Count 

• 

• Row Count 

Step
SELECT CONCAT(
'SELECT "',
table_name,
'" AS table_name, COUNT(*) AS exact_row_count FROM `',
table_schema,
'`.`',
table_name,
'` UNION '
)
FROM INFORMATION_SCHEMA.TABLES
WHERE table_schema = '<my table schema>';
: Step 4 - Aurora Master (Promote)
• 

• DB Promote DB
Cluster role
• : Promote 

DB Query !

(Binary Log )
: Step 5 - Aurora Connection
• WAS DB Endpoint DB


• DB ,
ELB


• DB Rollback
• Sixshop 2 ( 11GB)

• DB 

• 

•
• 

• & ( )

• DBMS Parameter 

• Amazon Aurora . .
!
jesang.yoon@hbsmith.io

Weitere ähnliche Inhalte

Was ist angesagt?

CUBRID Cluster Introduction
CUBRID Cluster IntroductionCUBRID Cluster Introduction
CUBRID Cluster Introduction
CUBRID
 
MariaDB with SphinxSE
MariaDB with SphinxSEMariaDB with SphinxSE
MariaDB with SphinxSE
Colin Charles
 
MySQL 5.5&5.6 new features summary
MySQL 5.5&5.6 new features summaryMySQL 5.5&5.6 new features summary
MySQL 5.5&5.6 new features summary
Louis liu
 
My sql 56_roadmap_april2012_zht2
My sql 56_roadmap_april2012_zht2My sql 56_roadmap_april2012_zht2
My sql 56_roadmap_april2012_zht2
Ivan Tu
 
MariaDB Galera Cluster
MariaDB Galera ClusterMariaDB Galera Cluster
MariaDB Galera Cluster
Abdul Manaf
 

Was ist angesagt? (20)

Introduction to ClustrixDB
Introduction to ClustrixDBIntroduction to ClustrixDB
Introduction to ClustrixDB
 
Introduction to MariaDB MaxScale
Introduction to MariaDB MaxScaleIntroduction to MariaDB MaxScale
Introduction to MariaDB MaxScale
 
CUBRID Cluster Introduction
CUBRID Cluster IntroductionCUBRID Cluster Introduction
CUBRID Cluster Introduction
 
MariaDB with SphinxSE
MariaDB with SphinxSEMariaDB with SphinxSE
MariaDB with SphinxSE
 
Introduction to MariaDB
Introduction to MariaDBIntroduction to MariaDB
Introduction to MariaDB
 
MySQL 5.5&5.6 new features summary
MySQL 5.5&5.6 new features summaryMySQL 5.5&5.6 new features summary
MySQL 5.5&5.6 new features summary
 
PostgreSQL and MySQL
PostgreSQL and MySQLPostgreSQL and MySQL
PostgreSQL and MySQL
 
A beginners guide to MariaDB
A beginners guide to MariaDBA beginners guide to MariaDB
A beginners guide to MariaDB
 
Upgrade to MySQL 5.7 and latest news planned for MySQL 8
Upgrade to MySQL 5.7 and latest news planned for MySQL 8Upgrade to MySQL 5.7 and latest news planned for MySQL 8
Upgrade to MySQL 5.7 and latest news planned for MySQL 8
 
"Advanced MySQL 5 Tuning" by Michael Monty Widenius @ eLiberatica 2007
"Advanced MySQL 5 Tuning" by Michael Monty Widenius @ eLiberatica 2007"Advanced MySQL 5 Tuning" by Michael Monty Widenius @ eLiberatica 2007
"Advanced MySQL 5 Tuning" by Michael Monty Widenius @ eLiberatica 2007
 
MySQL 5.6 config 優化
MySQL 5.6 config 優化MySQL 5.6 config 優化
MySQL 5.6 config 優化
 
My sql 56_roadmap_april2012_zht2
My sql 56_roadmap_april2012_zht2My sql 56_roadmap_april2012_zht2
My sql 56_roadmap_april2012_zht2
 
MySQL Enterprise Backup (MEB)
MySQL Enterprise Backup (MEB)MySQL Enterprise Backup (MEB)
MySQL Enterprise Backup (MEB)
 
Galera cluster for high availability
Galera cluster for high availability Galera cluster for high availability
Galera cluster for high availability
 
M|18 How to use MyRocks with MariaDB Server
M|18 How to use MyRocks with MariaDB ServerM|18 How to use MyRocks with MariaDB Server
M|18 How to use MyRocks with MariaDB Server
 
The New MariaDB Offering: MariaDB 10, MaxScale and More
The New MariaDB Offering: MariaDB 10, MaxScale and MoreThe New MariaDB Offering: MariaDB 10, MaxScale and More
The New MariaDB Offering: MariaDB 10, MaxScale and More
 
MariaDB Galera Cluster
MariaDB Galera ClusterMariaDB Galera Cluster
MariaDB Galera Cluster
 
High performance and high availability proxies for MySQL
High performance and high availability proxies for MySQLHigh performance and high availability proxies for MySQL
High performance and high availability proxies for MySQL
 
MariaDB 10 Tutorial - 13.11.11 - Percona Live London
MariaDB 10 Tutorial - 13.11.11 - Percona Live LondonMariaDB 10 Tutorial - 13.11.11 - Percona Live London
MariaDB 10 Tutorial - 13.11.11 - Percona Live London
 
MySQL 开发
MySQL 开发MySQL 开发
MySQL 开发
 

Ähnlich wie Amazon Aurora로 안전하게 migration 하기

Ähnlich wie Amazon Aurora로 안전하게 migration 하기 (20)

KeyValue Stores
KeyValue StoresKeyValue Stores
KeyValue Stores
 
Log Analysis At Scale
Log Analysis At ScaleLog Analysis At Scale
Log Analysis At Scale
 
Storage Engine Wars at Parse
Storage Engine Wars at ParseStorage Engine Wars at Parse
Storage Engine Wars at Parse
 
Deep Dive RDS & Aurora - Pop-up Loft TLV 2017
Deep Dive RDS & Aurora - Pop-up Loft TLV 2017Deep Dive RDS & Aurora - Pop-up Loft TLV 2017
Deep Dive RDS & Aurora - Pop-up Loft TLV 2017
 
Deep Dive: Amazon Relational Database Service (March 2017)
Deep Dive: Amazon Relational Database Service (March 2017)Deep Dive: Amazon Relational Database Service (March 2017)
Deep Dive: Amazon Relational Database Service (March 2017)
 
SCALE12X Build a Cloud Day: Chef: The Swiss Army Knife of Cloud Infrastructure
SCALE12X Build a Cloud Day: Chef: The Swiss Army Knife of Cloud InfrastructureSCALE12X Build a Cloud Day: Chef: The Swiss Army Knife of Cloud Infrastructure
SCALE12X Build a Cloud Day: Chef: The Swiss Army Knife of Cloud Infrastructure
 
Migrating Your Databases to AWS Deep Dive on Amazon RDS and AWS
Migrating Your Databases to AWS Deep Dive on Amazon RDS and AWSMigrating Your Databases to AWS Deep Dive on Amazon RDS and AWS
Migrating Your Databases to AWS Deep Dive on Amazon RDS and AWS
 
Amazon Web Services OverView
Amazon Web Services OverViewAmazon Web Services OverView
Amazon Web Services OverView
 
Scaling horizontally on AWS
Scaling horizontally on AWSScaling horizontally on AWS
Scaling horizontally on AWS
 
Cross-regional Application Deplolyment on AWS - Channy Yun (JAWS Days 2017)
Cross-regional Application Deplolyment on AWS - Channy Yun (JAWS Days 2017)Cross-regional Application Deplolyment on AWS - Channy Yun (JAWS Days 2017)
Cross-regional Application Deplolyment on AWS - Channy Yun (JAWS Days 2017)
 
Journey Towards Scaling Your Application to Million Users
Journey Towards Scaling Your Application to Million UsersJourney Towards Scaling Your Application to Million Users
Journey Towards Scaling Your Application to Million Users
 
Deep Dive on Amazon Relational Database Service
Deep Dive on Amazon Relational Database ServiceDeep Dive on Amazon Relational Database Service
Deep Dive on Amazon Relational Database Service
 
Amazon Aurora Let's Talk About Performance
Amazon Aurora Let's Talk About PerformanceAmazon Aurora Let's Talk About Performance
Amazon Aurora Let's Talk About Performance
 
Deep Dive on Amazon Relational Database Service
Deep Dive on Amazon Relational Database ServiceDeep Dive on Amazon Relational Database Service
Deep Dive on Amazon Relational Database Service
 
Amazon Aurora: Amazon’s New Relational Database Engine
Amazon Aurora: Amazon’s New Relational Database EngineAmazon Aurora: Amazon’s New Relational Database Engine
Amazon Aurora: Amazon’s New Relational Database Engine
 
AWS re:Invent 2016: Deep Dive on Amazon Relational Database Service (DAT305)
AWS re:Invent 2016: Deep Dive on Amazon Relational Database Service (DAT305)AWS re:Invent 2016: Deep Dive on Amazon Relational Database Service (DAT305)
AWS re:Invent 2016: Deep Dive on Amazon Relational Database Service (DAT305)
 
Amazon Relational Database Service Deep Dive
Amazon Relational Database Service Deep DiveAmazon Relational Database Service Deep Dive
Amazon Relational Database Service Deep Dive
 
Deep Dive on Amazon Relational Database Service
Deep Dive on Amazon Relational Database ServiceDeep Dive on Amazon Relational Database Service
Deep Dive on Amazon Relational Database Service
 
Best of re:Invent
Best of re:InventBest of re:Invent
Best of re:Invent
 
Visualization of RDS metrics using AWS CLI and JQuery at AWS Usergroup Leipzig
Visualization of RDS metrics using AWS CLI and JQuery at AWS Usergroup LeipzigVisualization of RDS metrics using AWS CLI and JQuery at AWS Usergroup Leipzig
Visualization of RDS metrics using AWS CLI and JQuery at AWS Usergroup Leipzig
 

Mehr von Jesang Yoon

Mehr von Jesang Yoon (7)

AWS Cloud Job Fair 2022 발표자료
AWS Cloud Job Fair 2022 발표자료AWS Cloud Job Fair 2022 발표자료
AWS Cloud Job Fair 2022 발표자료
 
DevOps는 원격근무를 추구하면 안되는 걸까?
DevOps는 원격근무를 추구하면 안되는 걸까?DevOps는 원격근무를 추구하면 안되는 걸까?
DevOps는 원격근무를 추구하면 안되는 걸까?
 
Project TIMAT - infrastructure as code
Project TIMAT - infrastructure as codeProject TIMAT - infrastructure as code
Project TIMAT - infrastructure as code
 
AWS S3를 이용한 효과적인 SPA 배포
AWS S3를 이용한 효과적인 SPA 배포AWS S3를 이용한 효과적인 SPA 배포
AWS S3를 이용한 효과적인 SPA 배포
 
AWS Lambda를 이용한 CI/CD 기법
AWS Lambda를 이용한 CI/CD 기법AWS Lambda를 이용한 CI/CD 기법
AWS Lambda를 이용한 CI/CD 기법
 
대기업에서 스타트업 까지 - 윤제상
대기업에서 스타트업 까지 - 윤제상대기업에서 스타트업 까지 - 윤제상
대기업에서 스타트업 까지 - 윤제상
 
node.js 실무 - node js in practice by Jesang Yoon
node.js 실무 - node js in practice by Jesang Yoonnode.js 실무 - node js in practice by Jesang Yoon
node.js 실무 - node js in practice by Jesang Yoon
 

Kürzlich hochgeladen

Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
chiefasafspells
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
masabamasaba
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
masabamasaba
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Medical / Health Care (+971588192166) Mifepristone and Misoprostol tablets 200mg
 

Kürzlich hochgeladen (20)

Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
 
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
 
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?
 
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
WSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaSWSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaS
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 

Amazon Aurora로 안전하게 migration 하기

  • 2. HBSmith . • HBSmith Co-Founder, CTO, SW Developer • 2013 AWS • #Architecture • : & , AWS, Python, Apple, Youtube • Email: jesang.yoon@hbsmith.io • GitHub ID: yoonjs2
  • 3. , ? • HBSmith Business Logic & 
 . • AI Bot 24 365 
 . • . • NaverLabs, KTH, , Wanted 
 • hello@hbsmith.io https://hbsmith.io
  • 4. . • AWS • Amazon RDS Database • Amazon Aurora • • Amazon Aurora
  • 5. Computing : Disk • CPU • HDD • CPU 
 HDD • SSD 
 Reference: Intel newsroom
  • 6. Backend Scale-out : RDBMS • 
 Scale-out • RDBMS 
 ( ) • DB Scale-out • Cache Sharding Read 
 Replica
  • 7. RDBMS : • RDBMS • ACID • Atomicity: - • Consistency: - • Isolation: - • Durability: -source: Loginworks software
  • 8. RDBMS Scale-out ?
 : Split brain • Sync 2 master node • Sync • DB 
 • Sync 
 (Consistency ) • RDBMS “ ” • Split Brain . source: Trifork blog
  • 9. : Split Brain Syndrome • (腦梁梁) 
 
 • , • 
 
 . source: Mrs. Eplin's IB Psychology Class Blog
  • 10. RDBMS Scale-out ?
 : • Split brain Master 1 • Master 
 • Master 1 SPOF • Master Scale-up • Scale-up • Sharding…
  • 11. NoSQL RDBMS ?: CAP • DBMS 3 2 . • Consistency: . • Availability: 
 . • Partition Tolerance: . source: Wikipedia
  • 12. NoSQL RDBMS ? • NoSQL: CAP C 
 A P ! • Consistency RDBMS • Consistency ...
  • 13. Database ? • Amazon Aurora AWS 
 ( ) • • AWS Amazon Aurora 
 • 
 (AWS Documentation ...)
  • 14. Amazon Aurora Multi-master or Serverless
  • 15. Amazon Aurora : Sixshop • Builder ( : WIX) • 2016 AWS • Amazon RDS MySQL • 2 • 10 DAU • DB
  • 17. • 1 : DB Snapshot Aurora . • 2 : Aurora Replica Cluster . • Downtime 2
  • 18. AS-IS : Spec • Risk . • DBMS • Database Engine Version • Network • DB ( , , ) • DB • DB Parameter
  • 19. AS-IS : DBMS Parameter • : RDS Web Console Parameter -> 2 DB -> Compare • : RDS MySQL Parameter 1 , Aurora MySQL 1 , 1 • : encoding, engine, timezone .
  • 20. AS-IS : Table Schema • • Schema ( ) • Table ( ) • Table Row Count
  • 21. AS-IS : DB • • ?
 : Sixshop 3~4 • / ?
 : Sixshop 1~2 • ?
 : Sixshop • Architecture ?
 :
  • 22. AS-IS : • DB VPC • DB VPC • : DB VPC 
 VPC Peering Connection 

  • 23. TO-BE: • DB SQL Engine , Instance Tier Aurora • : Aurora MySQL 5.6 .
 5.5 RDS MySQL 5.6 
 • AS-IS 
 Step-by-Step . • AWS Root AS-IS TO-BE Step-by-Step . • : Step Step 
 
 

  • 24. : Step 0 - Migration • DB VPC • DB VPC • : DB VPC 
 VPC Peering Connection 

  • 25. : Step 1 - Aurora Read Replica , • Aurora Read Replica migration • DB Aurora Cluster slave • Aurora Cluster master ( )
  • 26. : Step 1 - Aurora Read Replica , source: AWS Documentation
  • 27. : Step 1 - Aurora Read Replica , 1. Source DB Snapshot . 2. 1) Snapshop Aurora Read Replica . (Cluster Instance ) 3. Source DB Read Replica Replication = Source DB Replica Replica . Aurora Read Replica
  • 28. : Step 2 - Replica Lag • Replication Replica Lag • Replica Lag 0 • Aurora Query Replica Lag Permission • CloudWatch
  • 29. : Step 2 - Replica Lag : https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Aurora.Monitoring.html
  • 30. : Step 3 - Replica Lag 0 WAS • Replica Lag 0 DB 
 • DB Write Transaction • 
 • DB 
 Write Transaction • WAS ELB
  • 31. : Step 3 - Replica Lag 0 WAS • DB 
 Row Count • Row Count • • Row Count 
 Step SELECT CONCAT( 'SELECT "', table_name, '" AS table_name, COUNT(*) AS exact_row_count FROM `', table_schema, '`.`', table_name, '` UNION ' ) FROM INFORMATION_SCHEMA.TABLES WHERE table_schema = '<my table schema>';
  • 32. : Step 4 - Aurora Master (Promote) • • DB Promote DB Cluster role • : Promote 
 DB Query !
 (Binary Log )
  • 33. : Step 5 - Aurora Connection • WAS DB Endpoint DB • DB , ELB • DB Rollback
  • 34. • Sixshop 2 ( 11GB) • DB • • • • & ( ) • DBMS Parameter • Amazon Aurora . .