SlideShare a Scribd company logo
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
양 형 식
Solutions Architect
AWS
Aurora 혼합 구성 아키텍처를 사용하여
예상치 못한 트래픽 급증 대응하기
The Secret of the Amazon Aurora Cluster
A W S D A T A & A I R O A D S H O W 2 0 2 4
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
AWS DATA & AI ROADSHOW 2024
• Amazon Aurora 살펴보기
• Amazon Aurora Mixed-Configuration(혼합구성) Cluster
• Custom Aurora Auto Scaling 아키텍처 설계 및 구현
• 아키텍처 검증
• 추가 자료
2
Agenda
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
Amazon Aurora 살펴보기
3
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
AWS DATA & AI ROADSHOW 2024
4
Amazon Aurora의 Architecture
§ Database용으로 설계된 Log기반의
분산형 스토리지
§ Storage Volume은 3개의 AZ에 걸쳐
수백 개 이상의 Storage Node로
스트라이핑
§ 총 6개의 복제본(3개의 AZ에 AZ당
2개)을 저장하여 AZ+1 장애 상황에도
데이터베이스 복구 가능
§ 스토리지 공유 구조로 복제 작업 부하
감소
Primary Replica Replica
Transactions
Caching
SQL
Transactions
Caching
SQL
Transactions
Caching
Availability Zone - 1 Availability Zone - 2 Availability Zone - 3
SSD
Storage
Layer
Compute
Layer
Shared Storage Volume
Cluster
Endpoint
Reader
Endpoint
SQL
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
AWS DATA & AI ROADSHOW 2024
5
Amazon Aurora Serverless v2
아마존 오로라를 위한 자동 확장 구성으로, 이제 가장 요구가 높은
응용 프로그램과 데이터베이스 워크로드를 지원합니다.
멀티-AZ, 글로벌
데이터베이스를
포함한 오로라의 모든
기능을 제공합니다
Amazon
Aurora
수백 건에서 수십만
건의 트랜잭션까지 초
단위로 즉시
확장됩니다.
0
10
20
30
40
0
500
1000
1500 CAPACITY
WORKLOAD
RUNTIME
데이터베이스 용량을
정확히 맞추기 위해
미세 단위로 확장이
가능합니다.
0
50
1 3 5 7 9 11 13
Capacity
최대 부하를 고려한
프로비저닝 비용과
비교하여 최대 90%의
비용 절감 효과가
있습니다.
Aurora PostgreSQL v13 onwards
Aurora MySQL v 8.0
Supported major versions
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
AWS DATA & AI ROADSHOW 2024
6
Amazon Aurora Serverless v2
Warm pool of instances
Shared Distributed storage
Database Endpoint
Application
Scalable DB capacity
§ 유지관리를 위한 인스턴스가 없는
서버리스 엔진
§ ACU는 약 2GB 메모리, CPU,
네트워크의 조합
§ 최소 0.5 ACU에서 128 ACU까지
Scale up/down 자동화
§ 어플리케이션에 영향 주지 않음
§ 사용한 데이터베이스 용량만큼 초당
요금 지불
§ 자주 사용되지 않거나, 예측할 수
없거나, 주기적인 워크로드에 적합
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
AWS DATA & AI ROADSHOW 2024
7
Aurora Provisioned VS Aurora Serverless v2
Aurora Provisioned
• 수직 및 수평적인 확장이 가능
• 수동으로 용량을 조정
• 예측 가능한 트래픽
• RI 옵션 가능
Aurora Serverless v2
• 작은 규모의 애플리케이션에 적합
• 자동으로 최소/최대 용량 조정
• 예상치 못한 대규모 트래픽에 적합
• RI 옵션 제공 안함
구축 사례
• 범용적으로 사용
• 대규모의 데이터베이스 애플리케이션을
구축하는데 적합
구축 사례
• 쓰기 트랜잭션이 많은 경우
• 일시적 또는 간헐적인 트래픽이 예상되는
애플리케이션의 경우
• 인스턴스 관리 부담 절감
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
AWS DATA & AI ROADSHOW 2024
8
트래픽 유형 분석
Peak
Average
Peak
Average
Peak
Average
Aurora Provisioned Aurora Serverless v2
Aurora Provisioned
• 예측 가능한 트래픽
• 시즌, 주기가 일정한 트래픽
• 부하가 완만한 트래픽
• 불규칙적이나 최대
부하 예측 가능
• 비용 부담
Aurora Serverless v2
• 예측 불가능한 스파이크 트래픽
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
AWS DATA & AI ROADSHOW 2024
9
예상치 못한 트래픽에 따른 Aurora Auto Scaling의 한계
이벤트시 평소의 수배에서 수십배의 트래픽을 처리
Amazon Aurora
(Write/Read)
Application
Write Endpoint
Amazon Aurora
(ReadOnly)
Read Endpoint
Amazon ElastiCache
2. 최소 수 시간 전, 읽기 전용 인스턴스 증설
à 과도한 대응과 리소스 낭비
1. 예측 불가능한 순간적인 스파이크 트래픽 부하
à 평균 10분 인스턴스 준비 시간
Amazon Aurora
(ReadOnly)
Scale-out
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
Amazon Aurora Mixed-Configuration(혼합구성) Cluster
10
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
AWS DATA & AI ROADSHOW 2024
11
The First Secret of the Amazon Aurora Cluster
Primary Replica Replica
Transactions
Caching
SQL
Transactions
Caching
SQL
Transactions
Caching
Availability Zone - 1 Availability Zone - 2 Availability Zone - 3
SSD
Storage
Layer
Compute
Layer
Shared Storage Volume
Cluster
Endpoint
Reader
Endpoint
SQL
Serverless v2
Reader Endpoint
Replica
Provisioned instance Serverless v2 instance
Aurora Provisioned Cluster
Aurora Serverless v2
Aurora
Mixed-Configuration Cluster
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
AWS DATA & AI ROADSHOW 2024
12
Amazon Aurora Mixed-Configuration(혼합구성) Cluster
• 읽기 인스턴스의 Scale-out 진행 중, 또는 특정 기준 이상의 트래픽 발생시, serverless v2 읽기
전용 인스턴스에서 스파이크 트래픽 대응
Ø 예측 불가능한 스파이크 트래픽 대응 및 서비스 안정성 향상
Ø 이벤트 대응 비용 절감
Aurora Mixed-Configuration Cluster
Amazon Aurora
Provisioned
Amazon Aurora
Serverless v2
ACU (0.5 ~ 128)
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
AWS DATA & AI ROADSHOW 2024
13
Amazon Aurora 혼합 구성 클러스터를 제대로 활용하려면?
Amazon Aurora
(Write/Read)
Application
Write Endpoint
Amazon Aurora
(ReadOnly)
Read Endpoint
Amazon Aurora
Serverless v2
최소 0.5 ACU ~ 최대 128 ACU
Mixed-Configuration
기존 Read Endpoint로
연결시 트래픽이 발생하여
불필요한 비용 발생
Amazon Aurora
(Write/Read)
Application
Write Endpoint
Amazon Aurora
(ReadOnly)
Read Endpoint
Mixed-Configuration
Amazon Aurora
Serverless v2
최소 0.5 ACU ~ 최대 128 ACU
Custom
Read Endpoint
엔드포인트가 3개면
기준은?
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
AWS DATA & AI ROADSHOW 2024
14
The Second Secret of the Amazon Aurora Cluster
• Aurora 클러스터의 Auto Scaling 기준
• 클러스터에 속한 모든 복제본의 평균 CPU 사용률
Amazon Aurora
(Write/Read)
Application
Write Endpoint
Amazon Aurora
(ReadOnly)
Read Endpoint
Amazon Aurora
Serverless v2
최소 0.5 ACU ~ 최대 128 ACU
1. 평균 CPU 사용률
2. Scale-out 발생 안함
3. 느린 감지
• Cloudwatch RDS 메트릭 : 1분
• Alarm 1분 3회 감지시, Autoscaling 발생
Mixed-Configuration
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
Custom Aurora Auto Scaling 아키텍처 설계 및 구현
15
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
AWS DATA & AI ROADSHOW 2024
16
Custom Aurora Auto Scaling 아키텍처 구성 요소
Solutions
Amazon Route 53
Private Hosted zone
Weight Based Record
• Route53 가중치 기반 레코드
• Aurora 커스텀 엔드포인트
Amazon Aurora
Write/Read
Amazon Aurora
Read-Only
Amazon Aurora
Serverless
Amazon CloudWatch
Metrics
• Cloudwatch Metric 정보 수집
Enhanced Monitoring AWS Lambda
AWS Step Functions
Amazon EventBridge
schedule
• 자동화된 운영 아키텍처
AWS Auto Scaling
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
AWS DATA & AI ROADSHOW 2024
17
Custom Aurora Auto Scaling 아키텍처
CloudWatch
Custom Metrics
Amazon Aurora
Provisioned Cluster
CloudWatch
Metrics
Metric Refinement
Lambda
Provisioned instances Serverless v2 instances
Amazon Route 53
Private Hosted Zone
Weight based Record
Enhanced
Monitoring
Custom Metrics
Custom
Metrics Alarm Subscription Filter
AWS Step Functions
Adjusting Weights
1
2
3
AWS Auto Scaling
4
Custom Endpoint
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
AWS DATA & AI ROADSHOW 2024
Aurora Serverless v2 읽기 전용 인스턴스 추가
Amazon Aurora
Provisioned Cluster
Provisioned instances
(Reader)
Serverless v2 instances
(Reader)
Custom
Endpoint
Amazon Route 53
Private Hosted zone
Weight based Record
Custom
Endpoint
Normal Traffic Spike Traffic
Max 15 Instances
Read Transactions
• Serverless v2 커스텀 엔드포인트
• 평상시 트래픽을 처리
• 커스텀 엔드포인트 추가 구성 설정
• 임계치를 넘어가는 부하 트래픽을 처리
• 우선순위 15
• Provisioned 커스텀 엔드포인트
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
AWS DATA & AI ROADSHOW 2024
Rout53 가중치 기반 레코드 설정
동일 서브 도메인 :
test-rds (예시)
가중치 초기값 (비율)
• Provisioned 가중치 : 10
• Serverless v2 가중치 : 0
커스텀 엔드포인트 (CNAME)
• Provisioned 커스텀 엔드포인트
• Serverless v2 커스텀 엔드포인트
• Route53 Private Hosted Zone Name : rds.com (예시)
rds.com
rds.com
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
AWS DATA & AI ROADSHOW 2024
• Enhanced Metric 수집 아키텍처
Enhanced Metric 지표 수집 및 커스텀 메트릭 생성
Amazon Aurora CloudWatch
Metrics
Enhanced Monitoring
Metric Refinement
Lambda
(Embedded Metric Format)
Subscription Filter
(RDSOSMetrics)
Custom Metrics
1
2
3
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
AWS DATA & AI ROADSHOW 2024
• 고해상도 메트릭 수집
Enhanced Metric 지표 수집 및 커스텀 메트릭 생성
CloudWatch
Metrics
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
AWS DATA & AI ROADSHOW 2024
• Subscription Filter를 이용한 메트릭 정제
Enhanced Metric 지표 수집 및 커스텀 메트릭 생성
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
AWS DATA & AI ROADSHOW 2024
• EMF를 이용한 실시간 메트릭 반영
Enhanced Metric 지표 수집 및 커스텀 메트릭 생성
https://github.com/awslabs/aws-embedded-metrics-node
• Cloudwatch에 맞춰진 구조화된 로그 포맷
• 빠른 Cloudwatch 메트릭 반영
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
AWS DATA & AI ROADSHOW 2024
• Cloudwatch Alarm기반 트래픽 분산 아키텍처
Step Functions을 이용한 트래픽 분산
CloudWatch
Custom Metrics
Amazon EventBridge AWS Step Functions Amazon Route 53
Alarm Trigger Adjusting Weights
1 2
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
AWS DATA & AI ROADSHOW 2024
• 프로비저닝 읽기 전용 인스턴스 부하 알람
Step Functions을 이용한 트래픽 분산
High Provisioned CPU Alarm Low Provisioned CPU Alarm
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
AWS DATA & AI ROADSHOW 2024
• Cloudwatch Alarm 설정
Step Functions을 이용한 트래픽 분산
1. 프로비저닝 읽기 전용 인스턴스 Scale-out
• AWS Auto Scaling 서비스
• 자동 Scale-out / Scale-in
2. Route53 레코드 가중치 조절
à Serverless v2 인스턴스에 트래픽 분산
3. Route53 레코드 가중치 조절
à 인스턴스 증설 완료 후 CPU가 줄어들면
Serverless v2 인스턴스 트래픽 회수
0
10
20
30
40
50
60
70
80
90
CPU
1
2
3
1
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
AWS DATA & AI ROADSHOW 2024
• 트래픽 비율 조절 Step Function 구성
Step Functions을 이용한 트래픽 분산
1. Serverless v2 읽기 전용 인스턴스 레코드 가중치 조절
• 가중치가 최소/최대치 도달 시 Step Function 종료
2. 변경된 가중치가 메트릭에 반영되기까지의 시간 대기
• Cloudwatch Alarm의 데이터 포인트 주기 이상 대기
3. Cloudwatch Alarm이 해결되었는지 확인
4. Alarm 상태에 따른 분기
1. 해결된 경우, Step Functions을 종료
2. 해결되지 않은 경우, 위 과정을 반복
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
AWS DATA & AI ROADSHOW 2024
• AWS AutoScaling 서비스를 활용
커스텀 메트릭을 이용한 Aurora 오토스케일링
CloudWatch
Custom Metrics
AWS Auto Scaling Amazon Aurora
Alarm
1. 오토스케일링에 사용할 대상을 등록
3. 읽기 인스턴스 증/감설 정책 설정
2. 오토스케일링 기준 지표로 사용할 메트릭 설정
AWS CLI로 적용 가능
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
AWS DATA & AI ROADSHOW 2024
• AWS AutoScaling 서비스 적용
커스텀 메트릭을 이용한 Aurora 오토스케일링
1. 오토스케일링에 사용할 대상을 등록
3. 읽기 인스턴스 스케일링 정책 설정
2. 오토스케일링 기준 지표로 사용할 메트릭 설정
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
아키텍처 검증
30
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
AWS DATA & AI ROADSHOW 2024
• 테스트 시나리오
커스텀 Aurora 오토스케일링 아키텍처 검증
시간  가중치 Provisioned Serverless v2 비고
init 10 0
1 10 0 Scale-out 발생
2 10 5
2 10 10
2 10 10
트래픽 분산에 따른 시스템
안정화
3 10 10 읽기 인스턴스 증설 완료
3 10 5 Serverless 트래픽 회수
3 10 0
0
10
20
30
40
50
60
70
80
90
CPU
1
2
3
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
AWS DATA & AI ROADSHOW 2024
커스텀 Aurora 오토스케일링 아키텍처 검증
• AS-IS
• To-Be
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
AWS DATA & AI ROADSHOW 2024
• 테스트 결과 요약
커스텀 Aurora 오토스케일링 아키텍처 검증
구분 기존 클러스터 혼합 구성 클러스터
서비스 장애 시간 평균 10분 내외 -
장애구간 서비스 응답 속도 평균 220ms 평균 80ms
서비스 비용 수 만원 추가 발생 (Cloudwatch, Lambda 등)
이벤트 대응 비용 (비율) 100% 70% (약 30% 절감)
오토스케일링 정밀도 최대 1분 최대 10초
시스템
성능
서비스
안정성
비용절감
대응시간
단축
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
추가 자료
34
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
AWS DATA & AI ROADSHOW 2024
• https://aws.amazon.com/solutions/guidance/handling-data-during-traffic-spikes-on-aws/?did=sl_card&trk=sl_card
35
Guidance for Handling Data during Traffic Spikes on AWS
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
AWS DATA & AI ROADSHOW 2024
• https://github.com/aws-solutions-library-samples/guidance-for-handling-data-during-traffic-spikes-on-aws
36
Guidance for Handling Data during Traffic Spikes on AWS
§ Cloudformation
Deployment
§ 맞춤형 자동 확장
솔루션
§ 비용 효율적 솔루션
§ $150/month
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
Wrap Up
37
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
AWS DATA & AI ROADSHOW 2024
38
Amazon Aurora Cluster 비밀 노트
1. Aurora Provisioned + Aurora Serverless v2 = Aurora 혼합 구성 Cluster 구성 가능
2. Aurora Auto Scaling 기능은 감지시간(1분/3회)과 인스턴스 확장 시간(최대 6분), 약 10분 소요
3. Aurora Auto Scaling 기능은 클러스터에 연결된 모든 읽기 인스턴스의 평균값을 기준으로 동작
4. Aurora에 Custom Auto Scaling을 설정하려면 AWS CLI로만 조작 가능
5. Aurora Enhanced monitoring 기능은 최소 1초 단위 메트릭 수집 가능
6. Aurora 혼합구성 클러스터 기반 Custom Auto Scaling 솔루션 제대로 활용하기
1. 맞춤형 자동 확장 솔루션으로 트래픽 부하를 실시간으로 동적 관리하고 비용을 최소화하면서 서비스 복원력 보장
2. Aurora Serverless v2 인스턴스 고유 엔드포인트를 활용하여 평상시 대량의 분석 또는 배치 작업용으로 활용 가능
3. Auto Scailng 없이 특정 임계값을 넘어서는 트래픽만 처리하도록 가능
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Thank you!
양 형 식
hsikyang@amazon.com
Solutions Architect
AWS

More Related Content

PDF
Amazon EKS multi-cluster gitops-bridge
Carlos Santana
 
PDF
AWS Summit Seoul 2023 | 비즈니스 경계를 허무는 혁신: 단 하나의 선택, 슈퍼앱
Amazon Web Services Korea
 
PDF
S3 Select를 통한 빠른 데이터 분석하기 - 트랙2, Community Day 2018 re:Invent 특집
AWSKRUG - AWS한국사용자모임
 
PPSX
Big Data Redis Mongodb Dynamodb Sharding
Araf Karsh Hamid
 
PDF
Achieving Lakehouse Models with Spark 3.0
Databricks
 
PDF
Amazon OpenSearch - Use Cases, Security/Observability, Serverless and Enhance...
Amazon Web Services Korea
 
PDF
Developing event-driven microservices with event sourcing and CQRS (phillyete)
Chris Richardson
 
PDF
AWS Summit Seoul 2023 | Confluent와 함께하는 실시간 데이터와 클라우드 여정
Amazon Web Services Korea
 
Amazon EKS multi-cluster gitops-bridge
Carlos Santana
 
AWS Summit Seoul 2023 | 비즈니스 경계를 허무는 혁신: 단 하나의 선택, 슈퍼앱
Amazon Web Services Korea
 
S3 Select를 통한 빠른 데이터 분석하기 - 트랙2, Community Day 2018 re:Invent 특집
AWSKRUG - AWS한국사용자모임
 
Big Data Redis Mongodb Dynamodb Sharding
Araf Karsh Hamid
 
Achieving Lakehouse Models with Spark 3.0
Databricks
 
Amazon OpenSearch - Use Cases, Security/Observability, Serverless and Enhance...
Amazon Web Services Korea
 
Developing event-driven microservices with event sourcing and CQRS (phillyete)
Chris Richardson
 
AWS Summit Seoul 2023 | Confluent와 함께하는 실시간 데이터와 클라우드 여정
Amazon Web Services Korea
 

What's hot (8)

PDF
AWS IAM
Diego Pacheco
 
PDF
Cbs Google Cloud Platform fundamentals 1
Luis Merino Troncoso
 
PDF
AWS Summit Seoul 2023 | HL Mando가 AWS IoT Fleetwise로 그리는 미래 커넥티드 모빌리티 기술
Amazon Web Services Korea
 
PDF
Optimizing Spark-based data pipelines - are you up for it?
Itai Yaffe
 
ODP
InstalacionyConfiguracion_wpa2+radius+ldap
Maria Jesus Suarez
 
PDF
AWS Summit Seoul 2023 | MongoDB Atlas와 함께하는 Developer Data Platform
Amazon Web Services Korea
 
PDF
Stream Processing – Concepts and Frameworks
Guido Schmutz
 
PPTX
Introduction to azure cosmos db
Ratan Parai
 
AWS IAM
Diego Pacheco
 
Cbs Google Cloud Platform fundamentals 1
Luis Merino Troncoso
 
AWS Summit Seoul 2023 | HL Mando가 AWS IoT Fleetwise로 그리는 미래 커넥티드 모빌리티 기술
Amazon Web Services Korea
 
Optimizing Spark-based data pipelines - are you up for it?
Itai Yaffe
 
InstalacionyConfiguracion_wpa2+radius+ldap
Maria Jesus Suarez
 
AWS Summit Seoul 2023 | MongoDB Atlas와 함께하는 Developer Data Platform
Amazon Web Services Korea
 
Stream Processing – Concepts and Frameworks
Guido Schmutz
 
Introduction to azure cosmos db
Ratan Parai
 
Ad

Similar to [D3T1S05] Aurora 혼합 구성 아키텍처를 사용하여 예상치 못한 트래픽 급증 대응하기 (20)

PDF
Cloud Native Aurora Serverless를 통한 Data Lake 구축 - 최유정 솔루션즈 아키텍트, AWS
Amazon Web Services Korea
 
PDF
Aurora MySQL Backtrack을 이용한 빠른 복구 방법 - 진교선 :: AWS Database Modernization Day 온라인
Amazon Web Services Korea
 
PDF
천만 사용자를 위한 AWS 클라우드 아키텍처 진화하기::이창수::AWS Summit Seoul 2018
Amazon Web Services Korea
 
PDF
성공적인 디지털 혁신을 위한 AWS 데이터베이스 서비스 선택:: 구태훈::AWS Summit Seoul 2018
Amazon Web Services Korea
 
PDF
[AWSome Day온라인 컨퍼런스] 강의 3: 클라우드 구축하기 - 정도현, AWS 테크니컬 트레이너
Amazon Web Services Korea
 
PDF
AWS Aurora 100% 활용하기
I Goo Lee
 
PDF
비용 관점에서 AWS 클라우드 아키텍처 디자인하기::류한진::AWS Summit Seoul 2018
Amazon Web Services Korea
 
PDF
천만 사용자를 위한 AWS 클라우드 아키텍처 진화하기 - 김준형 솔루션즈 아키텍트, AWS :: AWS Summit Seoul 2019
Amazon Web Services Korea
 
PDF
클라우드에서 구축하기 - 정도현, AWS 테크니컬 트레이너 :: AWSome Day 온라인 컨퍼런스
Amazon Web Services Korea
 
PDF
서버리스 아키텍처 패턴 및 로그 처리를 위한 파이프라인 구축기 - 황윤상 솔루션즈 아키텍트, AWS / Matthew Han, SendBi...
Amazon Web Services Korea
 
PDF
[Keynote] 슬기로운 AWS 데이터베이스 선택하기 - 발표자: 강민석, Korea Database SA Manager, WWSO, A...
Amazon Web Services Korea
 
PDF
AWS CLOUD 2017 - AWS 신규 서비스를 통해 본 클라우드의 미래 (김봉환 솔루션즈 아키텍트)
Amazon Web Services Korea
 
PDF
AWS Finance Symposium_천만 고객을 위한 AWS 클라우드 아키텍쳐 확장하기
Amazon Web Services Korea
 
PDF
[D3T2S01] Amazon Aurora MySQL 메이저 버전 업그레이드 및 Amazon B/G Deployments 실습
Amazon Web Services Korea
 
PDF
천만사용자를 위한 AWS 클라우드 아키텍처 진화하기 – 문종민, AWS솔루션즈 아키텍트:: AWS Summit Online Korea 2020
Amazon Web Services Korea
 
PDF
AWS Aurora 운영사례 (by 배은미)
I Goo Lee.
 
PDF
[애플리케이션 현대화 및 개발] 파트너 세션 | 모던 인프라스트럭쳐 아키텍쳐 - 서호석 이사, 영우디지탈
Amazon Web Services Korea
 
PDF
천만 사용자를 위한 AWS 클라우드 아키텍쳐 진화하기- AWS Summit Seoul 2017
Amazon Web Services Korea
 
PDF
AWS 9월 웨비나 | Amazon Aurora Deep Dive
Amazon Web Services Korea
 
PDF
Amazon Aurora 100% 활용하기
Amazon Web Services Korea
 
Cloud Native Aurora Serverless를 통한 Data Lake 구축 - 최유정 솔루션즈 아키텍트, AWS
Amazon Web Services Korea
 
Aurora MySQL Backtrack을 이용한 빠른 복구 방법 - 진교선 :: AWS Database Modernization Day 온라인
Amazon Web Services Korea
 
천만 사용자를 위한 AWS 클라우드 아키텍처 진화하기::이창수::AWS Summit Seoul 2018
Amazon Web Services Korea
 
성공적인 디지털 혁신을 위한 AWS 데이터베이스 서비스 선택:: 구태훈::AWS Summit Seoul 2018
Amazon Web Services Korea
 
[AWSome Day온라인 컨퍼런스] 강의 3: 클라우드 구축하기 - 정도현, AWS 테크니컬 트레이너
Amazon Web Services Korea
 
AWS Aurora 100% 활용하기
I Goo Lee
 
비용 관점에서 AWS 클라우드 아키텍처 디자인하기::류한진::AWS Summit Seoul 2018
Amazon Web Services Korea
 
천만 사용자를 위한 AWS 클라우드 아키텍처 진화하기 - 김준형 솔루션즈 아키텍트, AWS :: AWS Summit Seoul 2019
Amazon Web Services Korea
 
클라우드에서 구축하기 - 정도현, AWS 테크니컬 트레이너 :: AWSome Day 온라인 컨퍼런스
Amazon Web Services Korea
 
서버리스 아키텍처 패턴 및 로그 처리를 위한 파이프라인 구축기 - 황윤상 솔루션즈 아키텍트, AWS / Matthew Han, SendBi...
Amazon Web Services Korea
 
[Keynote] 슬기로운 AWS 데이터베이스 선택하기 - 발표자: 강민석, Korea Database SA Manager, WWSO, A...
Amazon Web Services Korea
 
AWS CLOUD 2017 - AWS 신규 서비스를 통해 본 클라우드의 미래 (김봉환 솔루션즈 아키텍트)
Amazon Web Services Korea
 
AWS Finance Symposium_천만 고객을 위한 AWS 클라우드 아키텍쳐 확장하기
Amazon Web Services Korea
 
[D3T2S01] Amazon Aurora MySQL 메이저 버전 업그레이드 및 Amazon B/G Deployments 실습
Amazon Web Services Korea
 
천만사용자를 위한 AWS 클라우드 아키텍처 진화하기 – 문종민, AWS솔루션즈 아키텍트:: AWS Summit Online Korea 2020
Amazon Web Services Korea
 
AWS Aurora 운영사례 (by 배은미)
I Goo Lee.
 
[애플리케이션 현대화 및 개발] 파트너 세션 | 모던 인프라스트럭쳐 아키텍쳐 - 서호석 이사, 영우디지탈
Amazon Web Services Korea
 
천만 사용자를 위한 AWS 클라우드 아키텍쳐 진화하기- AWS Summit Seoul 2017
Amazon Web Services Korea
 
AWS 9월 웨비나 | Amazon Aurora Deep Dive
Amazon Web Services Korea
 
Amazon Aurora 100% 활용하기
Amazon Web Services Korea
 
Ad

More from Amazon Web Services Korea (20)

PDF
[D3T1S01] Gen AI를 위한 Amazon Aurora 활용 사례 방법
Amazon Web Services Korea
 
PDF
[D3T1S06] Neptune Analytics with Vector Similarity Search
Amazon Web Services Korea
 
PDF
[D3T1S03] Amazon DynamoDB design puzzlers
Amazon Web Services Korea
 
PDF
[D3T1S04] Aurora PostgreSQL performance monitoring and troubleshooting by use...
Amazon Web Services Korea
 
PDF
[D3T1S07] AWS S3 - 클라우드 환경에서 데이터베이스 보호하기
Amazon Web Services Korea
 
PDF
[D3T1S02] Aurora Limitless Database Introduction
Amazon Web Services Korea
 
PDF
[D3T2S03] Data&AI Roadshow 2024 - Amazon DocumentDB 실습
Amazon Web Services Korea
 
PDF
AWS Modern Infra with Storage Roadshow 2023 - Day 2
Amazon Web Services Korea
 
PDF
AWS Modern Infra with Storage Roadshow 2023 - Day 1
Amazon Web Services Korea
 
PDF
사례로 알아보는 Database Migration Service : 데이터베이스 및 데이터 이관, 통합, 분리, 분석의 도구 - 발표자: ...
Amazon Web Services Korea
 
PDF
Amazon DocumentDB - Architecture 및 Best Practice (Level 200) - 발표자: 장동훈, Sr. ...
Amazon Web Services Korea
 
PDF
Amazon Elasticache - Fully managed, Redis & Memcached Compatible Service (Lev...
Amazon Web Services Korea
 
PDF
Internal Architecture of Amazon Aurora (Level 400) - 발표자: 정달영, APAC RDS Speci...
Amazon Web Services Korea
 
PDF
Demystify Streaming on AWS - 발표자: 이종혁, Sr Analytics Specialist, WWSO, AWS :::...
Amazon Web Services Korea
 
PDF
Amazon EMR - Enhancements on Cost/Performance, Serverless - 발표자: 김기영, Sr Anal...
Amazon Web Services Korea
 
PDF
Enabling Agility with Data Governance - 발표자: 김성연, Analytics Specialist, WWSO,...
Amazon Web Services Korea
 
PDF
Amazon Redshift Deep Dive - Serverless, Streaming, ML, Auto Copy (New feature...
Amazon Web Services Korea
 
PDF
From Insights to Action, How to build and maintain a Data Driven Organization...
Amazon Web Services Korea
 
PDF
[Keynote] Accelerating Business Outcomes with AWS Data - 발표자: Saeed Gharadagh...
Amazon Web Services Korea
 
PDF
Amazon DynamoDB - Use Cases and Cost Optimization - 발표자: 이혁, DynamoDB Special...
Amazon Web Services Korea
 
[D3T1S01] Gen AI를 위한 Amazon Aurora 활용 사례 방법
Amazon Web Services Korea
 
[D3T1S06] Neptune Analytics with Vector Similarity Search
Amazon Web Services Korea
 
[D3T1S03] Amazon DynamoDB design puzzlers
Amazon Web Services Korea
 
[D3T1S04] Aurora PostgreSQL performance monitoring and troubleshooting by use...
Amazon Web Services Korea
 
[D3T1S07] AWS S3 - 클라우드 환경에서 데이터베이스 보호하기
Amazon Web Services Korea
 
[D3T1S02] Aurora Limitless Database Introduction
Amazon Web Services Korea
 
[D3T2S03] Data&AI Roadshow 2024 - Amazon DocumentDB 실습
Amazon Web Services Korea
 
AWS Modern Infra with Storage Roadshow 2023 - Day 2
Amazon Web Services Korea
 
AWS Modern Infra with Storage Roadshow 2023 - Day 1
Amazon Web Services Korea
 
사례로 알아보는 Database Migration Service : 데이터베이스 및 데이터 이관, 통합, 분리, 분석의 도구 - 발표자: ...
Amazon Web Services Korea
 
Amazon DocumentDB - Architecture 및 Best Practice (Level 200) - 발표자: 장동훈, Sr. ...
Amazon Web Services Korea
 
Amazon Elasticache - Fully managed, Redis & Memcached Compatible Service (Lev...
Amazon Web Services Korea
 
Internal Architecture of Amazon Aurora (Level 400) - 발표자: 정달영, APAC RDS Speci...
Amazon Web Services Korea
 
Demystify Streaming on AWS - 발표자: 이종혁, Sr Analytics Specialist, WWSO, AWS :::...
Amazon Web Services Korea
 
Amazon EMR - Enhancements on Cost/Performance, Serverless - 발표자: 김기영, Sr Anal...
Amazon Web Services Korea
 
Enabling Agility with Data Governance - 발표자: 김성연, Analytics Specialist, WWSO,...
Amazon Web Services Korea
 
Amazon Redshift Deep Dive - Serverless, Streaming, ML, Auto Copy (New feature...
Amazon Web Services Korea
 
From Insights to Action, How to build and maintain a Data Driven Organization...
Amazon Web Services Korea
 
[Keynote] Accelerating Business Outcomes with AWS Data - 발표자: Saeed Gharadagh...
Amazon Web Services Korea
 
Amazon DynamoDB - Use Cases and Cost Optimization - 발표자: 이혁, DynamoDB Special...
Amazon Web Services Korea
 

[D3T1S05] Aurora 혼합 구성 아키텍처를 사용하여 예상치 못한 트래픽 급증 대응하기

  • 1. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. 양 형 식 Solutions Architect AWS Aurora 혼합 구성 아키텍처를 사용하여 예상치 못한 트래픽 급증 대응하기 The Secret of the Amazon Aurora Cluster A W S D A T A & A I R O A D S H O W 2 0 2 4
  • 2. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 AWS DATA & AI ROADSHOW 2024 • Amazon Aurora 살펴보기 • Amazon Aurora Mixed-Configuration(혼합구성) Cluster • Custom Aurora Auto Scaling 아키텍처 설계 및 구현 • 아키텍처 검증 • 추가 자료 2 Agenda
  • 3. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 Amazon Aurora 살펴보기 3
  • 4. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 AWS DATA & AI ROADSHOW 2024 4 Amazon Aurora의 Architecture § Database용으로 설계된 Log기반의 분산형 스토리지 § Storage Volume은 3개의 AZ에 걸쳐 수백 개 이상의 Storage Node로 스트라이핑 § 총 6개의 복제본(3개의 AZ에 AZ당 2개)을 저장하여 AZ+1 장애 상황에도 데이터베이스 복구 가능 § 스토리지 공유 구조로 복제 작업 부하 감소 Primary Replica Replica Transactions Caching SQL Transactions Caching SQL Transactions Caching Availability Zone - 1 Availability Zone - 2 Availability Zone - 3 SSD Storage Layer Compute Layer Shared Storage Volume Cluster Endpoint Reader Endpoint SQL
  • 5. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 AWS DATA & AI ROADSHOW 2024 5 Amazon Aurora Serverless v2 아마존 오로라를 위한 자동 확장 구성으로, 이제 가장 요구가 높은 응용 프로그램과 데이터베이스 워크로드를 지원합니다. 멀티-AZ, 글로벌 데이터베이스를 포함한 오로라의 모든 기능을 제공합니다 Amazon Aurora 수백 건에서 수십만 건의 트랜잭션까지 초 단위로 즉시 확장됩니다. 0 10 20 30 40 0 500 1000 1500 CAPACITY WORKLOAD RUNTIME 데이터베이스 용량을 정확히 맞추기 위해 미세 단위로 확장이 가능합니다. 0 50 1 3 5 7 9 11 13 Capacity 최대 부하를 고려한 프로비저닝 비용과 비교하여 최대 90%의 비용 절감 효과가 있습니다. Aurora PostgreSQL v13 onwards Aurora MySQL v 8.0 Supported major versions
  • 6. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 AWS DATA & AI ROADSHOW 2024 6 Amazon Aurora Serverless v2 Warm pool of instances Shared Distributed storage Database Endpoint Application Scalable DB capacity § 유지관리를 위한 인스턴스가 없는 서버리스 엔진 § ACU는 약 2GB 메모리, CPU, 네트워크의 조합 § 최소 0.5 ACU에서 128 ACU까지 Scale up/down 자동화 § 어플리케이션에 영향 주지 않음 § 사용한 데이터베이스 용량만큼 초당 요금 지불 § 자주 사용되지 않거나, 예측할 수 없거나, 주기적인 워크로드에 적합
  • 7. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 AWS DATA & AI ROADSHOW 2024 7 Aurora Provisioned VS Aurora Serverless v2 Aurora Provisioned • 수직 및 수평적인 확장이 가능 • 수동으로 용량을 조정 • 예측 가능한 트래픽 • RI 옵션 가능 Aurora Serverless v2 • 작은 규모의 애플리케이션에 적합 • 자동으로 최소/최대 용량 조정 • 예상치 못한 대규모 트래픽에 적합 • RI 옵션 제공 안함 구축 사례 • 범용적으로 사용 • 대규모의 데이터베이스 애플리케이션을 구축하는데 적합 구축 사례 • 쓰기 트랜잭션이 많은 경우 • 일시적 또는 간헐적인 트래픽이 예상되는 애플리케이션의 경우 • 인스턴스 관리 부담 절감
  • 8. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 AWS DATA & AI ROADSHOW 2024 8 트래픽 유형 분석 Peak Average Peak Average Peak Average Aurora Provisioned Aurora Serverless v2 Aurora Provisioned • 예측 가능한 트래픽 • 시즌, 주기가 일정한 트래픽 • 부하가 완만한 트래픽 • 불규칙적이나 최대 부하 예측 가능 • 비용 부담 Aurora Serverless v2 • 예측 불가능한 스파이크 트래픽
  • 9. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 AWS DATA & AI ROADSHOW 2024 9 예상치 못한 트래픽에 따른 Aurora Auto Scaling의 한계 이벤트시 평소의 수배에서 수십배의 트래픽을 처리 Amazon Aurora (Write/Read) Application Write Endpoint Amazon Aurora (ReadOnly) Read Endpoint Amazon ElastiCache 2. 최소 수 시간 전, 읽기 전용 인스턴스 증설 à 과도한 대응과 리소스 낭비 1. 예측 불가능한 순간적인 스파이크 트래픽 부하 à 평균 10분 인스턴스 준비 시간 Amazon Aurora (ReadOnly) Scale-out
  • 10. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 Amazon Aurora Mixed-Configuration(혼합구성) Cluster 10
  • 11. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 AWS DATA & AI ROADSHOW 2024 11 The First Secret of the Amazon Aurora Cluster Primary Replica Replica Transactions Caching SQL Transactions Caching SQL Transactions Caching Availability Zone - 1 Availability Zone - 2 Availability Zone - 3 SSD Storage Layer Compute Layer Shared Storage Volume Cluster Endpoint Reader Endpoint SQL Serverless v2 Reader Endpoint Replica Provisioned instance Serverless v2 instance Aurora Provisioned Cluster Aurora Serverless v2 Aurora Mixed-Configuration Cluster
  • 12. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 AWS DATA & AI ROADSHOW 2024 12 Amazon Aurora Mixed-Configuration(혼합구성) Cluster • 읽기 인스턴스의 Scale-out 진행 중, 또는 특정 기준 이상의 트래픽 발생시, serverless v2 읽기 전용 인스턴스에서 스파이크 트래픽 대응 Ø 예측 불가능한 스파이크 트래픽 대응 및 서비스 안정성 향상 Ø 이벤트 대응 비용 절감 Aurora Mixed-Configuration Cluster Amazon Aurora Provisioned Amazon Aurora Serverless v2 ACU (0.5 ~ 128)
  • 13. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 AWS DATA & AI ROADSHOW 2024 13 Amazon Aurora 혼합 구성 클러스터를 제대로 활용하려면? Amazon Aurora (Write/Read) Application Write Endpoint Amazon Aurora (ReadOnly) Read Endpoint Amazon Aurora Serverless v2 최소 0.5 ACU ~ 최대 128 ACU Mixed-Configuration 기존 Read Endpoint로 연결시 트래픽이 발생하여 불필요한 비용 발생 Amazon Aurora (Write/Read) Application Write Endpoint Amazon Aurora (ReadOnly) Read Endpoint Mixed-Configuration Amazon Aurora Serverless v2 최소 0.5 ACU ~ 최대 128 ACU Custom Read Endpoint 엔드포인트가 3개면 기준은?
  • 14. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 AWS DATA & AI ROADSHOW 2024 14 The Second Secret of the Amazon Aurora Cluster • Aurora 클러스터의 Auto Scaling 기준 • 클러스터에 속한 모든 복제본의 평균 CPU 사용률 Amazon Aurora (Write/Read) Application Write Endpoint Amazon Aurora (ReadOnly) Read Endpoint Amazon Aurora Serverless v2 최소 0.5 ACU ~ 최대 128 ACU 1. 평균 CPU 사용률 2. Scale-out 발생 안함 3. 느린 감지 • Cloudwatch RDS 메트릭 : 1분 • Alarm 1분 3회 감지시, Autoscaling 발생 Mixed-Configuration
  • 15. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 Custom Aurora Auto Scaling 아키텍처 설계 및 구현 15
  • 16. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 AWS DATA & AI ROADSHOW 2024 16 Custom Aurora Auto Scaling 아키텍처 구성 요소 Solutions Amazon Route 53 Private Hosted zone Weight Based Record • Route53 가중치 기반 레코드 • Aurora 커스텀 엔드포인트 Amazon Aurora Write/Read Amazon Aurora Read-Only Amazon Aurora Serverless Amazon CloudWatch Metrics • Cloudwatch Metric 정보 수집 Enhanced Monitoring AWS Lambda AWS Step Functions Amazon EventBridge schedule • 자동화된 운영 아키텍처 AWS Auto Scaling
  • 17. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 AWS DATA & AI ROADSHOW 2024 17 Custom Aurora Auto Scaling 아키텍처 CloudWatch Custom Metrics Amazon Aurora Provisioned Cluster CloudWatch Metrics Metric Refinement Lambda Provisioned instances Serverless v2 instances Amazon Route 53 Private Hosted Zone Weight based Record Enhanced Monitoring Custom Metrics Custom Metrics Alarm Subscription Filter AWS Step Functions Adjusting Weights 1 2 3 AWS Auto Scaling 4 Custom Endpoint
  • 18. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 AWS DATA & AI ROADSHOW 2024 Aurora Serverless v2 읽기 전용 인스턴스 추가 Amazon Aurora Provisioned Cluster Provisioned instances (Reader) Serverless v2 instances (Reader) Custom Endpoint Amazon Route 53 Private Hosted zone Weight based Record Custom Endpoint Normal Traffic Spike Traffic Max 15 Instances Read Transactions • Serverless v2 커스텀 엔드포인트 • 평상시 트래픽을 처리 • 커스텀 엔드포인트 추가 구성 설정 • 임계치를 넘어가는 부하 트래픽을 처리 • 우선순위 15 • Provisioned 커스텀 엔드포인트
  • 19. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 AWS DATA & AI ROADSHOW 2024 Rout53 가중치 기반 레코드 설정 동일 서브 도메인 : test-rds (예시) 가중치 초기값 (비율) • Provisioned 가중치 : 10 • Serverless v2 가중치 : 0 커스텀 엔드포인트 (CNAME) • Provisioned 커스텀 엔드포인트 • Serverless v2 커스텀 엔드포인트 • Route53 Private Hosted Zone Name : rds.com (예시) rds.com rds.com
  • 20. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 AWS DATA & AI ROADSHOW 2024 • Enhanced Metric 수집 아키텍처 Enhanced Metric 지표 수집 및 커스텀 메트릭 생성 Amazon Aurora CloudWatch Metrics Enhanced Monitoring Metric Refinement Lambda (Embedded Metric Format) Subscription Filter (RDSOSMetrics) Custom Metrics 1 2 3
  • 21. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 AWS DATA & AI ROADSHOW 2024 • 고해상도 메트릭 수집 Enhanced Metric 지표 수집 및 커스텀 메트릭 생성 CloudWatch Metrics
  • 22. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 AWS DATA & AI ROADSHOW 2024 • Subscription Filter를 이용한 메트릭 정제 Enhanced Metric 지표 수집 및 커스텀 메트릭 생성
  • 23. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 AWS DATA & AI ROADSHOW 2024 • EMF를 이용한 실시간 메트릭 반영 Enhanced Metric 지표 수집 및 커스텀 메트릭 생성 https://github.com/awslabs/aws-embedded-metrics-node • Cloudwatch에 맞춰진 구조화된 로그 포맷 • 빠른 Cloudwatch 메트릭 반영
  • 24. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 AWS DATA & AI ROADSHOW 2024 • Cloudwatch Alarm기반 트래픽 분산 아키텍처 Step Functions을 이용한 트래픽 분산 CloudWatch Custom Metrics Amazon EventBridge AWS Step Functions Amazon Route 53 Alarm Trigger Adjusting Weights 1 2
  • 25. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 AWS DATA & AI ROADSHOW 2024 • 프로비저닝 읽기 전용 인스턴스 부하 알람 Step Functions을 이용한 트래픽 분산 High Provisioned CPU Alarm Low Provisioned CPU Alarm
  • 26. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 AWS DATA & AI ROADSHOW 2024 • Cloudwatch Alarm 설정 Step Functions을 이용한 트래픽 분산 1. 프로비저닝 읽기 전용 인스턴스 Scale-out • AWS Auto Scaling 서비스 • 자동 Scale-out / Scale-in 2. Route53 레코드 가중치 조절 à Serverless v2 인스턴스에 트래픽 분산 3. Route53 레코드 가중치 조절 à 인스턴스 증설 완료 후 CPU가 줄어들면 Serverless v2 인스턴스 트래픽 회수 0 10 20 30 40 50 60 70 80 90 CPU 1 2 3 1
  • 27. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 AWS DATA & AI ROADSHOW 2024 • 트래픽 비율 조절 Step Function 구성 Step Functions을 이용한 트래픽 분산 1. Serverless v2 읽기 전용 인스턴스 레코드 가중치 조절 • 가중치가 최소/최대치 도달 시 Step Function 종료 2. 변경된 가중치가 메트릭에 반영되기까지의 시간 대기 • Cloudwatch Alarm의 데이터 포인트 주기 이상 대기 3. Cloudwatch Alarm이 해결되었는지 확인 4. Alarm 상태에 따른 분기 1. 해결된 경우, Step Functions을 종료 2. 해결되지 않은 경우, 위 과정을 반복
  • 28. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 AWS DATA & AI ROADSHOW 2024 • AWS AutoScaling 서비스를 활용 커스텀 메트릭을 이용한 Aurora 오토스케일링 CloudWatch Custom Metrics AWS Auto Scaling Amazon Aurora Alarm 1. 오토스케일링에 사용할 대상을 등록 3. 읽기 인스턴스 증/감설 정책 설정 2. 오토스케일링 기준 지표로 사용할 메트릭 설정 AWS CLI로 적용 가능
  • 29. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 AWS DATA & AI ROADSHOW 2024 • AWS AutoScaling 서비스 적용 커스텀 메트릭을 이용한 Aurora 오토스케일링 1. 오토스케일링에 사용할 대상을 등록 3. 읽기 인스턴스 스케일링 정책 설정 2. 오토스케일링 기준 지표로 사용할 메트릭 설정
  • 30. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 아키텍처 검증 30
  • 31. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 AWS DATA & AI ROADSHOW 2024 • 테스트 시나리오 커스텀 Aurora 오토스케일링 아키텍처 검증 시간 가중치 Provisioned Serverless v2 비고 init 10 0 1 10 0 Scale-out 발생 2 10 5 2 10 10 2 10 10 트래픽 분산에 따른 시스템 안정화 3 10 10 읽기 인스턴스 증설 완료 3 10 5 Serverless 트래픽 회수 3 10 0 0 10 20 30 40 50 60 70 80 90 CPU 1 2 3
  • 32. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 AWS DATA & AI ROADSHOW 2024 커스텀 Aurora 오토스케일링 아키텍처 검증 • AS-IS • To-Be
  • 33. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 AWS DATA & AI ROADSHOW 2024 • 테스트 결과 요약 커스텀 Aurora 오토스케일링 아키텍처 검증 구분 기존 클러스터 혼합 구성 클러스터 서비스 장애 시간 평균 10분 내외 - 장애구간 서비스 응답 속도 평균 220ms 평균 80ms 서비스 비용 수 만원 추가 발생 (Cloudwatch, Lambda 등) 이벤트 대응 비용 (비율) 100% 70% (약 30% 절감) 오토스케일링 정밀도 최대 1분 최대 10초 시스템 성능 서비스 안정성 비용절감 대응시간 단축
  • 34. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 추가 자료 34
  • 35. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 AWS DATA & AI ROADSHOW 2024 • https://aws.amazon.com/solutions/guidance/handling-data-during-traffic-spikes-on-aws/?did=sl_card&trk=sl_card 35 Guidance for Handling Data during Traffic Spikes on AWS
  • 36. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 AWS DATA & AI ROADSHOW 2024 • https://github.com/aws-solutions-library-samples/guidance-for-handling-data-during-traffic-spikes-on-aws 36 Guidance for Handling Data during Traffic Spikes on AWS § Cloudformation Deployment § 맞춤형 자동 확장 솔루션 § 비용 효율적 솔루션 § $150/month
  • 37. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 Wrap Up 37
  • 38. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 AWS DATA & AI ROADSHOW 2024 38 Amazon Aurora Cluster 비밀 노트 1. Aurora Provisioned + Aurora Serverless v2 = Aurora 혼합 구성 Cluster 구성 가능 2. Aurora Auto Scaling 기능은 감지시간(1분/3회)과 인스턴스 확장 시간(최대 6분), 약 10분 소요 3. Aurora Auto Scaling 기능은 클러스터에 연결된 모든 읽기 인스턴스의 평균값을 기준으로 동작 4. Aurora에 Custom Auto Scaling을 설정하려면 AWS CLI로만 조작 가능 5. Aurora Enhanced monitoring 기능은 최소 1초 단위 메트릭 수집 가능 6. Aurora 혼합구성 클러스터 기반 Custom Auto Scaling 솔루션 제대로 활용하기 1. 맞춤형 자동 확장 솔루션으로 트래픽 부하를 실시간으로 동적 관리하고 비용을 최소화하면서 서비스 복원력 보장 2. Aurora Serverless v2 인스턴스 고유 엔드포인트를 활용하여 평상시 대량의 분석 또는 배치 작업용으로 활용 가능 3. Auto Scailng 없이 특정 임계값을 넘어서는 트래픽만 처리하도록 가능
  • 39. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. Thank you! 양 형 식 [email protected] Solutions Architect AWS