[gaming on aws] 네오위즈게임즈 - building online games in the aws cloud

24
네오위즈게임즈 장군수 Building Online Games in the AWS Cloud

Upload: amazon-web-services-korea

Post on 30-Nov-2014

1.991 views

Category:

Technology


4 download

DESCRIPTION

Building Online Games in the AWS Cloud - 네오위즈게임즈 (장군수, 시스템 엔지니어)

TRANSCRIPT

Page 1: [Gaming on AWS] 네오위즈게임즈 - Building Online Games in the AWS Cloud

네오위즈게임즈 장군수

Building Online Games in the AWS Cloud

Page 2: [Gaming on AWS] 네오위즈게임즈 - Building Online Games in the AWS Cloud

AWS 도입의 성공 사례

2

Page 3: [Gaming on AWS] 네오위즈게임즈 - Building Online Games in the AWS Cloud

성공의 열쇠는?

혁신적인 IT 운영

AWS 도입?

3

NO!

Page 4: [Gaming on AWS] 네오위즈게임즈 - Building Online Games in the AWS Cloud

Q. 혁신적인 IT 운영이 무엇인가요?

A. 비즈니스 요구사항을 제약하지 않아야 합니다. 빠르게 인프라를 전개하고 초기 투자 비용을 최소화 할 수 있어야 합니다.

4

Page 5: [Gaming on AWS] 네오위즈게임즈 - Building Online Games in the AWS Cloud

인프라 테스트

1. 100대의 머신을 한 시간 내에 생성하고 삭제할 수 있습니까?

2. 필요 자원을 곧바로 서비스에 투입하고 투입한 만큼 성능 향상을 얻을 수

있습니까?

3. 임의의 H/W 장애, 교체, 제거 시에도 계속해서 서비스 할 수 있습니까?

4. 시스템의 전체 상황을 모니터링 하고 특정 이벤트에 대한 알람을 받을 수

있습니까?

5. 당신의 인프라 구성을 개발,테스트 부서에 투명하게 전달하고 긴밀하게 협력할 수

있습니까?

6. 당신의 인프라 구성의 복제본을 수 시간 내에 구성할 수 있습니까?

7. 서비스 중단 없이 지속적으로 코드를 배포할 수 있습니까?

5

Page 6: [Gaming on AWS] 네오위즈게임즈 - Building Online Games in the AWS Cloud

글로벌 서비스

빠른 시장 진입

초기 IT 투자 비용 최소화

새로운

비즈니스

요구사항

6

Page 7: [Gaming on AWS] 네오위즈게임즈 - Building Online Games in the AWS Cloud

플랫폼 선택이 자유롭다.

구현 사례나 백서가 잘 정리되어 있다.

클라우드 서비스의 선택

7

Page 8: [Gaming on AWS] 네오위즈게임즈 - Building Online Games in the AWS Cloud

Virtual Machine

Relational DB

Storage

Load Balancer

Memory cache

DNS

S3,EBS

ELB

RDS

EC2

Route53

ElasticCache

CDN Cloudfront

다양한 IT 인프라 자원을 사용자에게 서비스의 형태로 제공

한장으로 설명하는 AWS

AWS는 가상의 데이터센터와

호출 가능한 API를 제공한다

8

Page 9: [Gaming on AWS] 네오위즈게임즈 - Building Online Games in the AWS Cloud

App

Cache

DB

Web

AWS를 사용한 인프라 구축

Apache + php

MySQL

memcached

RDS

ElasticCache

EC2

9

Page 10: [Gaming on AWS] 네오위즈게임즈 - Building Online Games in the AWS Cloud

사용자 트래픽의 증가하면?

Load Balancer 가 필요

ELB의 도입

Cache

DB

Web+App

RDS

ElasticCache

EC2 Web+App

Load Balancer

ELB

10

도입 전에 읽어볼만한 자료 http://harish11g.blogspot.kr/2012/07/aws-elastic-load-balancing-elb-amazon.html http://knowledgevoid.com/blog/2012/01/13/logging-the-correct-ip-address-using-apache-2-2-x-and-amazons-elastic-load-balancer/

Page 11: [Gaming on AWS] 네오위즈게임즈 - Building Online Games in the AWS Cloud

웹 서버 추가 시나리오

1. EC2 인스턴스 생성

2. 소프트웨어 패키지 설치, 코드 배포, 각종 설정..

3. 테스트, 잘 동작하면 ELB에 연결

11

Page 12: [Gaming on AWS] 네오위즈게임즈 - Building Online Games in the AWS Cloud

엄청난 속도로 트래픽이 증가한다면?

우리 서비스도 저렇게 엄청난 속도로 트래픽이 증가한다면?

해결책

1. 이미지 패키징

2. 설정 자동화 툴

12

Page 13: [Gaming on AWS] 네오위즈게임즈 - Building Online Games in the AWS Cloud

Cache

DB

Web+App

RDS

ElasticCache

EC2 Web+App

Load Balancer

ELB

Configuration Manager

설정이 자동화된 인프라

13

Chef wiki http://wiki.opscode.com OpsWorks http://aws.amazon.com/ko/opsworks/

Page 14: [Gaming on AWS] 네오위즈게임즈 - Building Online Games in the AWS Cloud

확장도 자동화 하고 싶다!

Cache

DB

Web+App

RDS

ElasticCache

EC2 Web+App

Load Balancer

ELB

Configuration Manager - 모니터링

- 트리거

- 생성 정책

Autoscale Group

Cloudwatch

14

Page 15: [Gaming on AWS] 네오위즈게임즈 - Building Online Games in the AWS Cloud

Autoscale 그냥 되는거 아니야?

Lunch Config 설정

Auto scaling group 설정

Auto scaling policy 설정

Cloudwatch metric 선택

Trigger 설정

3rd party 툴을 활용 eg. Rightscale, asgard

15

Page 16: [Gaming on AWS] 네오위즈게임즈 - Building Online Games in the AWS Cloud

HTML, 자바스크립트, 이미지, 플래시 파일을 사용자에게 배포해야 함

S3 + Cloudfront 조합을 사용

장점

S3 의 높은 가용성

세계 각지의 데이터센터에 컨텐츠를 캐싱하여 사용자의 체감 속도를 높임

CDN?

Tip.

클라우드 프론트 로깅을 통해 성능 통계를 추출

사용자 업로드가 필요한 서비스의 경우 3rd party 가속 솔루션을 활용

큰 사이즈의 파일은 S3 multipart upload 기능을 사용

16

Page 17: [Gaming on AWS] 네오위즈게임즈 - Building Online Games in the AWS Cloud

도메인 네임이 뭐 이렇게 길어? ec2-23-20-117-134.compute-1.amazonaws.com

WHO AM I ? We need DNS too! Use Route 53

! Tip : Route53 는 weight based, latency based 이름 조회를 제공한다.

17

Page 18: [Gaming on AWS] 네오위즈게임즈 - Building Online Games in the AWS Cloud

Cache

DB

Web+App

RDS

ElasticCache

EC2 Web+App

Load Balancer

ELB

Configuration Manager

DNS

CDN

Storage Route53 S3

Cloudfront

Autoscale Group

Cloudwatch

음.. 다됐나?

18

Page 19: [Gaming on AWS] 네오위즈게임즈 - Building Online Games in the AWS Cloud

응, 다 됐어 이제 서비스 환경 구축하자

우리에게 필요한 환경은 여러 개!

지금까지 작업을 또다시?

19

Page 20: [Gaming on AWS] 네오위즈게임즈 - Building Online Games in the AWS Cloud

Cloudformation + Chef, puppet

Rightscale macro

동일한 인프라 셋을 수분 내에 복제할 수 있음!

인프라를 템플릿화 하자!

20

Page 21: [Gaming on AWS] 네오위즈게임즈 - Building Online Games in the AWS Cloud

THANK YOU

21

Page 22: [Gaming on AWS] 네오위즈게임즈 - Building Online Games in the AWS Cloud

Reference

AWS documetation

http://aws.amazon.com/ko/documentation/

Continuous Integritation on AWS

http://www.slideshare.net/AmazonWebServices/cloudpowered-continuous-integration-and-deployment-architectures-jinesh-varia

22

Page 23: [Gaming on AWS] 네오위즈게임즈 - Building Online Games in the AWS Cloud

Q&A

23

Page 24: [Gaming on AWS] 네오위즈게임즈 - Building Online Games in the AWS Cloud

FAQ

클라우드를 쓰면 SE,NE,DBA 는 할 일이 없어지나요?

제 가상머신의 호스트 장비에 장애가 생기면 어떻게 되나요?

클라우드 환경은 보안에 더 취약하지 않나요?

https://forums.aws.amazon.com/thread.jspa?threadID=100180&tstart=0

24