KEMBAR78
[D3T2S01] Amazon Aurora MySQL 메이저 버전 업그레이드 및 Amazon B/G Deployments 실습 | PDF
© 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

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

  • 1.
    © 2024, AmazonWeb 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, AmazonWeb 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, AmazonWeb Services, Inc. or its affiliates. All rights reserved. Aurora Blue Green Deployment Hands on Lab 환경 구성 3 박진현 Solutions Architect AWS
  • 4.
    © 2024, AmazonWeb Services, Inc. or its affiliates. All rights reserved. Hands on Lab 링크 4 https://bit.ly/3xzP8Tc
  • 5.
    © 2024, AmazonWeb Services, Inc. or its affiliates. All rights reserved. 워크샵 시작 준비 5 Email one-time password (OTP) 선택한 뒤 개인 email로 인증 à 해당 계정으로 72시간 사용 가능
  • 6.
    © 2024, AmazonWeb Services, Inc. or its affiliates. All rights reserved. 워크샵 시작 준비 6
  • 7.
    © 2024, AmazonWeb Services, Inc. or its affiliates. All rights reserved. 워크샵 시작 준비 7 Blue/Green 실습을 진행하기 위해 새로운 Blue/Green 환경 구성 필요 à 10분 이상 소요되는 작업으로 미리 해당 작업 진행
  • 8.
    © 2024, AmazonWeb Services, Inc. or its affiliates. All rights reserved. Aurora MySQL 3 upgrade 주의사항 (temptable , collation) 8 이덕현 Database Specialist SA AWS
  • 9.
    © 2024, AmazonWeb Services, Inc. or its affiliates. All rights reserved. Aurora Temp table 인스턴스 Memory 의 ¾ 는 InnoDB Buffer 로 사용 , 나머지 ¼ 영역에서 temp 가 같이 사용 됩니다. -> 너무 큰 숫자로 설정할 경우 OOM 에 의한 Aurora 장애로 연결 될 수 있습니다. Buffer pool Reads OS Heap
  • 10.
    © 2024, AmazonWeb 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, AmazonWeb 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, AmazonWeb 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, AmazonWeb 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, AmazonWeb 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, AmazonWeb 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, AmazonWeb 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, AmazonWeb 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, AmazonWeb Services, Inc. or its affiliates. All rights reserved. Aurora Blue Green Deployment Hands on Lab 18 박진현 Solutions Architect AWS
  • 19.
    © 2024, AmazonWeb Services, Inc. or its affiliates. All rights reserved. RDS Blue/Green 배포 – 시작점 Users / Applications DB endpoint AWS Cloud Amazon RDS
  • 20.
    © 2024, AmazonWeb 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, AmazonWeb 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, AmazonWeb 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, AmazonWeb 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, AmazonWeb Services, Inc. or its affiliates. All rights reserved. Hands on Lab 링크 24 https://bit.ly/3xzP8Tc
  • 25.
    © 2024, AmazonWeb Services, Inc. or its affiliates. All rights reserved. Aurora와 R53을 이용한 사전 테스트 방법 25 송정우 Solutions Architect AWS
  • 26.
    © 2024, AmazonWeb Services, Inc. or its affiliates. All rights reserved. Contents 26 ü 사전 확인 ü 아키텍처 ü Demo
  • 27.
    © 2024, AmazonWeb 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, AmazonWeb 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, AmazonWeb 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, AmazonWeb Services, Inc. or its affiliates. All rights reserved. 30 블루 서비스 타겟 그룹 ALB 태스크 … 그린 서비스 타겟 그룹 ALB 태스크 … xxx.xxx.com Blue에서 Green으로 동기화 하는 논리적 복제 블루 프라이머리 그린 프라이머리 Amazon Route 53 90 10
  • 31.
    © 2024, AmazonWeb Services, Inc. or its affiliates. All rights reserved. 31 블루 서비스 타겟 그룹 ALB 태스크 … 그린 서비스 타겟 그룹 ALB 태스크 … xxx.xxx.com Blue에서 Green으로 동기화 하는 논리적 복제 블루 프라이머리 그린 프라이머리 Amazon Route 53 50 50
  • 32.
    © 2024, AmazonWeb Services, Inc. or its affiliates. All rights reserved. 32 블루 서비스 타겟 그룹 ALB 태스크 … 그린 서비스 타겟 그룹 ALB 태스크 … xxx.xxx.com Blue에서 Green으로 동기화 하는 논리적 복제 블루 프라이머리 그린 프라이머리 Amazon Route 53 10 90
  • 33.
    © 2024, AmazonWeb Services, Inc. or its affiliates. All rights reserved. 33 블루 서비스 타겟 그룹 ALB 태스크 … 그린 서비스 타겟 그룹 ALB 태스크 … xxx.xxx.com Blue에서 Green으로 동기화 하는 논리적 복제 블루 프라이머리 그린 프라이머리 Amazon Route 53 0 100
  • 34.
    © 2024, AmazonWeb Services, Inc. or its affiliates. All rights reserved. 1st 아키텍처 주의 사항 • Read-Only 트래픽이 아니라면, 쓰기 트래픽이 나누어져 흘러 들어가기 때문에 큰 문제를 발생시킬 수 있습니다. • DB 뿐만 아니라 Application Layer에 해당 하는 세트를 한 벌 더 띄우기 때문에 비용적인 부분을 고려할 필요가 있습니다. • Route 53의 Traffic Policy로 인한 추가 비용이 발생할 수 있습니다. 즉, 위의 조건들에 의해 첫 번째 아키텍처는 다음의 상황에서 적절합니다. • 테스트를 위한 부하 발생 도구들을 활용하고 있을 때 • 테스트 트래픽을 흘려 보내 보고 싶을 때 • 완벽하게 동일한 환경에서 테스트/확인해보고 싶을 때
  • 35.
    © 2024, AmazonWeb Services, Inc. or its affiliates. All rights reserved. 2nd Architecture 35 서비스 타겟 그룹 ALB 태스크 … Blue에서 Green으로 동기화 하는 논리적 복제 Blue Primary Green Primary 쓰기 엔드포인트 연결 읽기 엔드포인트 연결
  • 36.
    © 2024, AmazonWeb Services, Inc. or its affiliates. All rights reserved. 2nd 아키텍처 주의 사항 즉, 위의 조건들에 의해 두 번째 아키텍처는 다음의 상황에서 적절합니다. • 사전에 이미 테스트가 진행됐을 때 • 프로덕션 레벨에서 실제 트래픽을 활용한 테스트가 필요할 때 • 애플리케이션 내 CQRS 패턴 적용 혹은 읽기/쓰기 엔드포인트가 사전에 분리되어 있어야 시도할 수 있습니다. • 만약 문제가 발생했다면, 프로덕션 레벨의 읽기에서 장애가 발생할 수 있습니다. • 테스트를 위해 애플리케이션 재배포가 필요합니다.
  • 37.
    © 2024, AmazonWeb Services, Inc. or its affiliates. All rights reserved. Demo 37
  • 38.
    © 2024, AmazonWeb Services, Inc. or its affiliates. All rights reserved. 설문조사 38 더 나은 세션을 위해 설문조사에 참석해주시면 감사하겠습니다 J
  • 39.
    © 2024, AmazonWeb Services, Inc. or its affiliates. All rights reserved. Thank you! 박진현 Solutions Architect AWS 송정우 이덕현 Solutions Architect AWS Database Specialist SA AWS 39