More Related Content
Similar to 왜 우리는 마이크로서비스를 구현하고자 하는가?::김민성,이준희::AWS Summit Seoul 2018 (20)
More from Amazon Web Services Korea (20)
왜 우리는 마이크로서비스를 구현하고자 하는가?::김민성,이준희::AWS Summit Seoul 2018
- 1. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
이준희
차장 / GS Shop
김민성
Solutions Architect / Amazon Web Servers
왜 우리는 마이크로서비스를
구현하고자 하는가?
- 2. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
금일 이야기할 내용
왜 마이크로서비스 인가?
GS Shop의 경험 그리고 미래
마이크로서비스에 대한 고려사항
- 4. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
왜 마이크로 서비스인가?
입하
출하
• 이행 추적
• 물류 입하
• 적제 준비
• 적제
• 흐름 관리
• 기타…
• 주문
• 출하 준비
• 이행 추적
• 흐름 관리
• 기타…
- 5. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
왜 마이크로 서비스인가?
입하 소프트웨어 출하 소프트웨어
입하 업무 개발팀 출하 업무 개발팀
공통 라이브러리
데이터베이스
- 6. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
왜 마이크로 서비스인가?
입하 소프트웨어 개발팀
출하 소프트웨어 개발팀
Build Test Release
Build Test Release
대량 빌드 긴 TEST 시간 오랜 배포 시간
- 7. © 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, f
ormer Cloud Architect at Netflix)
- 8. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
마이크로서비스로의 이행
- 9. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
조직 딜리버리파이프라인 그리고 아키텍처
어플리케이션
아키텍처
딜리버리
파이프라인 유지
보수
배포검증개발 개발
데이터베이스
공통라이브러리
모
듈
A
모
듈
B
모
듈
C
모
듈
D
모
듈
…
조직
인
프
라
PL
개
발
PL
데
이
터
PL
PM
운영 조직프로젝트 조직
장기간의 개발 사이클
모놀리딕 아키텍처
프로젝트 조직과 운영 조직의 분리
구분 기존 어플리케이션 서비스
• 공통 라이브러리 및 데이터베이스
스키마로 인한 단위 모듈
업그레이드가 여려움
• 조직 및 개인간 소통의 어려움
• 조직간 커뮤니케이션을 위한 절차
필요
• 고객의 요청 및 비지니스의 변화에
대한 즉시적인 대응이 어려움
당면 과제
- 10. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
어플리케이션
아키텍처
딜리버리
파이프라인
조직
구분
신속성 확보를 위한 방향성
• 운영과 개발조직의 통합
• 완벽한 오너쉽 및 책임,
인센티브
• 지속적 딜리버리
• 자동화된 배포 프로세스
• 다운 타임 없는 배포
• 빠르고 믿을 수 있는 배포
• SOA
• 단일 목적
• API로 연계
• 비결합 (Highly Decoupled)
문제점 방향성
장기간 개발
사이클
모놀리딕
아키텍처
분리된
프로젝트 조직과
운영 조직
Micro-service
아키텍처
CI/CD
DevOps
상세
- 11. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
비니지스 신속성의 완성
운영과 개발조직의 통합
• 시장의 요구사항에 즉각적인 대응
• 장애에 대한 빠른 대처
• 커뮤니케이션 및 의사결정의 신속화를 위해
8~10명 내외의 조직 구성
완벽한 오너쉽과 책임, 인센티브
• 어플리케이션에 필요한 도구 (운영체제,
개발언어, 어플리케이션 서버 및
데이터베이스)선택의 자유도
• 적극적인 혁신의 추구
제한된 인원으로
가용성, 성능을
유지하며 안정적
으로 운영하기
위한 도구의 필요
Emerging
technology 기반
어플리케이션의
적극적인 혁신
“코드형
인프라”
“관리형 서비스”
Bigdata
IoT
AI
…
AWS
- 12. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
이준희 차장 | GS Shop | 물류/QA 본부
- 13. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
MONOLITHIC
NEW SERVICE
- 14. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
MONOLITHIC
SCALE OUT
- 15. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
MONOLITHIC
?
- 16. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
MONOLITHIC
?
NEW DEVELOPER
- 17. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
MONOLITHIC
?
- 18. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
MONOLITHIC
?
MARATHON
TIME TO MARKET X RISK ↑
UNWANTED FEATURE
- 19. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
MICRO SERVICE
- 20. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
MICRO SERVICE
NEW SERVICE
- 21. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
MICRO SERVICE
ELASTIC
- 22. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
MICRO SERVICE
DATA PIPELINE
DATA ANALYSIS SYSTEM
- 23. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
MICRO SERVICE
DATA PIPELINE
DATA ANALYSIS SYSTEM
DevOps
LEAN, AGILE, SPRINT
- 24. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
Monolithic
(거대한 덩어리)
On-Premise
(IDC)
IT Sourcing
(IT소싱)
Micro Service
(마이크로 서비스)
Cloud
(클라우드)
DevOps
(데브옵스)
Simple
Scalable
Continuous
Amazon ECS Amazon API
Gateway
Amazon
SQS
Amazon RDS Amazon
DynamoDB
Amazon
Lambda
- 25. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
Data
Data-Driven
(데이터 기반)Lean
(지속적,
변경의 용이함) MVP
(최소기능제품)
Waterfall
(단발성,
변경의 어려움)
Experience-
driven
(경험기반)
Over-Planned
Product
(확인되지 않은 기능)
Testable
Learn
Amazon Kinesis Amazon Redshift* AmazonM/L
AmazonSagemaker AmazonS3
- 26. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
No Waste
Agile
(목표에 집중)
Sprint
(스프린트)
Managing-
oriented
(관리위주)
Marathon
(마라톤)
Speed
AWS
CodeCommit
AWS
CodeDeploy
AWS
CodeBuild
AWS
CodePipeline
AWS
X-Ray
AWS
CodeStar
- 27. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
마이크로서비스에 대한 고려사항
- 28. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
Public API
addProductDetails(ProductId id,
ProductDetails details)
removeProductDetails(ProductId id)
getProductDetails(ProductId id)
어플리케이션/로직
(code, libraries, etc)
데이터 저장소
(eg, RDS, DynamoDB
ElastiCache, ElasticSearch)
하나의 마이크로서비스 구성 패턴
- 29. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
마이크로서비스와 라이브러리
Product Details
software library
Product Details
micro-service
getProductDetails()
- 30. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
Public API를 통한 호출
유정씨, 당신
데이터베이스에서
데이터를 직접 가져갈 수
있을까?
철수씨 미안해요. 저희쪽에서
열어드린 Public API를 통해서만
데이터를 오픈하고 있어요.
혹시 필요한 데이터를
알려주신다면 추가로 API를 구성해
놓을께요.
Nope!
Yep!
- 31. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
서비스간 커뮤니케이션
안녕 유정씨, 지금 우리팀
개발중인 마이크로
서비스에서 제품 관련
정보를 좀 호출해야
하는데…
걱정마 철수씨, 호출할 API 좀
알려줄래?
일단 니가 어떻게 쓸껀지 알면
좋을꺼 같은데,
먼저 권한 부터 줄께.
우리쪽 서비스 디렉토리에 너네
서비스 등록해 놓을께
- 32. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
서비스간 커뮤니케이션
유정씨 서비스가
문제가 생기면
어떻게 대응하지?
내 서비스는 내가
챙겨야지!
- 33. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
인증과 인가, 감사
• 인증 (Authentication)
클라이언트 식별에 대한 보증
• 인가 (Authorization)
(식별된 클라이언트에 대하여 허용된 범위의 Action만 수행 할 수 있도록 관리)
• 감사 (Audit)
Eg, AAA protocols
- 34. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
확장성 확보
Product Details
15 TPS100 TPS5 TPS20 TPS
철수씨,
먼저 필요한 용량 (TPS)와
응답 속도(Latency)을
알려주면 거기에 맞춰서
준비해 놓을께
하지만 누가
더 호출할지
몰라…
- 35. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
하위 호환성 확보
storeProduct (ProductId id, LocationId id )
storeProduct (ProductId id, LocationId id )
storePallet(PalletId id, LocationId id)
storeProduct (ProductId id, LocationId id )
storePallet(PalletId id, LocationId id)
storeProduct(ProductId id, LocationId id, int
numberOfUnits)
storeProduct (ProductId id, LocationId id )
storePallet(PalletId id, LocationId id)
storeProduct(ProductId id, LocationId id, int numberOfUnits)
Version 1.0
Version 1.1
Version 1.2
Version 1.3
• 제품 저장을 위한 Public API
생성 및 배포
• Pallet 저장을 위한 신규 API 추가
• 추가 기능을 답제한 제품 저장을
위한 제품 저장 API 추가
• 기존 API 여전히 호출 가능
• 기존 API 제거
• 기존 API 호출시 장애 발생
“Public API는 여러분의 서비스와 파트너 서비스와의 약속입니다.
한번 API가 배포 되면 파트너쪽에서 해당 API를 호출하는한 계속 관리되어야 합니다.”
- 36. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
= 연간 5천만회 배포 (2014년)
수 천개 팀 (자율적 DevOps팀)
× 마이크로서비스 아키텍처
× 지속적 배포 (CD)
× 다양한 개발 환경
(시간당 5708 회, 또는 0.63 초)
Amazon.com의 사례
Werner Vogels (CTO, Amazon.com, 2015)
- 37. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
AWS Summit 모바일 앱과 QR코드를 통
해 강연 평가 및 설문 조사에 참여해 주
시기 바랍니다.
내년 Summit을 만들 여러분의 소중한 의
견 부탁 드립니다.
#AWSSummit 해시태그로 소셜 미디어에 여러분의 행사 소
감을 올려주세요.
발표 자료 및 녹화 동영상은 AWS Korea 공식 소셜 채널로
공유될 예정입니다.
여러분의 피드백을 기다립니다!