SlideShare a Scribd company logo
© 2021, Amazon Web Services, Inc. or its Affiliates.
AWS Korea Game Tech
Apr. 2021
Series #2. AWS로 게임의 공통기능 개발하기
© 2021, Amazon Web Services, Inc. or its Affiliates.
Speakers
AWS Game Master Online 2021
Game Tech Solution Architect
Game Tech Territory Manager(Sales)
최문석 한준식 박진성 채민관 구성완 김민석
© 2021, Amazon Web Services, Inc. or its Affiliates.
Contents
• AWS Game Master Online 2021 소개
• Why AWS?
• Series #2. AWS로 게임의 공통 기능 개발 하기
• 1부: 게임 채팅을 AWS에서 구현해보자!
Amazon Elasticache, AWS Lambda, AWS IoT-Core
Recipe & Estimate
• 2부: AWS에서 대규모 로그인과 접속 대기열을 구현해보자!
Amazon SQS, Amazon Cognito, AWS DynamoDB
Recipe & Estimate
© 2021, Amazon Web Services, Inc. or its Affiliates.
AWS Game Master Online
We are with Game Studio!
© 2021, Amazon Web Services, Inc. or its Affiliates.
AWS Game Master Online 2021
2021년 총 5개의 Episode로 이루어진 장기 프로젝트
https://pages.awscloud.com/game-master-online
© 2021, Amazon Web Services, Inc. or its Affiliates.
AWS Game Master Online 2021
Game Life Cycle
게임 개발 시작 단계부터 분석 단계까지 개발 과정에 초점을 맞춘 온라인 시리즈
Easy to Learn
AWS 초급자도 쉽게 이해할 수 있는 기초수준의 내용
Live Demo
AWS 서비스 활용 방안 소개 후 라이브 데모 진행
Recipe and Estimate
라이브 데모 시 실제 발생 될 예상 요금 공개
Live Q&A
채팅창을 통한 실시간 Q&A
© 2021, Amazon Web Services, Inc. or its Affiliates.
AWS Game Master Heroes
• 선정 기준
o 총 4회 이상 참석한 고객 (설문조사 기반)
o Game Master Online을 통해 실제 AWS 서비스를 도입한 고객
o 2021년 11월 최종 선정 예정
• 혜택
o AWS Game Tech Gift Box 증정
o AWS 정규 교육과정 및 Certification 취득 시험 지원
© 2021, Amazon Web Services, Inc. or its Affiliates.
Meet The Expert
검색 Keyword: AWS MTE
© 2021, Amazon Web Services, Inc. or its Affiliates.
AWS Game Tech Program
© 2021, Amazon Web Services, Inc. or its Affiliates.
AWS Game Tech Program
• AWS로 출시 예정인 게임이 있다면? ► Game Tech PoC
• 타 클라우드, IDC를 사용하고 있다면? ► Game Migration Program
• 기존 AWS 인프라를 최적화하고 싶다면? ► Well-Architected Review
(WAR)
• VC/Accelerate 투자 이력이 있다면? ► Activate Program
• 신규로 AWS를 사용해보고 싶다면? ► Activate Founders
aws-gaming-korea@amazon.com 로 연락 주세요!
© 2021, Amazon Web Services, Inc. or its Affiliates.
1부: 대규모 게임 채팅을 AWS에서 구현해보자!
Amazon API Gateway, AWS Lambda, AWS IoT Core
AWS Solutions Architect 채민관
© 2021, Amazon Web Services, Inc. or its Affiliates.
진행 순서
1. 대규모 채팅서버
-왜, 언제 필요한가
2.마이크로서비스 아키텍처
-적용사례
-Amazon API Gateway
3.서버리스
-AWS Lambda
4.채팅서비스 아키텍처
-마이크로 서비스 + 메시지 브로커 활용
-AWS IoT Core 아키텍처
5.시연
-채팅 기본 기능 시연
-대규모(10만유저 산정) 부하 테스트 시연
© 2021, Amazon Web Services, Inc. or its Affiliates.
오늘의 미션
-대규모 채팅서버 만들기
© 2021, Amazon Web Services, Inc. or its Affiliates.
MMORPG
https://aws.amazon.com/ko/solutions/case-
studies/npixel/?fbclid=IwAR07kfCOUQnZPmBSlMAgSB1nhXg3yV14ak7atxbw_0jF8nYUH5DL-qIuIq8
© 2021, Amazon Web Services, Inc. or its Affiliates.
수많은 컨텐츠…
로그인, 대기열, 패치, 이벤트, 출석, 파티, 길드, 우편, 상점,
펫, 도감, 업적, 전투, 아이템, 강화, 퀘스트, 채널, 채팅…
© 2021, Amazon Web Services, Inc. or its Affiliates.
좀 더 쉽게
MMORPG 핵심 컨텐츠 개발 완료,
-> 채팅, 로그인 같은 중복 시스템은 클라우드에서 쉽고 빠르게 만들 수
없을까?
© 2021, Amazon Web Services, Inc. or its Affiliates.
목표 설정!
1. 게임 내 모든 월드의 통합 채팅 서버
2. 손쉬운 채널링, 10만+ 사용자, 1만+ 메시지/초 확장가능한 시스템
3. 지난 대화보기, 악성 사용자/단어 차단… 필수 기능 구현
4. 모든 대화를 로깅하고 추적할 수 있는 시스템
© 2021, Amazon Web Services, Inc. or its Affiliates.
마이크로서비스 아키텍처
(Micro Service)
© 2021, Amazon Web Services, Inc. or its Affiliates.
MSA란?
마이크로서비스는 API를 통해 통신하는 소규모의 독립적인 서비스로
구성되어 있는 경우의 소프트웨어 개발을 위한 아키텍처 및 조직적 접근
방식.
https://aws.amazon.com/ko/microservices/
© 2021, Amazon Web Services, Inc. or its Affiliates.
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
다른 서비스의 내부
구조를 알지 못해도, 내
서비스 코드를 업데이트
할 수 있다.
서비스들이 네트워크를
통해 서로 통신한다.
서비스는 독자적으로
업데이트 개선되며, 서로
영향을 주지 않는다.
“service-oriented
architecture
composed of
loosely coupled
elements
that have
bounded contexts”
Adrian Cockcroft (VP of Cloud Architecture @ AWS)
MSA란?
© 2021, Amazon Web Services, Inc. or its Affiliates.
장단점
확장에 유연. 손쉬운 배포. 재사용 가능.
하지만, 서비스간 통신 비용이 크다. 아키텍처가 복잡하다.
© 2021, Amazon Web Services, Inc. or its Affiliates.
게임 서비스에 적용해보면
캐릭터,
전투,퀘스트
로그인,출석,보상
채팅,상점
캐릭터,
전투,퀘스트
로그인 채팅
상점 보상
© 2021, Amazon Web Services, Inc. or its Affiliates.
클라우드로!
캐릭터,
전투,퀘스트
로그인 채팅
상점 보상
Amazon SQS
Amazon ElastiCache
Amazon API Gateway
Amazon API Gateway
AWS Lambda
AWS Lambda
© 2021, Amazon Web Services, Inc. or its Affiliates.
서버리스
© 2021, Amazon Web Services, Inc. or its Affiliates.
서버리스?
1. 서버를 고려하지 않고, 애플리케이션을 구축하고 실행해주는 서비스.
용량 프로비저닝, 패치, 인프라관리, Auto Scaling, 고가용성을 내장한
완전관리형. 사용한만큼 비용 청구
AWS Lambda AWS Fargate Amazon EventBridge AWS Step Functions Amazon API Gateway
Amazon S3 Amazon DynamoDB
© 2021, Amazon Web Services, Inc. or its Affiliates.
MSA와 서버리스
1. 모듈식 독립형 구성요소인 마이크로 서비스로 애플리케이션을 구축하면
변경이 쉽기 때문에 새 기능의 출시 속도가 빨라짐.
2. 계속 변화하는 마이크로 서비스를 서버리스로 구현하면 환경 설정과
운영의 부담에서 벗어날 수 있고, 확장과 비용 관리에 유리함.
3. 마이크로 서비스의 완성, 현대식 어플리케이션
https://aws.amazon.com/ko/modern-apps/
© 2021, Amazon Web Services, Inc. or its Affiliates.
서버리스의 꽃! AWS Lambda
1. 서버 준비없이 코드를 실행할 수 있는 서버리스 컴퓨팅 서비스
2. Node.js, Python, Ruby, Java, Go, C#, Powershell 지원
AWS Lambda
© 2021, Amazon Web Services, Inc. or its Affiliates.
채팅 서비스
© 2021, Amazon Web Services, Inc. or its Affiliates.
채팅
AWS IoT Core
IoT
Chat-Client
IoT
Chat-Client
AWS Lambda
pub/World/Server/Town137
sub/World/Client/Town137
pub/World/Client/Town137
sub/World/Server/Town137
© 2021, Amazon Web Services, Inc. or its Affiliates.
AWS IoT Core
1. IoT(사물인터넷) 지원
2. 메시지 브로커, MQTT 지원
3. 수십억 개의 디바이스, 수조 개의 메시지
4. 완전 관리형, 서버리스 서비스
AWS IoT Core
© 2021, Amazon Web Services, Inc. or its Affiliates.
채팅
AWS IoT Core
IoT
Chat-Client
IoT
Chat-Client
AWS Lambda
pub/World/Server/Town137
sub/World/Client/Town137
pub/World/Client/Town137
sub/World/Server/Town137
© 2021, Amazon Web Services, Inc. or its Affiliates.
지난대화 보기, 악성단어 필터링, 유저차단…
AWS IoT Core
IoT
Chat-Client
IoT
Chat-Client
AWS Lambda
AWS Lambda Amazon API Gateway
Amazon ElastiCache
Amazon DynamoDB
A Request user data. After login…
B Ban user. After fight…
C Request channel data. After join…
C
Get messages
for last some
A
Get/set user data
B
send channel messages
© 2021, Amazon Web Services, Inc. or its Affiliates.
로깅과 모니터링
AWS IoT Core
IoT
Chat-Client
IoT
Chat-Client
AWS Lambda
AWS Lambda Amazon API Gateway
Amazon ElastiCache
Amazon DynamoDB
Amazon Kinesis
Data Firehose
Amazon QuickSight
Amazon S3 Amazon Athena
Administrator
report!
© 2021, Amazon Web Services, Inc. or its Affiliates.
아키텍처 제안
AWS IoT Core
IoT
Chat-Client
IoT
Chat-Client
AWS Lambda
AWS Lambda Amazon API Gateway
Amazon ElastiCache
Amazon DynamoDB
Amazon Kinesis
Data Firehose
Amazon QuickSight
Amazon S3 Amazon Athena
Administrator
Amazon Cognito
AWS X-Ray
Amazon CloudWatch
pub/World/Server/Town137
sub/World/Client/Town137
pub/World/Client/Town137
sub/World/Server/Town137
report!
A Request user data. After login…
B Ban user. After fight…
C Request channel data. After join…
C
Get messages
for last some
A
Get/set user data
B
D Block user. After check recorded
messages…
D
Update
user’s authority
send channel messages
© 2021, Amazon Web Services, Inc. or its Affiliates.
채팅 기능 시연
© 2021, Amazon Web Services, Inc. or its Affiliates.
Chatting UI Demo
1. AWS Python SDK + QT UI
2. 채널 이동, 채팅(-t 채널명)
3. 지난 대화보기(재접속시 최근 30초)
4. 악성 단어 차단(*******)
5. 악성 사용자 차단 기능(/ban XXX)
© 2021, Amazon Web Services, Inc. or its Affiliates.
대규모 부하 테스트
© 2021, Amazon Web Services, Inc. or its Affiliates.
Bot test
1. AWS Python SDK + bash
2. EC2 (c5n.2xlarge 8core, 32G) 2대에서 각각 500 개 클라이언트 접속
3. 100개 채널 랜덤 조인
4. 0~3초 사이에 메세지 1개씩 전송
© 2021, Amazon Web Services, Inc. or its Affiliates.
Monitoring
1. Cloud Watch!
2. X-Ray
© 2021, Amazon Web Services, Inc. or its Affiliates.
Demo Session
© 2021, Amazon Web Services, Inc. or its Affiliates.
Summary
1. 게임 내 모든 월드의 통합 채팅 서버 … OK!
2. 손쉬운 채널링, 10만+ 사용자, 1만+ 메시지/초 확장가능한 시스템 … OK!
3. 지난 대화보기, 악성 사용자/단어 차단… 필수 기능 구현… OK!
4. 모든 대화를 로깅하고 추적할 수 있는 시스템…. OK!
On Cloud!
© 2021, Amazon Web Services, Inc. or its Affiliates.
Recipe & Estimate
© 2021, Amazon Web Services, Inc. or its Affiliates.
Recipe and Estimate
(https://calculator.aws/#/)
Scenario) Live-demo Workflow
• 10만명의 유저가 30일 동안 접속을 유지하면서 지속적으로 채팅한다고 가정.
(유저당 5000개의 메시지 * 10만명 = 5억개)
• IoT Core (Connection : $87, RulesEngine :$150, Message : $500) : $737
• Lambda (50ms, 128MB x 5억) : $150, ElastiCache (r5.large) : $189
• Kinesis (1KB x 5억: $90) , S3 ( 500GB : $12) , Athena ( 500GB, 주1회 : $10)
• Total estimate : $1188 (약 1,310,000)
© 2021, Amazon Web Services, Inc. or its Affiliates.
2부: AWS에서 대규모 로그인과 접속 대기열을
구현해보자!
Amazon SQS, Amazon Cognito, AWS DynamoDB
AWS Solutions Architect 김민석
© 2021, Amazon Web Services, Inc. or its Affiliates.
게임 서비스를 위한 서버의 종류
멀티플레이
게임 서버
게임 지원을 위한
보조 서버
운영 및 관리를
위한 서버
개발, 테스트,
빌드를 위한 서버
• 게임 플레이를 서버
레벨에서 검증하거나 게임
로직을 구현하는 형태
• 주로 채팅, 랭킹, 로그인,
이벤트 등 아웃 게임 기능
구현을 위한 서버
• 개발, 빌드 및 테스트
지원을 위한 서버
• 클린 빌드나 서버 일괄
배포 등에 사용
• 게임의 각종 지표 및 운영
데이터 관리를 위한 서버
• 주로 웹 어드민 형태
© 2021, Amazon Web Services, Inc. or its Affiliates.
오늘의 관전 포인트
다룰 주제
• 게임 대기열 구성 요소
• AWS 서버리스 서비스
• 메시지 서비스 (Amazon SQS, Amazon SNS)
• NoSQL 데이터베이스 (Amazon DynamoDB)
• 클라우드 기반 인증 서비스 (Amazon Cognito 맛보기)
다루지 않는 주제
• AWS Lambda 및 Amazon API Gateway
© 2021, Amazon Web Services, Inc. or its Affiliates.
최초 게임 접속 시, 가장 처음 경험하는 것은?
© 2021, Amazon Web Services, Inc. or its Affiliates.
게임 대기열 구성 요소
대기열 구현을 위해 어떤 요소가 필요할까?
© 2021, Amazon Web Services, Inc. or its Affiliates.
대기열 구성에 필요한 요소들
비동기 처리를 위한
메시징 서비스
메시지 처리에
필요한 컴퓨팅
로그인 처리
상태 저장소
© 2021, Amazon Web Services, Inc. or its Affiliates.
메시징 서비스
생산자 소비자
Pub/Sub
대기열
스트림
메시지 브로커
© 2021, Amazon Web Services, Inc. or its Affiliates.
AWS에서 제공하는 관리형 메시징 서비스
Amazon
SNS
Amazon
SQS
Amazon
Kinesis
Amazon
MQ
토픽 큐 스트림 메시지 브로커
서버리스
간단한 API
유연한 확장
API 호환
다양한 기능
표준 프로토콜
클라우드 네이티브 어플리케이션 마이그레이션
* 위 서비스는 메시지 서비스로 활용될 수 있는 AWS 서비스들 중 일부만 설명하고 있습니다.
© 2021, Amazon Web Services, Inc. or its Affiliates.
AWS 관리형 메시지 서비스 비교
Amazon
SQS
Amazon
SNS
Amazon Kinesis
Data Streams
Amazon
MQ
인프라 서버리스 서버리스 서버리스 매니지드(EC2)
메시지
순서 보장
Best-effort/FIFO Best-effort/FIFO 정렬(샤드 단위) 정렬
메시지
전송
최소 한번 /
정확히 한번(FIFO)
최소 한번 /
정확히 한번(FIFO)
정확히 한번 정확히 한번
메시지
최대 크기
256KB 256KB 1MB RabbitMQ – 2GB
프로토콜 REST REST REST JMS, AMQP,
MQTT, STOMP
© 2021, Amazon Web Services, Inc. or its Affiliates.
서버리스 메시징
내 시나리오에 맞는 AWS 서비스 어떤 것들이 있을까?
© 2021, Amazon Web Services, Inc. or its Affiliates.
대기열 구성에 참고할 수 있는 AWS 서버리스 옵션들
Amazon SQS AWS Lambda Amazon DynamoDB
마이크로 서비스,
분산 시스템 및 서버리스
어플리케이션을 위한
완전관리형 메시징 서비스
이벤트에 대한 응답으로
코드를 실행하고 자동으로
컴퓨팅 리소스를 관리하는
서버리스 컴퓨팅 서비스
어떤 규모에서든 빠른 성능 및
유연한 확장성을 제공하는
완전관리형 관계형 및 NoSQL
데이터베이스 서비스
© 2021, Amazon Web Services, Inc. or its Affiliates.
참고 아키텍처는?
AWS Cloud
Amazon Cognito
Amazon
API Gateway
Amazon SQ
S
Amazon DynamoDB
Client
Token
가입 & 로그인
registerPlayer
queuePlayer
processLogin
게임 접속 요청
Post-confirmation
Ticket
getStatus
대기 상태 확인
Game Server
게임 서버 접속
/login/status
/login
© 2021, Amazon Web Services, Inc. or its Affiliates.
Amazon Simple Queue Service (SQS)
메시지
Amazon
SQS
queue
• 메시지 대기열
• Pull 방식 (Polling 모델)
• 메시지 배치 처리 지원
• 메시지 처리 방식 : At-least once, exactly once
• 메시지 제한 시간을 통한 오류 처리 기능
• AWS Lambda는 long poll 방식으로 메시지 확인
© 2021, Amazon Web Services, Inc. or its Affiliates.
Amazon Simple Notification Service (SNS)
• Publish / Subscribe 메시징
• Push 방식
• 여러 구독자를 관리하는 토픽에 메시지 게시
• 필터를 이용하여 특정 구독자에게만 메시지 전송
• 다양한 전송 프로토콜 지원 : HTTP(s), 이메일,
Amazon SQS, Lambda, SMS, 모바일 푸시
SNS topic
Data
© 2021, Amazon Web Services, Inc. or its Affiliates.
Amazon SQS Standard : 간단하게 대용량의 메시지 처리
생산자
생산자
소비자
B
네트워크 이슈 등에 의한
메시지 중복 가능성
Retry
B
A
소비자
© 2021, Amazon Web Services, Inc. or its Affiliates.
Amazon SQS Standard : 간단하게 대용량의 메시지 처리
생산자
생산자
소비자
소비자
소비자
© 2021, Amazon Web Services, Inc. or its Affiliates.
Amazon SQS FIFO : 순서가 중요해!
생산자
생산자
소비자
G1
G2
G3
소비자
소비자
© 2021, Amazon Web Services, Inc. or its Affiliates.
잠깐, 그럼 Amazon Simple Notification Service (SNS)는요?
Message
Queue
Amazon SQS
Amazon SNS
Amazon Aurora
Amazon
Dynamo DB
Amazon SNS 와 Amazon SQS 를 활용하여 메시지 리플레이, Fan-out 파이프라인 등과
같은 다양한 시나리오로 활용 가능
© 2021, Amazon Web Services, Inc. or its Affiliates.
이벤트 기반의 서버리스 메시징
이벤트가 발생했을 때에만 동작!
© 2021, Amazon Web Services, Inc. or its Affiliates.
Lambda 호출 모델
Lambda
function
Amazon
SNS
Amazon
S3
reqs
Lambda
function
Event
비동기
/order
Amazon
API Gateway
Lambda
function
Event
동기
Amazon
SQS
Amazon
Kinesis
Changes
AWS Lambda
service
Event
폴링
© 2021, Amazon Web Services, Inc. or its Affiliates.
서버리스 메시지 처리 흐름
1. 메시지를 큐에 전송
2. Lambda는 큐를
폴링하며 함수를 호출
3. 메시지 처리가
정상적으로 수행
생산자 소비자
Function
instance
메시지
3. Lambda 에서 해당
메시지를 큐에서 삭제
Amazon DynamoDB
© 2021, Amazon Web Services, Inc. or its Affiliates.
Lambda에서는 어떻게 Amazon SQS 메시지를 처리할까?
메시지 전송
AWS
Lambda
Function
instance
Poller Function
instance
A
Long poll
B C D
Function
instance
© 2021, Amazon Web Services, Inc. or its Affiliates.
B C D
Lambda에서 메시지를 배치 처리 지원
AWS
Lambda
Function
instance
Poller Function
instance
A
메시지 전송 Long poll
람다 함수 1회 호출
B C D
A
© 2021, Amazon Web Services, Inc. or its Affiliates.
Lambda에서 메시지를 배치 처리
AWS
Lambda
Function
instance
Poller Function
instance
메시지 전송 Long poll
람다 함수 1회 호출
B C D
A
A
ReceiveCount=2
© 2021, Amazon Web Services, Inc. or its Affiliates.
Lambda의 확장은 어떻게 이루어질까?
AWS
Lambda
Function
instance
Poller Function
instance
Function
instance
• Poller 는 5개의 배치를 읽어와서
배치 별로 람다 호출
• 처리되지 않은 메시지가 큐에
남아 있는 경우, 분당 최대 60개
배치 씩 추가
• 최대 1,000개 배치/호출 지원
• 총 10,000 건 메시지 동시 처리
가능 (1 배치 = 최대 10 메시지)
• Reserved Concurrency 로 동시
처리 배치/호출 조절
배치별 람다 함수 1회 호출
© 2021, Amazon Web Services, Inc. or its Affiliates.
Amazon SQS 에서 Lambda 를 호출할때 알아두면 좋은 팁!
큐 구성
• 가시성 제한 시간(Visibility timeout) > Lambda 함수 타임 아웃 시간
Lambda 함수 구성
• API 호출 비용 절감 및 성능을 위해서 배치 처리 기능(batch size > 1) 활용
• 에러 발생 시, 고민이 필요한 설계 (고려해볼 수 있는 사항들)
1. 같은 메시지에 대한 동일 결과 반환할 수 있는 로직
2. 배치 메시지 처리시, 성공적으로 처리된 메시지는 직접 삭제
© 2021, Amazon Web Services, Inc. or its Affiliates.
클라우드 네이티브 데이터베이스
인프라 걱정없이, 서비스 중단 걱정 없이
© 2021, Amazon Web Services, Inc. or its Affiliates.
게임을 위한 AWS 데이터베이스 서비스
Amazon Aurora Amazon DynamoDB
플레이어 프로파일
플레이어 매칭
리더보드
사용자 인증
계정 정보
전자 상거래 및 결제
메시징
플레이어 인벤토리
사용 예시 고객 사례
 클라우드 환경에 최적화된 분산 저장 아키텍처
 가용성 및 보안성
 유연한 확장 및 성능
 완전 관리형 서비스
© 2021, Amazon Web Services, Inc. or its Affiliates.
관리 공수가 들어가는 데이터베이스 관리 작업 자동화를 통해…
자동 페일오버
백업 및 복구
보안 및 격리성
컴플라이언스
편리한 확장성
자동 패치
모니터링
유지 보수
사용자
AWS
스키마 설계
쿼리 작성
쿼리 최적화
완전 관리형 서비스
… 사용자가 데이터 모델링에 집중할 수 있도록 해줍니다.
© 2021, Amazon Web Services, Inc. or its Affiliates.
Amazon DynamoDB 소개
도큐먼트 및 키-값 서버리스
완전 관리형 NoSQL
접근 제어 이벤트 기반 프로그래밍
빠르고 일관적인 성능
© 2021, Amazon Web Services, Inc. or its Affiliates.
Server 1
T1.p1
Table 1 Table 2 Table 3
Server N
T1.pn
1K WCU* or 3K RCU**
up to 10 GB
DynamoDB 가 자동으로 데이터를 파티셔닝하여 저장
* Write Capacity Unit
** Read Capacity Unit
사용자는 테이블만 정의하면 끝
© 2021, Amazon Web Services, Inc. or its Affiliates.
파티션 키
A1
(partition key)
A2
(sort key)
정렬 키
테이블
아이템
A1
(partition key)
A2
(sort key)
A3 A4 A7
A1
(partition key)
A2
(sort key)
A6 A4 A5
A1
(partition key)
A2
(sort key)
A3 A4 A5
Amazon DynamoDB 용어
© 2021, Amazon Web Services, Inc. or its Affiliates.
Amazon DynamoDB 고려 사항
테이블
• 서비스에 가급적이면 단일 테이블로 설계
• 효율적인 JOIN/QUERY 수행
• 효율적인 자원 Provisioning 및 Scaling
Primary Key ( Partition Key + Sort Key)
• 파티션 키는 데이터가 저장되는 논리적 파티션 결정
• 특정 파티션 키에 데이터 부하가 몰려서 성능 병목이 발생하지 않도록 데이터를 잘 분산 시킬
수 있는 설계가 중요
읽기 일관성
• 두가지 일관성 모델 : Eventual Consistency / Strong Consistency
• Eventual Consistency 시, 최신의 데이터를 반환하지 않을 가능성 존재
© 2021, Amazon Web Services, Inc. or its Affiliates.
클라우드 기반 인증 시스템
간단하고 안전한 사용자 가입 및 로그인
© 2021, Amazon Web Services, Inc. or its Affiliates.
웹 및 모바일 앱에 대한 간단한
사용자 등록, 로그인 및 액세스 제어
인증 시스템에 필요한
인프라 구성 및 관리
어플리케이션 및
사용자를 위한 고급
보안 기능 제공
표준 인증
프로토콜 지원
기존 계정 연동 혹은
클라우드 기반 인증
시스템 제공
Amazon Cognito 소개
© 2021, Amazon Web Services, Inc. or its Affiliates.
기본 UI 제공
SPA
Web
Android
iOS
오픈 표준 프로토콜 지원
SAML OAuth2 OIDC
각종 API 및 SDK 지원
AWS SDKs
Ionic
Vue
Angular
Node JS React
iOS Android
MFA
Compromised
Password DB
높은 보안 및 가용성
Adaptive
Auth
99.9% SLA
Google Facebook Amazon
타사 인증 시스템 연동을 위한
페더레이션 지원
Amazon Cognito
AWS 서비스에 대한
인증 및 권환 연동. 지원
AWS
Lambda
Amazon
ALB
Amazon
API
Gateway
AWS
AppSync
완전 관리형 애플리케이션 인증 서비스
© 2021, Amazon Web Services, Inc. or its Affiliates.
Amazon Cognito 고려 사항
서비스 제약 사항을 알자!
• Amazon Cognito를 포함해서 모든 서비스의 제약 사항 파악
• 유저 인증 관련 호출 수 제약은 초당 120 요청 처리 (Soft limit)
• 서포트 케이스를 통해 해당 계정의 Limit 증설 필요
• 서버리스 기반의 서비스/어플리케이션을 구성하는 경우, 꼭! 설계단계에서 Limit을 확인하자
• 하지만! 무한정으로 늘릴수는 없기 때문에 반드시 담당 AM/SA/TAM을 통해 컨설팅 필요
© 2021, Amazon Web Services, Inc. or its Affiliates.
Demo Session
© 2021, Amazon Web Services, Inc. or its Affiliates.
데모 아키텍처
AWS Cloud
Amazon Cognito
Amazon
API Gateway
Amazon SQ
S
Amazon DynamoDB
Client
Token
가입 & 로그인
registerPlayer
queuePlayer
processLogin
게임 접속 요청
Post-confirmation
Ticket
getStatus
대기 상태 확인
Game Server
게임 서버 접속
/login/status
/login
© 2021, Amazon Web Services, Inc. or its Affiliates.
Recipe and Estimate
(https://calculator.aws/#/)
Scenario) Live-demo Workflow
• 10만명의 유저(MAU) 가 30일 동안 매일 로그인 및 초당 1,000 유저 로그인 가정
(1회 인증 시, 4회 Amazon SQS 콜 실행)
• Amazon Cognito ( User Pool 사용, 50K MAU 프리티어 제공 : $275)
• Amazon SQS ( Standard 사용, 1M 요청 프리티어 제공 : $4.4)
• Amazon DynamoDB (Provisioned 사용, 25 GB 프리티어 제공 : $ 1,116.56)
• Total estimate : $1,396 (약 1,556,000)
© 2021, Amazon Web Services, Inc. or its Affiliates.
감사합니다

More Related Content

PDF
게임사를 위한 Amazon GameLift 세션 - 이정훈, AWS 솔루션즈 아키텍트
PDF
Gaming on AWS - 1. AWS로 글로벌 게임 런칭하기 - 장르별 아키텍처 중심
PDF
효과적인 NoSQL (Elasticahe / DynamoDB) 디자인 및 활용 방안 (최유정 & 최홍식, AWS 솔루션즈 아키텍트) :: ...
PDF
[2017 AWS Startup Day] AWS 비용 최대 90% 절감하기: 스팟 인스턴스 Deep-Dive
PDF
AWS 클라우드 기반 게임 아키텍처 사례 - AWS Summit Seoul 2017
PDF
쿠키런: 킹덤 대규모 인프라 및 서버 운영 사례 공유 [데브시스터즈 - 레벨 200] - 발표자: 용찬호, R&D 엔지니어, 데브시스터즈 ...
PDF
AWS로 게임 런칭 준비하기 ::: 장준성, 채민관, AWS Game Master 온라인 시리즈 #4
PDF
데브시스터즈 데이터 레이크 구축 이야기 : Data Lake architecture case study (박주홍 데이터 분석 및 인프라 팀...
게임사를 위한 Amazon GameLift 세션 - 이정훈, AWS 솔루션즈 아키텍트
Gaming on AWS - 1. AWS로 글로벌 게임 런칭하기 - 장르별 아키텍처 중심
효과적인 NoSQL (Elasticahe / DynamoDB) 디자인 및 활용 방안 (최유정 & 최홍식, AWS 솔루션즈 아키텍트) :: ...
[2017 AWS Startup Day] AWS 비용 최대 90% 절감하기: 스팟 인스턴스 Deep-Dive
AWS 클라우드 기반 게임 아키텍처 사례 - AWS Summit Seoul 2017
쿠키런: 킹덤 대규모 인프라 및 서버 운영 사례 공유 [데브시스터즈 - 레벨 200] - 발표자: 용찬호, R&D 엔지니어, 데브시스터즈 ...
AWS로 게임 런칭 준비하기 ::: 장준성, 채민관, AWS Game Master 온라인 시리즈 #4
데브시스터즈 데이터 레이크 구축 이야기 : Data Lake architecture case study (박주홍 데이터 분석 및 인프라 팀...

What's hot (20)

PDF
[Gaming on AWS] AWS와 함께 한 쿠키런 서버 Re-architecting 사례 - 데브시스터즈
PDF
Amazon OpenSearch Deep dive - 내부구조, 성능최적화 그리고 스케일링
PDF
[오픈소스컨설팅] 서비스 메쉬(Service mesh)
PPTX
AWS로 게임 기반 다지기 - 김병수, 박진성 :: AWS Game Master 온라인 세미나 #3
PDF
아마존의 관리형 게임 플랫폼 활용하기: GameLift (Deep Dive) :: 구승모 솔루션즈 아키텍트 :: Gaming on AWS ...
PDF
마이크로서비스 기반 클라우드 아키텍처 구성 모범 사례 - 윤석찬 (AWS 테크에반젤리스트)
PDF
Amazon EKS로 간단한 웹 애플리케이션 구축하기 - 김주영 (AWS) :: AWS Community Day Online 2021
PDF
Aws glue를 통한 손쉬운 데이터 전처리 작업하기
PDF
AWS CLOUD 2017 - AWS 기반 하이브리드 클라우드 환경 구성 전략 (김용우 솔루션즈 아키텍트)
PPTX
로그 기깔나게 잘 디자인하는 법
PDF
AWS와 부하테스트의 절묘한 만남 :: 김무현 솔루션즈 아키텍트 :: Gaming on AWS 2016
PDF
AWS Fargate on EKS 실전 사용하기
PDF
[오픈소스컨설팅] 스카우터 사용자 가이드 2020
PDF
데이터 분석가를 위한 신규 분석 서비스 - 김기영, AWS 분석 솔루션즈 아키텍트 / 변규현, 당근마켓 소프트웨어 엔지니어 :: AWS r...
PDF
오딘: 발할라 라이징 MMORPG의 성능 최적화 사례 공유 [카카오게임즈 - 레벨 300] - 발표자: 김문권, 팀장, 라이온하트 스튜디오...
PDF
Amazon RDS Proxy 집중 탐구 - 윤석찬 :: AWS Unboxing 온라인 세미나
PDF
대용량 데이터베이스의 클라우드 네이티브 DB로 전환 시 확인해야 하는 체크 포인트-김지훈, AWS Database Specialist SA...
PDF
[MLOps KR 행사] MLOps 춘추 전국 시대 정리(210605)
PDF
사례로 알아보는 Database Migration Service : 데이터베이스 및 데이터 이관, 통합, 분리, 분석의 도구 - 발표자: ...
PDF
게임서비스를 위한 ElastiCache 활용 전략 :: 구승모 솔루션즈 아키텍트 :: Gaming on AWS 2016
[Gaming on AWS] AWS와 함께 한 쿠키런 서버 Re-architecting 사례 - 데브시스터즈
Amazon OpenSearch Deep dive - 내부구조, 성능최적화 그리고 스케일링
[오픈소스컨설팅] 서비스 메쉬(Service mesh)
AWS로 게임 기반 다지기 - 김병수, 박진성 :: AWS Game Master 온라인 세미나 #3
아마존의 관리형 게임 플랫폼 활용하기: GameLift (Deep Dive) :: 구승모 솔루션즈 아키텍트 :: Gaming on AWS ...
마이크로서비스 기반 클라우드 아키텍처 구성 모범 사례 - 윤석찬 (AWS 테크에반젤리스트)
Amazon EKS로 간단한 웹 애플리케이션 구축하기 - 김주영 (AWS) :: AWS Community Day Online 2021
Aws glue를 통한 손쉬운 데이터 전처리 작업하기
AWS CLOUD 2017 - AWS 기반 하이브리드 클라우드 환경 구성 전략 (김용우 솔루션즈 아키텍트)
로그 기깔나게 잘 디자인하는 법
AWS와 부하테스트의 절묘한 만남 :: 김무현 솔루션즈 아키텍트 :: Gaming on AWS 2016
AWS Fargate on EKS 실전 사용하기
[오픈소스컨설팅] 스카우터 사용자 가이드 2020
데이터 분석가를 위한 신규 분석 서비스 - 김기영, AWS 분석 솔루션즈 아키텍트 / 변규현, 당근마켓 소프트웨어 엔지니어 :: AWS r...
오딘: 발할라 라이징 MMORPG의 성능 최적화 사례 공유 [카카오게임즈 - 레벨 300] - 발표자: 김문권, 팀장, 라이온하트 스튜디오...
Amazon RDS Proxy 집중 탐구 - 윤석찬 :: AWS Unboxing 온라인 세미나
대용량 데이터베이스의 클라우드 네이티브 DB로 전환 시 확인해야 하는 체크 포인트-김지훈, AWS Database Specialist SA...
[MLOps KR 행사] MLOps 춘추 전국 시대 정리(210605)
사례로 알아보는 Database Migration Service : 데이터베이스 및 데이터 이관, 통합, 분리, 분석의 도구 - 발표자: ...
게임서비스를 위한 ElastiCache 활용 전략 :: 구승모 솔루션즈 아키텍트 :: Gaming on AWS 2016
Ad

Similar to AWS로 게임의 공통 기능 개발하기! - 채민관, 김민석, 한준식 :: AWS Game Master 온라인 세미나 #2 (20)

PDF
간단한 게임을 쉽고 저렴하게 서비스해보자! ::: AWS Game Master 온라인 시리즈 #1
PDF
AWS를 활용해서 글로벌 게임 런칭하기 - 박진성 AWS 솔루션즈 아키텍트 :: AWS Summit Seoul 2021
PDF
AWS 클라우드 기반 나의 첫 웹 애플리케이션 만들기 – 윤석찬 :: AWS Builders Online Series
PDF
7. 게임 스트리밍 서비스를 위한 아키텍처 - 언리얼 엔진을 중심으로! [레벨 300] - 발표자: 하흥수, 솔루션즈 아키텍트, AWS :...
PDF
2021년, 위기를 기회로 만든 미디어 & 엔터테인먼트의 메가트렌드와 글로벌 혁신사례 - 이봉무 AWS 미디어 사업개발 담당 :: AWS ...
PDF
AWS Builders Industry edition : 개발자커리어 점프 플랫폼, 점핏
PDF
Datadog을 활용한 Elastic Kubernetes Service(EKS)에서의 마이크로서비스 통합 가시성 - 정영석 시니어 세일즈 ...
PDF
Monolith to Microservices: 클라우드 네이티브 어플리케이션 설계 - 정영준 :: AWS 클라우드 마이그레이션 온라인
PDF
AWS Summit Seoul 2023 | AWS의 개발자를 위한 신규 서비스 소개 Amazon CodeCatalyst & Amazon C...
PDF
AWS 기반 Kubernetes 정복하기::정영준:: AWS Summit Seoul 2018
PDF
웹 3.0 시대에서의 블록체인, 메타버스 및 대체불가 토큰(NFT) on AWS 사례 공유 [레벨 200] - 발표자: 이이구, CTO, ...
PDF
미디어 서비스 소개와 오퍼링을 활용한 언택트 극복 사례 - 정진호 미디어데이터 서비스 팀 매니저, 메가존 클라우드 :: AWS Summit...
PDF
데브옵스 엔지니어를 위한 신규 운영 서비스 - 김필중, AWS 개발 전문 솔루션즈 아키텍트 / 김현민, 메가존클라우드 솔루션즈 아키텍트 :...
PDF
[Games on AWS 2019] AWS 사용자를 위한 만랩 달성 트랙 | AWS 최적화 사용을 위해 운영자가 아닌 개발자들이 해야 할 ...
PDF
AWS상에서 블록체인 서비스 구축 및 활용가이드 대방출! - 박천구 솔루션즈 아키텍트, AWS / 오재훈 이사, 두나무 :: AWS Sum...
PDF
[APN Specialty Partner Webinar Series] TechData와 Siemens편
PDF
통신사의 차별화된 메시징 서비스 아키텍처를 소개합니다 - 정영준 AWS 솔루션즈 아키텍트 / 강성원, 나상화 소프트웨어 엔지니어 무선사업부...
PDF
No-code로 성공적인 디지털 트랜스포메이션을 위한 서버리스 마이크로서비스 만들기 - 이호규 CTO, NTUPLE :: AWS Summi...
PDF
[AWS Builders] AWS 네트워크 서비스 소개 및 사용 방법 - 김기현, AWS 솔루션즈 아키텍트
PDF
On-Premise 기반서비스 클라우드 전환기 -DevSecOps 도입을통한 유연한 서비스 개발 및 운영::박준상::AWS Summit S...
간단한 게임을 쉽고 저렴하게 서비스해보자! ::: AWS Game Master 온라인 시리즈 #1
AWS를 활용해서 글로벌 게임 런칭하기 - 박진성 AWS 솔루션즈 아키텍트 :: AWS Summit Seoul 2021
AWS 클라우드 기반 나의 첫 웹 애플리케이션 만들기 – 윤석찬 :: AWS Builders Online Series
7. 게임 스트리밍 서비스를 위한 아키텍처 - 언리얼 엔진을 중심으로! [레벨 300] - 발표자: 하흥수, 솔루션즈 아키텍트, AWS :...
2021년, 위기를 기회로 만든 미디어 & 엔터테인먼트의 메가트렌드와 글로벌 혁신사례 - 이봉무 AWS 미디어 사업개발 담당 :: AWS ...
AWS Builders Industry edition : 개발자커리어 점프 플랫폼, 점핏
Datadog을 활용한 Elastic Kubernetes Service(EKS)에서의 마이크로서비스 통합 가시성 - 정영석 시니어 세일즈 ...
Monolith to Microservices: 클라우드 네이티브 어플리케이션 설계 - 정영준 :: AWS 클라우드 마이그레이션 온라인
AWS Summit Seoul 2023 | AWS의 개발자를 위한 신규 서비스 소개 Amazon CodeCatalyst & Amazon C...
AWS 기반 Kubernetes 정복하기::정영준:: AWS Summit Seoul 2018
웹 3.0 시대에서의 블록체인, 메타버스 및 대체불가 토큰(NFT) on AWS 사례 공유 [레벨 200] - 발표자: 이이구, CTO, ...
미디어 서비스 소개와 오퍼링을 활용한 언택트 극복 사례 - 정진호 미디어데이터 서비스 팀 매니저, 메가존 클라우드 :: AWS Summit...
데브옵스 엔지니어를 위한 신규 운영 서비스 - 김필중, AWS 개발 전문 솔루션즈 아키텍트 / 김현민, 메가존클라우드 솔루션즈 아키텍트 :...
[Games on AWS 2019] AWS 사용자를 위한 만랩 달성 트랙 | AWS 최적화 사용을 위해 운영자가 아닌 개발자들이 해야 할 ...
AWS상에서 블록체인 서비스 구축 및 활용가이드 대방출! - 박천구 솔루션즈 아키텍트, AWS / 오재훈 이사, 두나무 :: AWS Sum...
[APN Specialty Partner Webinar Series] TechData와 Siemens편
통신사의 차별화된 메시징 서비스 아키텍처를 소개합니다 - 정영준 AWS 솔루션즈 아키텍트 / 강성원, 나상화 소프트웨어 엔지니어 무선사업부...
No-code로 성공적인 디지털 트랜스포메이션을 위한 서버리스 마이크로서비스 만들기 - 이호규 CTO, NTUPLE :: AWS Summi...
[AWS Builders] AWS 네트워크 서비스 소개 및 사용 방법 - 김기현, AWS 솔루션즈 아키텍트
On-Premise 기반서비스 클라우드 전환기 -DevSecOps 도입을통한 유연한 서비스 개발 및 운영::박준상::AWS Summit S...
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
[D3T2S01] Amazon Aurora MySQL 메이저 버전 업그레이드 및 Amazon B/G Deployments 실습
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
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
[D3T2S01] Amazon Aurora MySQL 메이저 버전 업그레이드 및 Amazon B/G Deployments 실습
[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
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...

AWS로 게임의 공통 기능 개발하기! - 채민관, 김민석, 한준식 :: AWS Game Master 온라인 세미나 #2

  • 1. © 2021, Amazon Web Services, Inc. or its Affiliates. AWS Korea Game Tech Apr. 2021 Series #2. AWS로 게임의 공통기능 개발하기
  • 2. © 2021, Amazon Web Services, Inc. or its Affiliates. Speakers AWS Game Master Online 2021 Game Tech Solution Architect Game Tech Territory Manager(Sales) 최문석 한준식 박진성 채민관 구성완 김민석
  • 3. © 2021, Amazon Web Services, Inc. or its Affiliates. Contents • AWS Game Master Online 2021 소개 • Why AWS? • Series #2. AWS로 게임의 공통 기능 개발 하기 • 1부: 게임 채팅을 AWS에서 구현해보자! Amazon Elasticache, AWS Lambda, AWS IoT-Core Recipe & Estimate • 2부: AWS에서 대규모 로그인과 접속 대기열을 구현해보자! Amazon SQS, Amazon Cognito, AWS DynamoDB Recipe & Estimate
  • 4. © 2021, Amazon Web Services, Inc. or its Affiliates. AWS Game Master Online We are with Game Studio!
  • 5. © 2021, Amazon Web Services, Inc. or its Affiliates. AWS Game Master Online 2021 2021년 총 5개의 Episode로 이루어진 장기 프로젝트 https://pages.awscloud.com/game-master-online
  • 6. © 2021, Amazon Web Services, Inc. or its Affiliates. AWS Game Master Online 2021 Game Life Cycle 게임 개발 시작 단계부터 분석 단계까지 개발 과정에 초점을 맞춘 온라인 시리즈 Easy to Learn AWS 초급자도 쉽게 이해할 수 있는 기초수준의 내용 Live Demo AWS 서비스 활용 방안 소개 후 라이브 데모 진행 Recipe and Estimate 라이브 데모 시 실제 발생 될 예상 요금 공개 Live Q&A 채팅창을 통한 실시간 Q&A
  • 7. © 2021, Amazon Web Services, Inc. or its Affiliates. AWS Game Master Heroes • 선정 기준 o 총 4회 이상 참석한 고객 (설문조사 기반) o Game Master Online을 통해 실제 AWS 서비스를 도입한 고객 o 2021년 11월 최종 선정 예정 • 혜택 o AWS Game Tech Gift Box 증정 o AWS 정규 교육과정 및 Certification 취득 시험 지원
  • 8. © 2021, Amazon Web Services, Inc. or its Affiliates. Meet The Expert 검색 Keyword: AWS MTE
  • 9. © 2021, Amazon Web Services, Inc. or its Affiliates. AWS Game Tech Program
  • 10. © 2021, Amazon Web Services, Inc. or its Affiliates. AWS Game Tech Program • AWS로 출시 예정인 게임이 있다면? ► Game Tech PoC • 타 클라우드, IDC를 사용하고 있다면? ► Game Migration Program • 기존 AWS 인프라를 최적화하고 싶다면? ► Well-Architected Review (WAR) • VC/Accelerate 투자 이력이 있다면? ► Activate Program • 신규로 AWS를 사용해보고 싶다면? ► Activate Founders aws-gaming-korea@amazon.com 로 연락 주세요!
  • 11. © 2021, Amazon Web Services, Inc. or its Affiliates. 1부: 대규모 게임 채팅을 AWS에서 구현해보자! Amazon API Gateway, AWS Lambda, AWS IoT Core AWS Solutions Architect 채민관
  • 12. © 2021, Amazon Web Services, Inc. or its Affiliates. 진행 순서 1. 대규모 채팅서버 -왜, 언제 필요한가 2.마이크로서비스 아키텍처 -적용사례 -Amazon API Gateway 3.서버리스 -AWS Lambda 4.채팅서비스 아키텍처 -마이크로 서비스 + 메시지 브로커 활용 -AWS IoT Core 아키텍처 5.시연 -채팅 기본 기능 시연 -대규모(10만유저 산정) 부하 테스트 시연
  • 13. © 2021, Amazon Web Services, Inc. or its Affiliates. 오늘의 미션 -대규모 채팅서버 만들기
  • 14. © 2021, Amazon Web Services, Inc. or its Affiliates. MMORPG https://aws.amazon.com/ko/solutions/case- studies/npixel/?fbclid=IwAR07kfCOUQnZPmBSlMAgSB1nhXg3yV14ak7atxbw_0jF8nYUH5DL-qIuIq8
  • 15. © 2021, Amazon Web Services, Inc. or its Affiliates. 수많은 컨텐츠… 로그인, 대기열, 패치, 이벤트, 출석, 파티, 길드, 우편, 상점, 펫, 도감, 업적, 전투, 아이템, 강화, 퀘스트, 채널, 채팅…
  • 16. © 2021, Amazon Web Services, Inc. or its Affiliates. 좀 더 쉽게 MMORPG 핵심 컨텐츠 개발 완료, -> 채팅, 로그인 같은 중복 시스템은 클라우드에서 쉽고 빠르게 만들 수 없을까?
  • 17. © 2021, Amazon Web Services, Inc. or its Affiliates. 목표 설정! 1. 게임 내 모든 월드의 통합 채팅 서버 2. 손쉬운 채널링, 10만+ 사용자, 1만+ 메시지/초 확장가능한 시스템 3. 지난 대화보기, 악성 사용자/단어 차단… 필수 기능 구현 4. 모든 대화를 로깅하고 추적할 수 있는 시스템
  • 18. © 2021, Amazon Web Services, Inc. or its Affiliates. 마이크로서비스 아키텍처 (Micro Service)
  • 19. © 2021, Amazon Web Services, Inc. or its Affiliates. MSA란? 마이크로서비스는 API를 통해 통신하는 소규모의 독립적인 서비스로 구성되어 있는 경우의 소프트웨어 개발을 위한 아키텍처 및 조직적 접근 방식. https://aws.amazon.com/ko/microservices/
  • 20. © 2021, Amazon Web Services, Inc. or its Affiliates. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. 다른 서비스의 내부 구조를 알지 못해도, 내 서비스 코드를 업데이트 할 수 있다. 서비스들이 네트워크를 통해 서로 통신한다. 서비스는 독자적으로 업데이트 개선되며, 서로 영향을 주지 않는다. “service-oriented architecture composed of loosely coupled elements that have bounded contexts” Adrian Cockcroft (VP of Cloud Architecture @ AWS) MSA란?
  • 21. © 2021, Amazon Web Services, Inc. or its Affiliates. 장단점 확장에 유연. 손쉬운 배포. 재사용 가능. 하지만, 서비스간 통신 비용이 크다. 아키텍처가 복잡하다.
  • 22. © 2021, Amazon Web Services, Inc. or its Affiliates. 게임 서비스에 적용해보면 캐릭터, 전투,퀘스트 로그인,출석,보상 채팅,상점 캐릭터, 전투,퀘스트 로그인 채팅 상점 보상
  • 23. © 2021, Amazon Web Services, Inc. or its Affiliates. 클라우드로! 캐릭터, 전투,퀘스트 로그인 채팅 상점 보상 Amazon SQS Amazon ElastiCache Amazon API Gateway Amazon API Gateway AWS Lambda AWS Lambda
  • 24. © 2021, Amazon Web Services, Inc. or its Affiliates. 서버리스
  • 25. © 2021, Amazon Web Services, Inc. or its Affiliates. 서버리스? 1. 서버를 고려하지 않고, 애플리케이션을 구축하고 실행해주는 서비스. 용량 프로비저닝, 패치, 인프라관리, Auto Scaling, 고가용성을 내장한 완전관리형. 사용한만큼 비용 청구 AWS Lambda AWS Fargate Amazon EventBridge AWS Step Functions Amazon API Gateway Amazon S3 Amazon DynamoDB
  • 26. © 2021, Amazon Web Services, Inc. or its Affiliates. MSA와 서버리스 1. 모듈식 독립형 구성요소인 마이크로 서비스로 애플리케이션을 구축하면 변경이 쉽기 때문에 새 기능의 출시 속도가 빨라짐. 2. 계속 변화하는 마이크로 서비스를 서버리스로 구현하면 환경 설정과 운영의 부담에서 벗어날 수 있고, 확장과 비용 관리에 유리함. 3. 마이크로 서비스의 완성, 현대식 어플리케이션 https://aws.amazon.com/ko/modern-apps/
  • 27. © 2021, Amazon Web Services, Inc. or its Affiliates. 서버리스의 꽃! AWS Lambda 1. 서버 준비없이 코드를 실행할 수 있는 서버리스 컴퓨팅 서비스 2. Node.js, Python, Ruby, Java, Go, C#, Powershell 지원 AWS Lambda
  • 28. © 2021, Amazon Web Services, Inc. or its Affiliates. 채팅 서비스
  • 29. © 2021, Amazon Web Services, Inc. or its Affiliates. 채팅 AWS IoT Core IoT Chat-Client IoT Chat-Client AWS Lambda pub/World/Server/Town137 sub/World/Client/Town137 pub/World/Client/Town137 sub/World/Server/Town137
  • 30. © 2021, Amazon Web Services, Inc. or its Affiliates. AWS IoT Core 1. IoT(사물인터넷) 지원 2. 메시지 브로커, MQTT 지원 3. 수십억 개의 디바이스, 수조 개의 메시지 4. 완전 관리형, 서버리스 서비스 AWS IoT Core
  • 31. © 2021, Amazon Web Services, Inc. or its Affiliates. 채팅 AWS IoT Core IoT Chat-Client IoT Chat-Client AWS Lambda pub/World/Server/Town137 sub/World/Client/Town137 pub/World/Client/Town137 sub/World/Server/Town137
  • 32. © 2021, Amazon Web Services, Inc. or its Affiliates. 지난대화 보기, 악성단어 필터링, 유저차단… AWS IoT Core IoT Chat-Client IoT Chat-Client AWS Lambda AWS Lambda Amazon API Gateway Amazon ElastiCache Amazon DynamoDB A Request user data. After login… B Ban user. After fight… C Request channel data. After join… C Get messages for last some A Get/set user data B send channel messages
  • 33. © 2021, Amazon Web Services, Inc. or its Affiliates. 로깅과 모니터링 AWS IoT Core IoT Chat-Client IoT Chat-Client AWS Lambda AWS Lambda Amazon API Gateway Amazon ElastiCache Amazon DynamoDB Amazon Kinesis Data Firehose Amazon QuickSight Amazon S3 Amazon Athena Administrator report!
  • 34. © 2021, Amazon Web Services, Inc. or its Affiliates. 아키텍처 제안 AWS IoT Core IoT Chat-Client IoT Chat-Client AWS Lambda AWS Lambda Amazon API Gateway Amazon ElastiCache Amazon DynamoDB Amazon Kinesis Data Firehose Amazon QuickSight Amazon S3 Amazon Athena Administrator Amazon Cognito AWS X-Ray Amazon CloudWatch pub/World/Server/Town137 sub/World/Client/Town137 pub/World/Client/Town137 sub/World/Server/Town137 report! A Request user data. After login… B Ban user. After fight… C Request channel data. After join… C Get messages for last some A Get/set user data B D Block user. After check recorded messages… D Update user’s authority send channel messages
  • 35. © 2021, Amazon Web Services, Inc. or its Affiliates. 채팅 기능 시연
  • 36. © 2021, Amazon Web Services, Inc. or its Affiliates. Chatting UI Demo 1. AWS Python SDK + QT UI 2. 채널 이동, 채팅(-t 채널명) 3. 지난 대화보기(재접속시 최근 30초) 4. 악성 단어 차단(*******) 5. 악성 사용자 차단 기능(/ban XXX)
  • 37. © 2021, Amazon Web Services, Inc. or its Affiliates. 대규모 부하 테스트
  • 38. © 2021, Amazon Web Services, Inc. or its Affiliates. Bot test 1. AWS Python SDK + bash 2. EC2 (c5n.2xlarge 8core, 32G) 2대에서 각각 500 개 클라이언트 접속 3. 100개 채널 랜덤 조인 4. 0~3초 사이에 메세지 1개씩 전송
  • 39. © 2021, Amazon Web Services, Inc. or its Affiliates. Monitoring 1. Cloud Watch! 2. X-Ray
  • 40. © 2021, Amazon Web Services, Inc. or its Affiliates. Demo Session
  • 41. © 2021, Amazon Web Services, Inc. or its Affiliates. Summary 1. 게임 내 모든 월드의 통합 채팅 서버 … OK! 2. 손쉬운 채널링, 10만+ 사용자, 1만+ 메시지/초 확장가능한 시스템 … OK! 3. 지난 대화보기, 악성 사용자/단어 차단… 필수 기능 구현… OK! 4. 모든 대화를 로깅하고 추적할 수 있는 시스템…. OK! On Cloud!
  • 42. © 2021, Amazon Web Services, Inc. or its Affiliates. Recipe & Estimate
  • 43. © 2021, Amazon Web Services, Inc. or its Affiliates. Recipe and Estimate (https://calculator.aws/#/) Scenario) Live-demo Workflow • 10만명의 유저가 30일 동안 접속을 유지하면서 지속적으로 채팅한다고 가정. (유저당 5000개의 메시지 * 10만명 = 5억개) • IoT Core (Connection : $87, RulesEngine :$150, Message : $500) : $737 • Lambda (50ms, 128MB x 5억) : $150, ElastiCache (r5.large) : $189 • Kinesis (1KB x 5억: $90) , S3 ( 500GB : $12) , Athena ( 500GB, 주1회 : $10) • Total estimate : $1188 (약 1,310,000)
  • 44. © 2021, Amazon Web Services, Inc. or its Affiliates. 2부: AWS에서 대규모 로그인과 접속 대기열을 구현해보자! Amazon SQS, Amazon Cognito, AWS DynamoDB AWS Solutions Architect 김민석
  • 45. © 2021, Amazon Web Services, Inc. or its Affiliates. 게임 서비스를 위한 서버의 종류 멀티플레이 게임 서버 게임 지원을 위한 보조 서버 운영 및 관리를 위한 서버 개발, 테스트, 빌드를 위한 서버 • 게임 플레이를 서버 레벨에서 검증하거나 게임 로직을 구현하는 형태 • 주로 채팅, 랭킹, 로그인, 이벤트 등 아웃 게임 기능 구현을 위한 서버 • 개발, 빌드 및 테스트 지원을 위한 서버 • 클린 빌드나 서버 일괄 배포 등에 사용 • 게임의 각종 지표 및 운영 데이터 관리를 위한 서버 • 주로 웹 어드민 형태
  • 46. © 2021, Amazon Web Services, Inc. or its Affiliates. 오늘의 관전 포인트 다룰 주제 • 게임 대기열 구성 요소 • AWS 서버리스 서비스 • 메시지 서비스 (Amazon SQS, Amazon SNS) • NoSQL 데이터베이스 (Amazon DynamoDB) • 클라우드 기반 인증 서비스 (Amazon Cognito 맛보기) 다루지 않는 주제 • AWS Lambda 및 Amazon API Gateway
  • 47. © 2021, Amazon Web Services, Inc. or its Affiliates. 최초 게임 접속 시, 가장 처음 경험하는 것은?
  • 48. © 2021, Amazon Web Services, Inc. or its Affiliates. 게임 대기열 구성 요소 대기열 구현을 위해 어떤 요소가 필요할까?
  • 49. © 2021, Amazon Web Services, Inc. or its Affiliates. 대기열 구성에 필요한 요소들 비동기 처리를 위한 메시징 서비스 메시지 처리에 필요한 컴퓨팅 로그인 처리 상태 저장소
  • 50. © 2021, Amazon Web Services, Inc. or its Affiliates. 메시징 서비스 생산자 소비자 Pub/Sub 대기열 스트림 메시지 브로커
  • 51. © 2021, Amazon Web Services, Inc. or its Affiliates. AWS에서 제공하는 관리형 메시징 서비스 Amazon SNS Amazon SQS Amazon Kinesis Amazon MQ 토픽 큐 스트림 메시지 브로커 서버리스 간단한 API 유연한 확장 API 호환 다양한 기능 표준 프로토콜 클라우드 네이티브 어플리케이션 마이그레이션 * 위 서비스는 메시지 서비스로 활용될 수 있는 AWS 서비스들 중 일부만 설명하고 있습니다.
  • 52. © 2021, Amazon Web Services, Inc. or its Affiliates. AWS 관리형 메시지 서비스 비교 Amazon SQS Amazon SNS Amazon Kinesis Data Streams Amazon MQ 인프라 서버리스 서버리스 서버리스 매니지드(EC2) 메시지 순서 보장 Best-effort/FIFO Best-effort/FIFO 정렬(샤드 단위) 정렬 메시지 전송 최소 한번 / 정확히 한번(FIFO) 최소 한번 / 정확히 한번(FIFO) 정확히 한번 정확히 한번 메시지 최대 크기 256KB 256KB 1MB RabbitMQ – 2GB 프로토콜 REST REST REST JMS, AMQP, MQTT, STOMP
  • 53. © 2021, Amazon Web Services, Inc. or its Affiliates. 서버리스 메시징 내 시나리오에 맞는 AWS 서비스 어떤 것들이 있을까?
  • 54. © 2021, Amazon Web Services, Inc. or its Affiliates. 대기열 구성에 참고할 수 있는 AWS 서버리스 옵션들 Amazon SQS AWS Lambda Amazon DynamoDB 마이크로 서비스, 분산 시스템 및 서버리스 어플리케이션을 위한 완전관리형 메시징 서비스 이벤트에 대한 응답으로 코드를 실행하고 자동으로 컴퓨팅 리소스를 관리하는 서버리스 컴퓨팅 서비스 어떤 규모에서든 빠른 성능 및 유연한 확장성을 제공하는 완전관리형 관계형 및 NoSQL 데이터베이스 서비스
  • 55. © 2021, Amazon Web Services, Inc. or its Affiliates. 참고 아키텍처는? AWS Cloud Amazon Cognito Amazon API Gateway Amazon SQ S Amazon DynamoDB Client Token 가입 & 로그인 registerPlayer queuePlayer processLogin 게임 접속 요청 Post-confirmation Ticket getStatus 대기 상태 확인 Game Server 게임 서버 접속 /login/status /login
  • 56. © 2021, Amazon Web Services, Inc. or its Affiliates. Amazon Simple Queue Service (SQS) 메시지 Amazon SQS queue • 메시지 대기열 • Pull 방식 (Polling 모델) • 메시지 배치 처리 지원 • 메시지 처리 방식 : At-least once, exactly once • 메시지 제한 시간을 통한 오류 처리 기능 • AWS Lambda는 long poll 방식으로 메시지 확인
  • 57. © 2021, Amazon Web Services, Inc. or its Affiliates. Amazon Simple Notification Service (SNS) • Publish / Subscribe 메시징 • Push 방식 • 여러 구독자를 관리하는 토픽에 메시지 게시 • 필터를 이용하여 특정 구독자에게만 메시지 전송 • 다양한 전송 프로토콜 지원 : HTTP(s), 이메일, Amazon SQS, Lambda, SMS, 모바일 푸시 SNS topic Data
  • 58. © 2021, Amazon Web Services, Inc. or its Affiliates. Amazon SQS Standard : 간단하게 대용량의 메시지 처리 생산자 생산자 소비자 B 네트워크 이슈 등에 의한 메시지 중복 가능성 Retry B A 소비자
  • 59. © 2021, Amazon Web Services, Inc. or its Affiliates. Amazon SQS Standard : 간단하게 대용량의 메시지 처리 생산자 생산자 소비자 소비자 소비자
  • 60. © 2021, Amazon Web Services, Inc. or its Affiliates. Amazon SQS FIFO : 순서가 중요해! 생산자 생산자 소비자 G1 G2 G3 소비자 소비자
  • 61. © 2021, Amazon Web Services, Inc. or its Affiliates. 잠깐, 그럼 Amazon Simple Notification Service (SNS)는요? Message Queue Amazon SQS Amazon SNS Amazon Aurora Amazon Dynamo DB Amazon SNS 와 Amazon SQS 를 활용하여 메시지 리플레이, Fan-out 파이프라인 등과 같은 다양한 시나리오로 활용 가능
  • 62. © 2021, Amazon Web Services, Inc. or its Affiliates. 이벤트 기반의 서버리스 메시징 이벤트가 발생했을 때에만 동작!
  • 63. © 2021, Amazon Web Services, Inc. or its Affiliates. Lambda 호출 모델 Lambda function Amazon SNS Amazon S3 reqs Lambda function Event 비동기 /order Amazon API Gateway Lambda function Event 동기 Amazon SQS Amazon Kinesis Changes AWS Lambda service Event 폴링
  • 64. © 2021, Amazon Web Services, Inc. or its Affiliates. 서버리스 메시지 처리 흐름 1. 메시지를 큐에 전송 2. Lambda는 큐를 폴링하며 함수를 호출 3. 메시지 처리가 정상적으로 수행 생산자 소비자 Function instance 메시지 3. Lambda 에서 해당 메시지를 큐에서 삭제 Amazon DynamoDB
  • 65. © 2021, Amazon Web Services, Inc. or its Affiliates. Lambda에서는 어떻게 Amazon SQS 메시지를 처리할까? 메시지 전송 AWS Lambda Function instance Poller Function instance A Long poll B C D Function instance
  • 66. © 2021, Amazon Web Services, Inc. or its Affiliates. B C D Lambda에서 메시지를 배치 처리 지원 AWS Lambda Function instance Poller Function instance A 메시지 전송 Long poll 람다 함수 1회 호출 B C D A
  • 67. © 2021, Amazon Web Services, Inc. or its Affiliates. Lambda에서 메시지를 배치 처리 AWS Lambda Function instance Poller Function instance 메시지 전송 Long poll 람다 함수 1회 호출 B C D A A ReceiveCount=2
  • 68. © 2021, Amazon Web Services, Inc. or its Affiliates. Lambda의 확장은 어떻게 이루어질까? AWS Lambda Function instance Poller Function instance Function instance • Poller 는 5개의 배치를 읽어와서 배치 별로 람다 호출 • 처리되지 않은 메시지가 큐에 남아 있는 경우, 분당 최대 60개 배치 씩 추가 • 최대 1,000개 배치/호출 지원 • 총 10,000 건 메시지 동시 처리 가능 (1 배치 = 최대 10 메시지) • Reserved Concurrency 로 동시 처리 배치/호출 조절 배치별 람다 함수 1회 호출
  • 69. © 2021, Amazon Web Services, Inc. or its Affiliates. Amazon SQS 에서 Lambda 를 호출할때 알아두면 좋은 팁! 큐 구성 • 가시성 제한 시간(Visibility timeout) > Lambda 함수 타임 아웃 시간 Lambda 함수 구성 • API 호출 비용 절감 및 성능을 위해서 배치 처리 기능(batch size > 1) 활용 • 에러 발생 시, 고민이 필요한 설계 (고려해볼 수 있는 사항들) 1. 같은 메시지에 대한 동일 결과 반환할 수 있는 로직 2. 배치 메시지 처리시, 성공적으로 처리된 메시지는 직접 삭제
  • 70. © 2021, Amazon Web Services, Inc. or its Affiliates. 클라우드 네이티브 데이터베이스 인프라 걱정없이, 서비스 중단 걱정 없이
  • 71. © 2021, Amazon Web Services, Inc. or its Affiliates. 게임을 위한 AWS 데이터베이스 서비스 Amazon Aurora Amazon DynamoDB 플레이어 프로파일 플레이어 매칭 리더보드 사용자 인증 계정 정보 전자 상거래 및 결제 메시징 플레이어 인벤토리 사용 예시 고객 사례  클라우드 환경에 최적화된 분산 저장 아키텍처  가용성 및 보안성  유연한 확장 및 성능  완전 관리형 서비스
  • 72. © 2021, Amazon Web Services, Inc. or its Affiliates. 관리 공수가 들어가는 데이터베이스 관리 작업 자동화를 통해… 자동 페일오버 백업 및 복구 보안 및 격리성 컴플라이언스 편리한 확장성 자동 패치 모니터링 유지 보수 사용자 AWS 스키마 설계 쿼리 작성 쿼리 최적화 완전 관리형 서비스 … 사용자가 데이터 모델링에 집중할 수 있도록 해줍니다.
  • 73. © 2021, Amazon Web Services, Inc. or its Affiliates. Amazon DynamoDB 소개 도큐먼트 및 키-값 서버리스 완전 관리형 NoSQL 접근 제어 이벤트 기반 프로그래밍 빠르고 일관적인 성능
  • 74. © 2021, Amazon Web Services, Inc. or its Affiliates. Server 1 T1.p1 Table 1 Table 2 Table 3 Server N T1.pn 1K WCU* or 3K RCU** up to 10 GB DynamoDB 가 자동으로 데이터를 파티셔닝하여 저장 * Write Capacity Unit ** Read Capacity Unit 사용자는 테이블만 정의하면 끝
  • 75. © 2021, Amazon Web Services, Inc. or its Affiliates. 파티션 키 A1 (partition key) A2 (sort key) 정렬 키 테이블 아이템 A1 (partition key) A2 (sort key) A3 A4 A7 A1 (partition key) A2 (sort key) A6 A4 A5 A1 (partition key) A2 (sort key) A3 A4 A5 Amazon DynamoDB 용어
  • 76. © 2021, Amazon Web Services, Inc. or its Affiliates. Amazon DynamoDB 고려 사항 테이블 • 서비스에 가급적이면 단일 테이블로 설계 • 효율적인 JOIN/QUERY 수행 • 효율적인 자원 Provisioning 및 Scaling Primary Key ( Partition Key + Sort Key) • 파티션 키는 데이터가 저장되는 논리적 파티션 결정 • 특정 파티션 키에 데이터 부하가 몰려서 성능 병목이 발생하지 않도록 데이터를 잘 분산 시킬 수 있는 설계가 중요 읽기 일관성 • 두가지 일관성 모델 : Eventual Consistency / Strong Consistency • Eventual Consistency 시, 최신의 데이터를 반환하지 않을 가능성 존재
  • 77. © 2021, Amazon Web Services, Inc. or its Affiliates. 클라우드 기반 인증 시스템 간단하고 안전한 사용자 가입 및 로그인
  • 78. © 2021, Amazon Web Services, Inc. or its Affiliates. 웹 및 모바일 앱에 대한 간단한 사용자 등록, 로그인 및 액세스 제어 인증 시스템에 필요한 인프라 구성 및 관리 어플리케이션 및 사용자를 위한 고급 보안 기능 제공 표준 인증 프로토콜 지원 기존 계정 연동 혹은 클라우드 기반 인증 시스템 제공 Amazon Cognito 소개
  • 79. © 2021, Amazon Web Services, Inc. or its Affiliates. 기본 UI 제공 SPA Web Android iOS 오픈 표준 프로토콜 지원 SAML OAuth2 OIDC 각종 API 및 SDK 지원 AWS SDKs Ionic Vue Angular Node JS React iOS Android MFA Compromised Password DB 높은 보안 및 가용성 Adaptive Auth 99.9% SLA Google Facebook Amazon 타사 인증 시스템 연동을 위한 페더레이션 지원 Amazon Cognito AWS 서비스에 대한 인증 및 권환 연동. 지원 AWS Lambda Amazon ALB Amazon API Gateway AWS AppSync 완전 관리형 애플리케이션 인증 서비스
  • 80. © 2021, Amazon Web Services, Inc. or its Affiliates. Amazon Cognito 고려 사항 서비스 제약 사항을 알자! • Amazon Cognito를 포함해서 모든 서비스의 제약 사항 파악 • 유저 인증 관련 호출 수 제약은 초당 120 요청 처리 (Soft limit) • 서포트 케이스를 통해 해당 계정의 Limit 증설 필요 • 서버리스 기반의 서비스/어플리케이션을 구성하는 경우, 꼭! 설계단계에서 Limit을 확인하자 • 하지만! 무한정으로 늘릴수는 없기 때문에 반드시 담당 AM/SA/TAM을 통해 컨설팅 필요
  • 81. © 2021, Amazon Web Services, Inc. or its Affiliates. Demo Session
  • 82. © 2021, Amazon Web Services, Inc. or its Affiliates. 데모 아키텍처 AWS Cloud Amazon Cognito Amazon API Gateway Amazon SQ S Amazon DynamoDB Client Token 가입 & 로그인 registerPlayer queuePlayer processLogin 게임 접속 요청 Post-confirmation Ticket getStatus 대기 상태 확인 Game Server 게임 서버 접속 /login/status /login
  • 83. © 2021, Amazon Web Services, Inc. or its Affiliates. Recipe and Estimate (https://calculator.aws/#/) Scenario) Live-demo Workflow • 10만명의 유저(MAU) 가 30일 동안 매일 로그인 및 초당 1,000 유저 로그인 가정 (1회 인증 시, 4회 Amazon SQS 콜 실행) • Amazon Cognito ( User Pool 사용, 50K MAU 프리티어 제공 : $275) • Amazon SQS ( Standard 사용, 1M 요청 프리티어 제공 : $4.4) • Amazon DynamoDB (Provisioned 사용, 25 GB 프리티어 제공 : $ 1,116.56) • Total estimate : $1,396 (약 1,556,000)
  • 84. © 2021, Amazon Web Services, Inc. or its Affiliates. 감사합니다