You are on page 1of 94

AWS 기반 클라우드 아키텍처 모범사례

삼성전자 개발자 포털/개발자 워크스페이스 사례

정영준 솔루션즈 아키텍트, AWS 유현성 수석, 삼성전자 클라우드팀

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
본 세션에서는
• 좋은 아키텍처를 구성하기 위한 방법
• 삼성전자의 개발자 포털/개발자 워크스페이스의 아키텍처 이야기
• AWS 아키텍처 베스트 프렉티스

7 2
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
좋은 아키텍처의 7가지 요소

새로운
느슨한 시도
병렬 결합
유연한 처리
다양한 구조
모든 스토리
장애를 계층의 지 활용
감안한 보안
설계

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
1
장애를 감안한 설계
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
장애를 감안한 설계 단일 실패 지점을 피하기

• 서버에 정적 공용 IP 주소 부여
• 단일 Amazon EC2 인스턴스 DNS
User (Route 53)
• 단일 호스트(인스턴스)에 전체 스택
• 웹 응용 프로그램 AWS Cloud
• 데이터 베이스
• 관리 등 Elastic IP
address

EC2 Server

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
User DNS
(Route 53)

AWS Cloud
AWS Cloud

Availability Zone Availability Zone


Elastic IP
address

EC2 Server

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
2
모든 계층의 보안
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
모든 계층에 보안을 적용
AWS Cloud

VPC
HTTP: 80

회사 네트워크

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
모든 계층에 보안을 적용
AWS Cloud

데이터가 VPC
전송되고 저장 시점에 HTTP: 80
Key Management
암호화 Service

회사 네트워크
Corporate Network

VPN
게이트웨이

VPN 연결

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
모든 계층에 보안을 적용
AWS Cloud

IAM으로 VPC
최소 권한 원칙 실행 HTTP: 80
KMS

회사 네트워크
Corporate Network
IAM

VPN
게이트웨이

VPN 연결

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
모든 계층에 보안을 적용
AWS Cloud

보안그룹과 NACL을 VPC


이용하여 방화벽 HTTP: 80
KMS
정책 적용 SG

회사 네트워크
Corporate Network
SG SG SG
IAM

VPN
게이트웨이

SG SG

VPN 연결

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
모든 계층에 보안을 적용 보안강화를 의한 추가 도구

Amazon AWS Certificate AWS Shield AWS WAF


Inspector Manager

Amazon AWS Config Amazon


GuardDuty Macie
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
3
다양한 스토리지
옵션 활용
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
다양한 스토리지 옵션 활용

Amazon S3 Amazon S3 Glacier Amazon Redshift


Amazon RDS
인스턴스 스토어

Amazon Amazon Amazon Neptune Amazon ElastiCache


Elastic Block Store (EBS) Elastic File System

Amazon CloudFront

Amazon FSx Amazon FSx Amazon Timestream Amazon DynamoDB


for Lustre for Windows File Server
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
다양한 스토리지 옵션 활용
현재 상황:
• 단일 스토리지 옵션사용
• 엘라스틱 로드 밸런서
AWS Cloud
• EC2 웹 어플리케이션 클러스터
• 관계형 데이터 베이스 Multi AZ

• 캐시 레이어 없음
• 모든 데이터는 데이터베이스나
EBS에 저장됨

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
다양한 스토리지 옵션 활용
데이터를 캐시하여 부하를 줄임: Amazon
• ElastiCache 를 캐싱 계층으로 만들어 CloudFront

웹서버와 데이터베이스 서버의 부하를


줄임 AWS Cloud

• CloudFront 를 이용하여, 부하를 줄이고 Multi AZ


속도를 높임
• 정적 페이지를 S3에서 호스팅하도록 Amazon S3
설정하여 웹서버의 부하를 줄임
• 연관관계가 없는 데이터는
DynamoDB에 저장 Amazon
ElastiCache
Amazon
DynamoDB

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
4
유연한 구조
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
블랙프라이데이 기간 중의 Amazon.com 트레픽

프로비저닝된 용량

실제 트레픽

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
블랙프라이데이 기간 중의 Amazon.com 트레픽
76%
프로비저닝된 용량

실제 트레픽
24%
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
블랙프라이데이 기간 중의 Amazon.com 트레픽

프로비저닝된 용량

실제 트레픽

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
유연하게 구현하기

• 애플리케이션 액세스 패턴에 맞게 Auto Scaling 그룹을


사용하십시오.
• 응용 프로그램을 유연하게 준비하십시오.
• 구성 요소의 상태, 가용성 또는 고정 위치를 고정하지 마십시오.
• 재부팅 및 재시작에 대한 복원력을 가지도록 설계하십시오.
• 인스턴스가 시작되면, 자동적으로 해당 인스턴스의 역할에 맞게 자동으로
구성이 되어야 합니다.
• S3 및 DynamoDB와 같이 확장성이 뛰어나고 관리되는 서비스를
활용하십시오.

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
5
병렬처리
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
병렬 처리의 장점
4단위

VS
1단위

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
병렬처리를 위한 구조 만들기
빠른 것이 높은 비용을 의미하지 않습니다.
• EC2 온디멘드를 사용하는 경우 경우:
• 12 시간 4 vCPU를 사용하거나,
• 1 시간 48 vCPU를 사용할 수 있음.
• 비용과 성능 간의 최상의 균형을 유지하기 위해 인프라를 작업량에 맞게
선택하십시오.

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
병렬처리를 위한 구조 만들기
수직이 아닌 수평으로 확장 하십시오.
• 상태 / 세션 데이터에서 계산 분리
• ELB를 사용하여 부하 분산
• 분산 처리를 위해 큰 데이터를 조각으로 나누십시오.
• AWS Elastic Map Reduce (EMR) - 관리되는 Hadoop
• AWS Glue - 간편하고 유연하며 비용 효율적인 ETL

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
6
느슨한 결합
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
느슨한 결합으로 자유도 높이기: 큐 사용하기
Amazon Simple Queue Service (SQS) 를 사용하여
컴포넌트간의 메시지를 느슨하게 결합되도록 구현

강력한 결합

느슨한 결합

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
느슨한 결합: 바퀴를 재발명 할 필요 없음
AWS 주변의 모든 것들은 API 호출이 가능합니다.
AWS 네이티브 서비스를 활용하세요…
• Queuing
• Transcoding
• Search AWS Lambda Amazon Elasticsearch Amazon Simple AWS CloudTrail
Service Notification Service
• Databases
• Email
• Monitoring
• Metrics AWS Elemental MediaLive
Amazon RDS
Amazon CloudWatch Amazon Simple Queue
Service
• Logging
• Compute

Amazon Elastic Amazon DynamoDB Amazon Simple Amazon MQ


Transcoder Notification Service

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
7
새로운 시도
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
제약사항을 두려워 하지 마세요

기존 아키텍처의 제약에 대하여 다시 생각해보십시오.


• Q1) 메모리가 더 필요 한가요?

• Q2) 데이터베이스를 위하여 더 높은 IOPS 가 필요 한가요?

• Q3) 하드웨어가 실패하거나 설정이 잘못 되었나요?

• Q4) 비용 효율적인 재난 복구 전략이 필요 한가요?

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
제약사항을 두려워 하지 마세요

기존 아키텍처의 제약에 대하여 다시 생각해보십시오.


• A1) NO 인스턴스 사이즈 교체, YES 인스턴스 개수 증가 or 캐싱

• A2) NO 수직 확장, 인덱스 수정, YES 샤딩 or 리드리플리카

• A3) NO 디버깅, 로그 분석, YES 재부팅 or 재배포

• A4) NO Full DR 구성, YES 파이어라이트 or 웜스텐바이

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
2가지 방법론

Well-Architected 카오스 엔지니어링


프레임워크

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Well-Architected 프레임워크의 5가지 개념

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
카오스 엔지니어링을 위한 접근방법

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
인프라스트럭처

단일 실패 지점이 없는
인프라

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
인프라스트럭처

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
스위칭과
인터커넥팅
데이터 복제
트레픽 라우팅
문제 최소화
안티-앤트로피 복구

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
스위칭과
인터커넥팅
데이터 복제
트레픽 라우팅
문제 최소화
안티-앤트로피 복구

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
스위칭과
인터커넥팅
데이터 복제
트레픽 라우팅
문제 최소화
안티-앤트로피 복구

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
특정 지역 및 서비스로 업데이트 및
고객 요청 전달

사고 발생시 데이터 복제 및 요청 재
라우트

스위칭 메커니즘은 애플리케이션


서비스보다 훨씬 더 안정적이어야 함

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
스위칭

인프라스트럭처

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
!
애플리케이션의
장애 대응 구조 App
에러 리턴
느린 응담
네트워크 파티션

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
마이크로 서비스는 소프트웨어 사고에
대해 폭발 반경을 제한합니다.
서킷 브레이커를 통해 영향을 최소화
벌크헤드 구조가 문제가 확장되는 것을 막아줌
DITTO—Do Idempotent Things To Others
상호간에 수정과 제거가 발생하지 않도록 막아줌

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
애플리케이션

스위칭

인프라스트럭처

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
허걱!
아까 왜 그랬는지
궁금하네요?
엔지니어 재부팅 해 봅시다. 이젠 완전히
예기치 않은 응용 고장났네요.
프로그램 동작으로 인해
사람들이 개입하여
상황을 악화시킵니다.

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
!
엔지니어 훈련

화재 훈련은 모두가 계단을


타고 주차장에 모이게 하는
불편한 일입니다.

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
엔지니어 훈련

사람들이 반응하는 법을 훈련
받았기 때문에 소방 훈련은
실제 화재 발생시 생명을
구할 수 있습니다.

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
엔지니어

애플리케이션

카오스 스위칭
엔지니어링팀
인프라스트럭처

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
엔지니어

애플리케이션
도구
카오스 스위칭
엔지니어링팀
인프라스트럭처

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
도구
게임 데이 엔지니어
Simian Army
애플리케이션
실패 주입

카오스 ChAP
스위칭
엔지니어링팀
Gremlin 인프라스트럭처

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Tools
엔지니어 Safestack
AVA

애플리케이션 Metasploit

도구 Nmap
카오스 스위칭 시큐리티
AttackIQ
엔지니어링팀 레드팀
인프라스트럭처 SafeBreach

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
좋은 아키텍팅을 위한 카오스 엔지니어링 접근 방법
엔지니어

애플리케이션

도구

도구
카오스 스위칭 Security
엔지니어링팀 Red
인프라스트럭처 Team

4 개의 레이어. 2 개의 팀.

핵심 가치: 장애상황에서도 잘 동작하는 서비스를 만들자


© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Samsung developer portal and developer workspace

Apr. 2019

Ashton Hyunsung Yu (ashton.yu@samsung.com)


Platform strategy and architecture in developer portal/workspace DevOps team
Cloud Team | Samsung Electronics
Agenda

• Samsung developer relations

• Journey to build Samsung developer portal and developer workspace

• About our platform architecture

• Future plan

64
Samsung developer relations

• Online Outreach: Digital Marketing, SNS


Awareness / • Offline Event: Meetups, Hackathons, SDC
Acquisition • Community/Industry Event/Beta program

• Developer Portals • Tech Documentation


Interest / • Online Training: Webinar, Video
• Developer Workspace SDK/Tool
Training • Offline Event: Workshop, Office Hour
• SDK/Tool/API guides
• Developer Program

• Distribution • Tech Documentation


Engagement/
• Certification Tech Support • Ticketing System: T1/T2/T3
Monetization • Community
• Business Development

65
SDC 2018
Video clip (About 1 min.)

66
“Developer portal” and “Developer workspace”

• Developer portal
- User account management
- Technical documents (API/SDK guide documents)
- Ticketing system
- Blog, Newsroom
- Community

• Developer workspace
- Web based development environment
- Workflow to distribute/certificate
- Cloudfoundry based test environment for 3rd party developers

67
Journey to build Samsung developer portal and developer workspace

SmartThings Bixby RCS

2017 official open 2018 official open 2018 officail open

Developer portal

2018 official open 2018 beta open 2018 closed beta open

IoT Device/App onboarding Develop Bixby Capsule Develop RCS Chatbot

Developer workspace

68
Journey to build Samsung developer portal and developer workspace

Platform strategy Architecture design Operational policy

• Define common platform • Build cloud native application • Fully automated operation
. User account management/CRM . Microservice architecture . DevOps Culture
→ Salesforce.com . Containerized workload . CI/CD
. Ticketing/Support system → Docker, AWS Fargate . QAOps (QA Automation)
→ Zendesk . Multi cloud provisioning
. Content management → Docker, CloudFoundry • SRE(Service Reliability Engineering)
→ Git repo, Hexo.io . Monitoring/Alerting
• Be scalable, resilient and fail-safe . SLI/SLO
• Provide APIs for each service dev team . Measure everything
→ VALET Dashboard

69
Journey to build Samsung developer portal and developer workspace
Current developer portal All new developer portal & workspace

Samsung Developers Developer Workspace


developer. program.developer. New dev. Portal
Portal (Portal) (Console/Builder)
samsung.com samsung.com (SmartTings, RCS, Bixby)
&
Infra.
AWS SDS IDC AWS Amazon Web Service

User Oracle DB Sugar CRM Salesforce Salesforce.com CRM


Account

Git Repository OneClick Build


CI/CD Local PC Local Build Git Repository
(Tech doc Repository) (Deploy)

Managing dev. Smart-


Galaxy Gear Apps RCS Bixby
Guide Things
Tech. Doc.
Tech. Document Library
Separated Tech. Document sites

Remarks : Legacy Y2017~18 Y2019

70
Architecture | developer portal
[AWS architecture blog]
https://aws.amazon.com/ko/blogs/architecture/samsung-
builds-a-secure-developer-portal-with-fargate-and-ecr/

71
Why we chose AWS Fargate for developer portal

• Easy to Use
- Good for quick horizontal scaling
- ECS CLI Supports Fargate

• Fast Deploy
- AWS support dedicated fleet for Fargate
- Fast provisioning

• Cost effective and reduce operational effort


- Reducing monthly costs by approximately 44.5% (compute cost only)

72
Architecture | CloudFoundry platform for developer workspace

[Source : CloudFoundry.org]

73
Use cases of CloudFoundry

CloudFoundry Platform

Build Pack Running Containers


Process (5) Deploy

(2) Compilation
(4) Create container image App App App App
Router
(1) CF push
Blob Store
App App App App
buildpacks

(6) Store flow


(3) Package download
Gitlab
Developers can request the app as docker image to
install the created app in CloudFoundry to their own
cloud environments Node-red package
Node.js package Flow.json

[CloudFoundry blog]

https://www.cloudfoundry.org/blog/samsung-chooses-cloud-foundry-3rd-party-developer-experience/

74
SRE : Architecture to build VALET Dashboard
VALET - Volume, Availability, Latency, Errors, Tickets for SLIs/SLOs management
“Failure is normal and reliability is fundamental”

75
Future plan

2 Millions developers in Samsung developer ecosystem by 2020

Developer Relation Developer Tools DevOps/SRE

• Reinvigorate online outreach with • Reinforce SDK/Tools competitiveness • Fast/Automated delivery for contents
best quality contents • All new Samsung developer portal and services
• Establish regional/local DR • Developer workspace branding • Enhanced service reliability
evangelism • Integrating with marketplace
• SDC, developer day/meetup for
strategic service platforms

76
Thank you!
[AWS Architecture blog]
https://aws.amazon.com/ko/blogs/architecture/samsung-builds-a-secure-developer-portal-with-fargate-and-ecr/

[CloudFoundry blog]
https://www.cloudfoundry.org/blog/samsung-chooses-cloud-foundry-3rd-party-developer-experience/
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
아키텍처 베스트 프렉티스 알아보기
• 3티어 웹어플리케이션
• 고가용성 시스템 아키텍처
• 컨텐츠 / 미디어 서빙
• 배치 프로세싱
• 로컬 어플리케이션의 재난 대응 아키텍처
• 로그 분석 시스템
• 시계열 프로세싱
• 파일 동기화 서비스
• 대용량 처리
• 금융 서비스 그리드 컴퓨팅

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
3티어 웹 어플리케이션 호스팅

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.

https://media.amazonwebservices.com/architecturecenter/AWS_ac_ra_web_01.pdf
고가용성 시스템 아키텍처

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.

https://media.amazonwebservices.com/architecturecenter/AWS_ac_ra_ftha_04.pdf
컨텐츠 / 미디어 서빙

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
https://media.amazonwebservices.com/architecturecenter/AWS_ac_ra_media_02.pdf
배치 프로세싱

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
https://media.amazonwebservices.com/architecturecenter/AWS_ac_ra_batch_03.pdf
로컬 어플리케이션의 재난 대응

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
https://media.amazonwebservices.com/architecturecenter/AWS_ac_ra_disasterrecovery_07.pdf
로그 분석

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
https://media.amazonwebservices.com/architecturecenter/AWS_ac_ra_loganalysis_11.pdf
시계열 분석

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
https://media.amazonwebservices.com/architecturecenter/AWS_ac_ra_timeseriesprocessing_16.pdf
파일 동기화 서비스

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
https://media.amazonwebservices.com/architecturecenter/AWS_ac_ra_filesync_08.pdf
대용량 처리 & 데이터 셋트 처리

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
https://media.amazonwebservices.com/architecturecenter/AWS_ac_ra_largescale_05.pdf
금융 서비스 그리드 컴퓨팅

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.

https://media.amazonwebservices.com/architecturecenter/AWS_ac_ra_financialgrid_12.pdf
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
좋은 아키텍처란

안정적으로 개발/운영 배포 되면서


확장/축소가 용의한 어플리케이션

7 2
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS 의 아키텍팅 도구들
• AWS 아키텍처 센터
• 셈플 아키텍처와 다이어그램
• This is My Architecture, 고객 성공사례
• 주요 고객 성공사례 및 아키텍처 정보
• AWS Answers
• 아키텍팅, 기술 항목에 대한 질의 응답
• AWS 솔루션, AWS Quick Start
• AWS SA 와 파트너가 제공하는 디플로이 가이드 및 배포 코드, 몇번의 클릭으로 솔루션 배포
• AWS Well-Architected Training 무료 온라인 교육
• Wee-Architected 무료 온라인 교육

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Next Step
• 관련 리소스
• https://aws.amazon.com/ko/architecture/well-architected/
• https://aws.amazon.com/this-is-my-architecture/?nc1=f_ls
• https://aws.amazon.com/answers/
• https://aws.amazon.com/solutions/
• http://principlesofchaos.org/
• 세션 관련 Getting Started 정보
• https://aws.amazon.com/quickstart/
• https://aws.amazon.com/security/

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
감사합니다!

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.

You might also like