SlideShare a Scribd company logo
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Amazon Aurora
Blue Green Deployment
A W S D A T A & A I R O A D S H O W 2 0 2 4
박진현
Solutions Architect
AWS
송정우
Solutions Architect
AWS
이덕현
Database Specialist SA
AWS
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
Agenda
시작시간 종료시간 내용
9:00 9:30 Hands on Lab 환경 구성
9:30 10:00 Aurora MySQL 3 Upgrade 시 주의할 내용
10:00 11:30 Aurora Blue/Green Deployment 실습
11:30 12:00 Aurora 와 R53 을 이용한 사전 테스트 방법
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Aurora Blue Green Deployment
Hands on Lab 환경 구성
3
박진현
Solutions Architect
AWS
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Hands on Lab 링크
4
https://bit.ly/3xzP8Tc
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
워크샵 시작 준비
5
Email one-time password (OTP) 선택한 뒤
개인 email로 인증
à 해당 계정으로 72시간 사용 가능
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
워크샵 시작 준비
6
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
워크샵 시작 준비
7
Blue/Green 실습을 진행하기 위해
새로운 Blue/Green 환경 구성 필요
à 10분 이상 소요되는 작업으로
미리 해당 작업 진행
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Aurora MySQL 3 upgrade 주의사항
(temptable , collation)
8
이덕현
Database Specialist SA
AWS
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Aurora Temp table
인스턴스 Memory 의 ¾ 는 InnoDB Buffer 로 사용 , 나머지 ¼ 영역에서 temp 가 같이 사용 됩니다.
-> 너무 큰 숫자로 설정할 경우 OOM 에 의한 Aurora 장애로 연결 될 수 있습니다.
Buffer pool
Reads
OS Heap
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
temptable_max_ram, temptable_max_mmap
10
MySQL 8.0, 내부 임시 테이블에 TempTable 엔진 사용 가능
• 기존 Memory 엔진은 가변 길이 타입 컬럼을 지원하지 않음
• varchar 및 varbinary 컬럼 별 최대 길이 만큼 메모리를 할당하여 비효율적인 면이 있음
• Internal_tmp_mem_storage_engine=TempTable 설정 시
• 내부 임시 테이블을 temptable_max_ram 크기만큼 메모리에서 사용 가능
• temptable_max_mmap 크기만큼 Aurora Local Storage에 메모리 매핑(MMAP) 형식의 디스크
파일 쓰기 가능
• 메모리 상 TempTable 형식의 데이터를 그대로 MMAP 파일로 전환하는 것이 오버헤드가 더 적음
• MMAP 파일 공간 한도 도달 시 Aurora Cluster(Data) Storage에 InnoDB 형식의 디스크 파일 사용
”내부 임시 테이블 사용 쿼리”
Memory
{temptable_max_ram}
Local Storage
{temptable_max_mma
p}
Cluster Storage
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
temptable_max_ram, temptable_max_mmap
Aurora MySQL의 temptable_max_ram, temptable_max_mmap 기본값
temptable_max_mmap, temptable_max_ram 모두 기본 1GiB로 설정됨
메모리가 16GiB 미만인 인스턴스(T타입)에서는 temptable_max_ram 가 기본 16 MiB로 설정됨
내부 임시 테이블 사용 쿼리 실행 중, temptable_max_mmap 크기의 한계에 다다르면 에러 발생
Writer 에서는 temptable_max_mmap 크기 초과 시 Aurora Storage에 InnoDB 형식의 테이블 쓰기 가능
→ 더 큰 임시 테이블 공간 사용 가능
Reader 에서는 Aurora Storage 쓰기가 불가능하여 temptable_max_mmap 크기 초과 시 위 에러 발생
11
ERROR 1114 : The table '/rdsdbdata/tmp/#sqlfd_1586_2' is full
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
temptable_max_mmap , temptable_max_ram
{DBInstanceClassMemory*1/16}
--
24xlarge --768GB
show variables like '%temp%'
-> ;
+-----------------------------------------------+-----------------------+
| Variable_name | Value |
+-----------------------------------------------+-----------------------+
| avoid_temporal_upgrade | OFF |
| innodb_cleanup_temp_tablespaces_in_background | ON |
| innodb_temp_data_file_path | ibtmp1:12M:autoextend |
| innodb_temp_tablespaces_dir | ./ |
| show_old_temporals | OFF |
| temptable_max_mmap | 49846937856 |
| temptable_max_ram | 49846937856 |
| temptable_use_mmap | ON |
+-----------------------------------------------+-----------------------+
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
4xlarge - 256GB
MySQL [sysbench]> show variables like '%temp%';
+-----------------------------------------------+-----------------------+
| Variable_name | Value |
+-----------------------------------------------+-----------------------+
| avoid_temporal_upgrade | OFF |
| innodb_cleanup_temp_tablespaces_in_background | ON |
| innodb_temp_data_file_path | ibtmp1:12M:autoextend |
| innodb_temp_tablespaces_dir | ./ |
| show_old_temporals | OFF |
| temptable_max_mmap | 16407041280 |
| temptable_max_ram | 16407041280 |
| temptable_use_mmap | ON |
+-----------------------------------------------+-----------------------+
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. 14
Aurora Character Set & Collection
Aurora MySQL 2.11.4 Aurora MySQL 3.04.2
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. 15
Aurora Character Set & Collection
Aurora MySQL 2.11.4 Aurora MySQL 3.04.2
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. 16
Aurora Character Set & Collection
Aurora MySQL 2.11.4 Aurora MySQL 3.04.2
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. 17
Aurora Character Set & Collection
Aurora MySQL 2.11.4 Aurora MySQL 3.04.2
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Aurora Blue Green Deployment
Hands on Lab
18
박진현
Solutions Architect
AWS
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
RDS Blue/Green 배포 – 시작점
Users /
Applications
DB endpoint
AWS Cloud
Amazon RDS
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
RDS Blue/Green 배포 – 시작점
Users /
Applications
DB endpoint
Blue
Primary
Current
Production
AWS Cloud
Amazon RDS
Blue Replicas
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
RDS Blue/Green 배포 – 임시 상태
Users /
Applications
DB endpoint
Logical replication to sync
from ‘blue’ to ‘green’
Blue
Primary
Green
Primary
Future
Production
Current
Production
AWS Cloud
Amazon RDS
Blue Replicas Green Replicas
• 현재 프로덕션
환경(파란색)의 미러링된
복사본을 그린 환경(향후
프로덕션)으로 생성합니다.
• 파란색 기본과 녹색 기본
간의 논리적 복제 설정
• 전환 전 그린 환경에서 그린
수정, 복제본 추가/제거, 변경
사항 테스트
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
RDS Blue/Green 배포 – 종료 상태
Users /
Applications
DB endpoint
Green
Primary
Final
Production
AWS Cloud
Green Replicas
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Amazon Aurora Blue/Green 배포
Region
Availability Zone
3
Availability Zone
1
Availability Zone
2
Aurora storage
RW
Users /
Applications
db cluster
endpoint
RO
Source
mycluster
Aurora MySQL 2.10.2 (5.7)
Aurora storage
RO
RW RO
Target
mycluster-green-x1234
Aurora MySQL 2.10.2 (5.7)
create-blue-green-deployment
RO RO
RO
RO
switchover-blue-green-deployment
delete-blue-green-deployment
AVAILABLE
SWITCHOVER_IN_PROGRESS
SWITCHOVER_COMPLETED
Source
mycluster-old1
Aurora MySQL 2.10.2 (5.7)
customer verification
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Hands on Lab 링크
24
https://bit.ly/3xzP8Tc
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Aurora와 R53을 이용한
사전 테스트 방법
25
송정우
Solutions Architect
AWS
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Contents
26
ü 사전 확인
ü 아키텍처
ü Demo
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
사전 확인
• 만약 Secrets Manager를 사용하여 DB에 접근하고 있다면, Blue/Green Deployment를 적용할 수
없습니다.
• Blue/Green Deployment를 이용하기 위해서는 binlog를 활성화시켜야 합니다.
이외의 부분들은 아래의 문서를 확인하시길 바랍니다.
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/blue-green-deployments-overview.html#blue-green-deployments-limitations
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
1st 아키텍처
28
블루 서비스
타겟 그룹
ALB
태스크
…
그린 서비스
타겟 그룹
ALB
태스크
…
xxx.xxx.com
Blue에서 Green으로
동기화 하는
논리적 복제
블루
프라이머리
그린
프라이머리
Amazon Route 53
🌟 Read-only Traffic!
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. 29
블루 서비스
타겟 그룹
ALB
태스크
…
그린 서비스
타겟 그룹
ALB
태스크
…
xxx.xxx.com
Blue에서 Green으로
동기화 하는
논리적 복제
블루
프라이머리
그린
프라이머리
Amazon Route 53
100 0
Route53의
Traffic Policy를 활용
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. 30
블루 서비스
타겟 그룹
ALB
태스크
…
그린 서비스
타겟 그룹
ALB
태스크
…
xxx.xxx.com
Blue에서 Green으로
동기화 하는
논리적 복제
블루
프라이머리
그린
프라이머리
Amazon Route 53
90 10
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. 31
블루 서비스
타겟 그룹
ALB
태스크
…
그린 서비스
타겟 그룹
ALB
태스크
…
xxx.xxx.com
Blue에서 Green으로
동기화 하는
논리적 복제
블루
프라이머리
그린
프라이머리
Amazon Route 53
50 50
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. 32
블루 서비스
타겟 그룹
ALB
태스크
…
그린 서비스
타겟 그룹
ALB
태스크
…
xxx.xxx.com
Blue에서 Green으로
동기화 하는
논리적 복제
블루
프라이머리
그린
프라이머리
Amazon Route 53
10 90
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. 33
블루 서비스
타겟 그룹
ALB
태스크
…
그린 서비스
타겟 그룹
ALB
태스크
…
xxx.xxx.com
Blue에서 Green으로
동기화 하는
논리적 복제
블루
프라이머리
그린
프라이머리
Amazon Route 53
0 100
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
1st 아키텍처 주의 사항
• Read-Only 트래픽이 아니라면, 쓰기 트래픽이 나누어져 흘러 들어가기 때문에 큰 문제를
발생시킬 수 있습니다.
• DB 뿐만 아니라 Application Layer에 해당 하는 세트를 한 벌 더 띄우기 때문에 비용적인 부분을
고려할 필요가 있습니다.
• Route 53의 Traffic Policy로 인한 추가 비용이 발생할 수 있습니다.
즉, 위의 조건들에 의해 첫 번째 아키텍처는 다음의 상황에서 적절합니다.
• 테스트를 위한 부하 발생 도구들을 활용하고 있을 때
• 테스트 트래픽을 흘려 보내 보고 싶을 때
• 완벽하게 동일한 환경에서 테스트/확인해보고 싶을 때
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
2nd Architecture
35
서비스
타겟 그룹
ALB
태스크
…
Blue에서 Green으로
동기화 하는
논리적 복제
Blue
Primary Green
Primary
쓰기 엔드포인트
연결
읽기 엔드포인트
연결
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
2nd 아키텍처 주의 사항
즉, 위의 조건들에 의해 두 번째 아키텍처는 다음의 상황에서 적절합니다.
• 사전에 이미 테스트가 진행됐을 때
• 프로덕션 레벨에서 실제 트래픽을 활용한 테스트가 필요할 때
• 애플리케이션 내 CQRS 패턴 적용 혹은 읽기/쓰기 엔드포인트가 사전에 분리되어 있어야 시도할
수 있습니다.
• 만약 문제가 발생했다면, 프로덕션 레벨의 읽기에서 장애가 발생할 수 있습니다.
• 테스트를 위해 애플리케이션 재배포가 필요합니다.
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Demo
37
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
설문조사
38
더 나은 세션을 위해 설문조사에 참석해주시면 감사하겠습니다 J
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Thank you!
박진현
Solutions Architect
AWS
송정우 이덕현
Solutions Architect
AWS
Database Specialist SA
AWS
39

More Related Content

PDF
관계형 데이터베이스의 새로운 패러다임 Amazon Aurora :: 김상필 :: AWS Summit Seoul 2016
PDF
Amazon Aurora 100% 활용하기
PDF
AWS 9월 웨비나 | Amazon Aurora Deep Dive
PDF
AWS CLOUD 2017 - Amazon Aurora를 통한 고성능 데이터베이스 운용하기 (박선용 솔루션즈 아키텍트)
PDF
Amazon Aurora Deep Dive (김기완) - AWS DB Day
PDF
Amazon Aurora 성능 향상 및 마이그레이션 모범 사례 - AWS Summit Seoul 2017
PDF
[Games on AWS 2019] AWS 사용자를 위한 만랩 달성 트랙 | Aurora로 게임 데이터베이스 레벨 업! - 김병수 AWS ...
PDF
빠르고 안전하게 간편한 AWS로 데이터 마이그레이션 하기::최유정 (AWS 솔루션즈아키텍트)
관계형 데이터베이스의 새로운 패러다임 Amazon Aurora :: 김상필 :: AWS Summit Seoul 2016
Amazon Aurora 100% 활용하기
AWS 9월 웨비나 | Amazon Aurora Deep Dive
AWS CLOUD 2017 - Amazon Aurora를 통한 고성능 데이터베이스 운용하기 (박선용 솔루션즈 아키텍트)
Amazon Aurora Deep Dive (김기완) - AWS DB Day
Amazon Aurora 성능 향상 및 마이그레이션 모범 사례 - AWS Summit Seoul 2017
[Games on AWS 2019] AWS 사용자를 위한 만랩 달성 트랙 | Aurora로 게임 데이터베이스 레벨 업! - 김병수 AWS ...
빠르고 안전하게 간편한 AWS로 데이터 마이그레이션 하기::최유정 (AWS 솔루션즈아키텍트)

Similar to [D3T2S01] Amazon Aurora MySQL 메이저 버전 업그레이드 및 Amazon B/G Deployments 실습 (20)

PDF
Aurora MySQL Backtrack을 이용한 빠른 복구 방법 - 진교선 :: AWS Database Modernization Day 온라인
PDF
2017 AWS DB Day | Amazon Aurora 자세히 살펴보기
PDF
[Games on AWS 2019] AWS 입문자를 위한 초단기 레벨업 트랙 | AWS 레벨업 하기! : 데이터베이스 - 박주연 AWS 솔...
PDF
워크로드에 맞는 데이터베이스 찾기 - 박주연 솔루션즈 아키텍트, AWS :: AWS Summit Seoul 2019
PDF
AWS Aurora 100% 활용하기
PDF
Cloud Native Aurora Serverless를 통한 Data Lake 구축 - 최유정 솔루션즈 아키텍트, AWS
PDF
AWS 환경에서 MySQL BMT
PPTX
강의 4. 데이터베이스:: AWSome Day Online Conference
PDF
[AWS Builders] 우리 워크로드에 맞는 데이터베이스 찾기
PDF
2017 Ad-Tech on AWS 세미나ㅣAWS에서의 빅데이터와 분석
PDF
AWS CLOUD 2018- Amazon Aurora  신규 서비스 알아보기 (최유정 솔루션즈 아키텍트)
PDF
LG전자 - Amazon Aurora 및 RDS 블루/그린 배포를 이용한 데이터베이스 업그레이드 안정성 확보 - 발표자: 이은경 책임, L...
PDF
클라우드 기반 AWS 데이터베이스 선택 옵션 - AWS Summit Seoul 2017
PDF
데이터베이스 운영, 서버리스로 걱정 끝! - 윤석찬, AWS 테크에반젤리스트 - AWS Builders Online Series
PDF
Amazon RDS 서비스 활용하기 - 신규 기능 중심으로 (윤석찬) :: AWS 월간 웨비나
PDF
Amazon RDS 살펴보기 (김용우) - AWS 웨비나 시리즈
PDF
성공적인 디지털 혁신을 위한 AWS 데이터베이스 서비스 선택:: 구태훈::AWS Summit Seoul 2018
PDF
Amazon Aurora 신규 서비스 알아보기::최유정::AWS Summit Seoul 2018
PPTX
AWS RDS, DYNAMO
PDF
클라우드 시작하기 - 장기웅, AWS 테크니컬 트레이너 :: AWSome Day 온라인 컨퍼런스
Aurora MySQL Backtrack을 이용한 빠른 복구 방법 - 진교선 :: AWS Database Modernization Day 온라인
2017 AWS DB Day | Amazon Aurora 자세히 살펴보기
[Games on AWS 2019] AWS 입문자를 위한 초단기 레벨업 트랙 | AWS 레벨업 하기! : 데이터베이스 - 박주연 AWS 솔...
워크로드에 맞는 데이터베이스 찾기 - 박주연 솔루션즈 아키텍트, AWS :: AWS Summit Seoul 2019
AWS Aurora 100% 활용하기
Cloud Native Aurora Serverless를 통한 Data Lake 구축 - 최유정 솔루션즈 아키텍트, AWS
AWS 환경에서 MySQL BMT
강의 4. 데이터베이스:: AWSome Day Online Conference
[AWS Builders] 우리 워크로드에 맞는 데이터베이스 찾기
2017 Ad-Tech on AWS 세미나ㅣAWS에서의 빅데이터와 분석
AWS CLOUD 2018- Amazon Aurora  신규 서비스 알아보기 (최유정 솔루션즈 아키텍트)
LG전자 - Amazon Aurora 및 RDS 블루/그린 배포를 이용한 데이터베이스 업그레이드 안정성 확보 - 발표자: 이은경 책임, L...
클라우드 기반 AWS 데이터베이스 선택 옵션 - AWS Summit Seoul 2017
데이터베이스 운영, 서버리스로 걱정 끝! - 윤석찬, AWS 테크에반젤리스트 - AWS Builders Online Series
Amazon RDS 서비스 활용하기 - 신규 기능 중심으로 (윤석찬) :: AWS 월간 웨비나
Amazon RDS 살펴보기 (김용우) - AWS 웨비나 시리즈
성공적인 디지털 혁신을 위한 AWS 데이터베이스 서비스 선택:: 구태훈::AWS Summit Seoul 2018
Amazon Aurora 신규 서비스 알아보기::최유정::AWS Summit Seoul 2018
AWS RDS, DYNAMO
클라우드 시작하기 - 장기웅, AWS 테크니컬 트레이너 :: AWSome Day 온라인 컨퍼런스
Ad

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
[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,...
PDF
Amazon Redshift Deep Dive - Serverless, Streaming, ML, Auto Copy (New feature...
[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
[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,...
Amazon Redshift Deep Dive - Serverless, Streaming, ML, Auto Copy (New feature...
Ad

Recently uploaded (9)

PDF
제 22회 보아즈(BOAZ) 빅데이터 컨퍼런스 - [토이스토리] : Wispy
PDF
제 22회 보아즈(BOAZ) 빅데이터 컨퍼런스 - [땡큐쏘아마취] : 소마챗 : Agentic RAG 기반 소아마취 업무지원 챗봇
PDF
제 22회 보아즈(BOAZ) 빅데이터 컨퍼런스 - [아라보아즈] : 아라보아의 장기적 성장을 위한 DDDM 환경 구축
PDF
제 22회 보아즈(BOAZ) 빅데이터 컨퍼런스 - [중증외상센터] : 24시간 심전도 Holter 데이터 기반의 소아 PSVT 예측 모델 개발
PDF
제 22회 보아즈(BOAZ) 빅데이터 컨퍼런스 - [직행복] : 실시간 로그 처리 기반 추천시스템
PDF
제 22회 보아즈(BOAZ) 빅데이터 컨퍼런스 - [청진스] : Multi-Label Lung Sound Classification ba...
PDF
제 22회 보아즈(BOAZ) 빅데이터 컨퍼런스 - [영웅호걸] : Context-Aware Real-time Sentiment based ...
PDF
제 22회 보아즈(BOAZ) 빅데이터 컨퍼런스 - [SNOMED] : LangGraph 기반 OMOP CDM 매핑 파이프라인 구축
PDF
제 22회 보아즈(BOAZ) 빅데이터 컨퍼런스 - [소크라데이터스] : 웨어러블 기기를 활용한 생체 신호 기반 감정 데이터 수집 및 감정 ...
제 22회 보아즈(BOAZ) 빅데이터 컨퍼런스 - [토이스토리] : Wispy
제 22회 보아즈(BOAZ) 빅데이터 컨퍼런스 - [땡큐쏘아마취] : 소마챗 : Agentic RAG 기반 소아마취 업무지원 챗봇
제 22회 보아즈(BOAZ) 빅데이터 컨퍼런스 - [아라보아즈] : 아라보아의 장기적 성장을 위한 DDDM 환경 구축
제 22회 보아즈(BOAZ) 빅데이터 컨퍼런스 - [중증외상센터] : 24시간 심전도 Holter 데이터 기반의 소아 PSVT 예측 모델 개발
제 22회 보아즈(BOAZ) 빅데이터 컨퍼런스 - [직행복] : 실시간 로그 처리 기반 추천시스템
제 22회 보아즈(BOAZ) 빅데이터 컨퍼런스 - [청진스] : Multi-Label Lung Sound Classification ba...
제 22회 보아즈(BOAZ) 빅데이터 컨퍼런스 - [영웅호걸] : Context-Aware Real-time Sentiment based ...
제 22회 보아즈(BOAZ) 빅데이터 컨퍼런스 - [SNOMED] : LangGraph 기반 OMOP CDM 매핑 파이프라인 구축
제 22회 보아즈(BOAZ) 빅데이터 컨퍼런스 - [소크라데이터스] : 웨어러블 기기를 활용한 생체 신호 기반 감정 데이터 수집 및 감정 ...

[D3T2S01] Amazon Aurora MySQL 메이저 버전 업그레이드 및 Amazon B/G Deployments 실습

  • 1. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Aurora Blue Green Deployment A W S D A T A & A I R O A D S H O W 2 0 2 4 박진현 Solutions Architect AWS 송정우 Solutions Architect AWS 이덕현 Database Specialist SA AWS
  • 2. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 Agenda 시작시간 종료시간 내용 9:00 9:30 Hands on Lab 환경 구성 9:30 10:00 Aurora MySQL 3 Upgrade 시 주의할 내용 10:00 11:30 Aurora Blue/Green Deployment 실습 11:30 12:00 Aurora 와 R53 을 이용한 사전 테스트 방법
  • 3. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. Aurora Blue Green Deployment Hands on Lab 환경 구성 3 박진현 Solutions Architect AWS
  • 4. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. Hands on Lab 링크 4 https://bit.ly/3xzP8Tc
  • 5. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. 워크샵 시작 준비 5 Email one-time password (OTP) 선택한 뒤 개인 email로 인증 à 해당 계정으로 72시간 사용 가능
  • 6. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. 워크샵 시작 준비 6
  • 7. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. 워크샵 시작 준비 7 Blue/Green 실습을 진행하기 위해 새로운 Blue/Green 환경 구성 필요 à 10분 이상 소요되는 작업으로 미리 해당 작업 진행
  • 8. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. Aurora MySQL 3 upgrade 주의사항 (temptable , collation) 8 이덕현 Database Specialist SA AWS
  • 9. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. Aurora Temp table 인스턴스 Memory 의 ¾ 는 InnoDB Buffer 로 사용 , 나머지 ¼ 영역에서 temp 가 같이 사용 됩니다. -> 너무 큰 숫자로 설정할 경우 OOM 에 의한 Aurora 장애로 연결 될 수 있습니다. Buffer pool Reads OS Heap
  • 10. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. temptable_max_ram, temptable_max_mmap 10 MySQL 8.0, 내부 임시 테이블에 TempTable 엔진 사용 가능 • 기존 Memory 엔진은 가변 길이 타입 컬럼을 지원하지 않음 • varchar 및 varbinary 컬럼 별 최대 길이 만큼 메모리를 할당하여 비효율적인 면이 있음 • Internal_tmp_mem_storage_engine=TempTable 설정 시 • 내부 임시 테이블을 temptable_max_ram 크기만큼 메모리에서 사용 가능 • temptable_max_mmap 크기만큼 Aurora Local Storage에 메모리 매핑(MMAP) 형식의 디스크 파일 쓰기 가능 • 메모리 상 TempTable 형식의 데이터를 그대로 MMAP 파일로 전환하는 것이 오버헤드가 더 적음 • MMAP 파일 공간 한도 도달 시 Aurora Cluster(Data) Storage에 InnoDB 형식의 디스크 파일 사용 ”내부 임시 테이블 사용 쿼리” Memory {temptable_max_ram} Local Storage {temptable_max_mma p} Cluster Storage
  • 11. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. temptable_max_ram, temptable_max_mmap Aurora MySQL의 temptable_max_ram, temptable_max_mmap 기본값 temptable_max_mmap, temptable_max_ram 모두 기본 1GiB로 설정됨 메모리가 16GiB 미만인 인스턴스(T타입)에서는 temptable_max_ram 가 기본 16 MiB로 설정됨 내부 임시 테이블 사용 쿼리 실행 중, temptable_max_mmap 크기의 한계에 다다르면 에러 발생 Writer 에서는 temptable_max_mmap 크기 초과 시 Aurora Storage에 InnoDB 형식의 테이블 쓰기 가능 → 더 큰 임시 테이블 공간 사용 가능 Reader 에서는 Aurora Storage 쓰기가 불가능하여 temptable_max_mmap 크기 초과 시 위 에러 발생 11 ERROR 1114 : The table '/rdsdbdata/tmp/#sqlfd_1586_2' is full
  • 12. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 temptable_max_mmap , temptable_max_ram {DBInstanceClassMemory*1/16} -- 24xlarge --768GB show variables like '%temp%' -> ; +-----------------------------------------------+-----------------------+ | Variable_name | Value | +-----------------------------------------------+-----------------------+ | avoid_temporal_upgrade | OFF | | innodb_cleanup_temp_tablespaces_in_background | ON | | innodb_temp_data_file_path | ibtmp1:12M:autoextend | | innodb_temp_tablespaces_dir | ./ | | show_old_temporals | OFF | | temptable_max_mmap | 49846937856 | | temptable_max_ram | 49846937856 | | temptable_use_mmap | ON | +-----------------------------------------------+-----------------------+
  • 13. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 4xlarge - 256GB MySQL [sysbench]> show variables like '%temp%'; +-----------------------------------------------+-----------------------+ | Variable_name | Value | +-----------------------------------------------+-----------------------+ | avoid_temporal_upgrade | OFF | | innodb_cleanup_temp_tablespaces_in_background | ON | | innodb_temp_data_file_path | ibtmp1:12M:autoextend | | innodb_temp_tablespaces_dir | ./ | | show_old_temporals | OFF | | temptable_max_mmap | 16407041280 | | temptable_max_ram | 16407041280 | | temptable_use_mmap | ON | +-----------------------------------------------+-----------------------+
  • 14. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. 14 Aurora Character Set & Collection Aurora MySQL 2.11.4 Aurora MySQL 3.04.2
  • 15. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. 15 Aurora Character Set & Collection Aurora MySQL 2.11.4 Aurora MySQL 3.04.2
  • 16. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. 16 Aurora Character Set & Collection Aurora MySQL 2.11.4 Aurora MySQL 3.04.2
  • 17. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. 17 Aurora Character Set & Collection Aurora MySQL 2.11.4 Aurora MySQL 3.04.2
  • 18. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. Aurora Blue Green Deployment Hands on Lab 18 박진현 Solutions Architect AWS
  • 19. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. RDS Blue/Green 배포 – 시작점 Users / Applications DB endpoint AWS Cloud Amazon RDS
  • 20. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. RDS Blue/Green 배포 – 시작점 Users / Applications DB endpoint Blue Primary Current Production AWS Cloud Amazon RDS Blue Replicas
  • 21. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. RDS Blue/Green 배포 – 임시 상태 Users / Applications DB endpoint Logical replication to sync from ‘blue’ to ‘green’ Blue Primary Green Primary Future Production Current Production AWS Cloud Amazon RDS Blue Replicas Green Replicas • 현재 프로덕션 환경(파란색)의 미러링된 복사본을 그린 환경(향후 프로덕션)으로 생성합니다. • 파란색 기본과 녹색 기본 간의 논리적 복제 설정 • 전환 전 그린 환경에서 그린 수정, 복제본 추가/제거, 변경 사항 테스트
  • 22. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. RDS Blue/Green 배포 – 종료 상태 Users / Applications DB endpoint Green Primary Final Production AWS Cloud Green Replicas
  • 23. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Aurora Blue/Green 배포 Region Availability Zone 3 Availability Zone 1 Availability Zone 2 Aurora storage RW Users / Applications db cluster endpoint RO Source mycluster Aurora MySQL 2.10.2 (5.7) Aurora storage RO RW RO Target mycluster-green-x1234 Aurora MySQL 2.10.2 (5.7) create-blue-green-deployment RO RO RO RO switchover-blue-green-deployment delete-blue-green-deployment AVAILABLE SWITCHOVER_IN_PROGRESS SWITCHOVER_COMPLETED Source mycluster-old1 Aurora MySQL 2.10.2 (5.7) customer verification
  • 24. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. Hands on Lab 링크 24 https://bit.ly/3xzP8Tc
  • 25. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. Aurora와 R53을 이용한 사전 테스트 방법 25 송정우 Solutions Architect AWS
  • 26. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. Contents 26 ü 사전 확인 ü 아키텍처 ü Demo
  • 27. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. 사전 확인 • 만약 Secrets Manager를 사용하여 DB에 접근하고 있다면, Blue/Green Deployment를 적용할 수 없습니다. • Blue/Green Deployment를 이용하기 위해서는 binlog를 활성화시켜야 합니다. 이외의 부분들은 아래의 문서를 확인하시길 바랍니다. https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/blue-green-deployments-overview.html#blue-green-deployments-limitations
  • 28. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. 1st 아키텍처 28 블루 서비스 타겟 그룹 ALB 태스크 … 그린 서비스 타겟 그룹 ALB 태스크 … xxx.xxx.com Blue에서 Green으로 동기화 하는 논리적 복제 블루 프라이머리 그린 프라이머리 Amazon Route 53 🌟 Read-only Traffic!
  • 29. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. 29 블루 서비스 타겟 그룹 ALB 태스크 … 그린 서비스 타겟 그룹 ALB 태스크 … xxx.xxx.com Blue에서 Green으로 동기화 하는 논리적 복제 블루 프라이머리 그린 프라이머리 Amazon Route 53 100 0 Route53의 Traffic Policy를 활용
  • 30. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. 30 블루 서비스 타겟 그룹 ALB 태스크 … 그린 서비스 타겟 그룹 ALB 태스크 … xxx.xxx.com Blue에서 Green으로 동기화 하는 논리적 복제 블루 프라이머리 그린 프라이머리 Amazon Route 53 90 10
  • 31. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. 31 블루 서비스 타겟 그룹 ALB 태스크 … 그린 서비스 타겟 그룹 ALB 태스크 … xxx.xxx.com Blue에서 Green으로 동기화 하는 논리적 복제 블루 프라이머리 그린 프라이머리 Amazon Route 53 50 50
  • 32. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. 32 블루 서비스 타겟 그룹 ALB 태스크 … 그린 서비스 타겟 그룹 ALB 태스크 … xxx.xxx.com Blue에서 Green으로 동기화 하는 논리적 복제 블루 프라이머리 그린 프라이머리 Amazon Route 53 10 90
  • 33. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. 33 블루 서비스 타겟 그룹 ALB 태스크 … 그린 서비스 타겟 그룹 ALB 태스크 … xxx.xxx.com Blue에서 Green으로 동기화 하는 논리적 복제 블루 프라이머리 그린 프라이머리 Amazon Route 53 0 100
  • 34. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. 1st 아키텍처 주의 사항 • Read-Only 트래픽이 아니라면, 쓰기 트래픽이 나누어져 흘러 들어가기 때문에 큰 문제를 발생시킬 수 있습니다. • DB 뿐만 아니라 Application Layer에 해당 하는 세트를 한 벌 더 띄우기 때문에 비용적인 부분을 고려할 필요가 있습니다. • Route 53의 Traffic Policy로 인한 추가 비용이 발생할 수 있습니다. 즉, 위의 조건들에 의해 첫 번째 아키텍처는 다음의 상황에서 적절합니다. • 테스트를 위한 부하 발생 도구들을 활용하고 있을 때 • 테스트 트래픽을 흘려 보내 보고 싶을 때 • 완벽하게 동일한 환경에서 테스트/확인해보고 싶을 때
  • 35. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. 2nd Architecture 35 서비스 타겟 그룹 ALB 태스크 … Blue에서 Green으로 동기화 하는 논리적 복제 Blue Primary Green Primary 쓰기 엔드포인트 연결 읽기 엔드포인트 연결
  • 36. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. 2nd 아키텍처 주의 사항 즉, 위의 조건들에 의해 두 번째 아키텍처는 다음의 상황에서 적절합니다. • 사전에 이미 테스트가 진행됐을 때 • 프로덕션 레벨에서 실제 트래픽을 활용한 테스트가 필요할 때 • 애플리케이션 내 CQRS 패턴 적용 혹은 읽기/쓰기 엔드포인트가 사전에 분리되어 있어야 시도할 수 있습니다. • 만약 문제가 발생했다면, 프로덕션 레벨의 읽기에서 장애가 발생할 수 있습니다. • 테스트를 위해 애플리케이션 재배포가 필요합니다.
  • 37. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. Demo 37
  • 38. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. 설문조사 38 더 나은 세션을 위해 설문조사에 참석해주시면 감사하겠습니다 J
  • 39. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. Thank you! 박진현 Solutions Architect AWS 송정우 이덕현 Solutions Architect AWS Database Specialist SA AWS 39