Ce diaporama a bien été signalé.
Nous utilisons votre profil LinkedIn et vos données d’activité pour vous proposer des publicités personnalisées et pertinentes. Vous pouvez changer vos préférences de publicités à tout moment.

Amazon Aurora로 안전하게 migration 하기

433 vues

Publié le

Amazon Aurora로의 안정적인 마이그레이션 경험을 공유합니다. Aurora에 대해서 궁금하신분, 마이그레이션이 두려우시거나 실패해보신 분을 위한 좋은 자료가 되었으면 합니다. (2018년 9월 19일 AWS KRUG 아키텍쳐 소모임 발표)

Publié dans : Logiciels
  • Login to see the comments

Amazon Aurora로 안전하게 migration 하기

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

  23. 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. 24. : Step 0 - Migration • DB VPC • DB VPC • : DB VPC 
 VPC Peering Connection 

  25. 25. : Step 1 - Aurora Read Replica , • Aurora Read Replica migration • DB Aurora Cluster slave • Aurora Cluster master ( )
  26. 26. : Step 1 - Aurora Read Replica , source: AWS Documentation
  27. 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. 28. : Step 2 - Replica Lag • Replication Replica Lag • Replica Lag 0 • Aurora Query Replica Lag Permission • CloudWatch
  29. 29. : Step 2 - Replica Lag : https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Aurora.Monitoring.html
  30. 30. : Step 3 - Replica Lag 0 WAS • Replica Lag 0 DB 
 • DB Write Transaction • 
 • DB 
 Write Transaction • WAS ELB
  31. 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. 32. : Step 4 - Aurora Master (Promote) • • DB Promote DB Cluster role • : Promote 
 DB Query !
 (Binary Log )
  33. 33. : Step 5 - Aurora Connection • WAS DB Endpoint DB • DB , ELB • DB Rollback
  34. 34. • Sixshop 2 ( 11GB) • DB • • • • & ( ) • DBMS Parameter • Amazon Aurora . .
  35. 35. ! jesang.yoon@hbsmith.io

×