Weitere ähnliche Inhalte Ähnlich wie 오라클 클라우드와 함께 떠나는 마이크로서비스 아키텍처로의 여행 V3 (20) 오라클 클라우드와 함께 떠나는 마이크로서비스 아키텍처로의 여행 V31. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
오라클과 함께하는
마이크로서비스 아키텍처로의 여행
2017/09/28
이희종
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
2. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Program Agenda
마이크로서비스 아키텍처 Overview1
2
2
오라클 클라우드에서 마이크로서비스 아키텍처
Demo (Developer Cloud Service,
Application Container Cloud Service)
3
3. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
마이크로 서비스 아키텍처
Microservices Architecture
Oracle Confidential – Internal/Restricted/Highly Restricted 3
4. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
마이크로서비스 아키텍처
4
작은 서비스들의 집합으로 애플리케이션 개발하는 방법
(Microservices)
5. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
마이크로서비스 아키텍처
5
출처: https://martinfowler.com/articles/microservices.html
6. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
전통적인 애플리케이션의 구조
6
데이터 베이스
(Oracle, Mysql)
Business Logic
UI
Data Access Layer
• 전통적인 웹 개발 스타일
• 하나의 애플리케이션에 모든 비즈니스 로직
들이 들어가 있는 “통짜 구조”
• 하나의 개발 툴 또는 환경에서 개발 하기
때문에 간편함
• 하나의 애플리케이션만 테스트 하기 대문에
배포도 역시 간편함
WebLogic
7. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
전통적인 애플리케이션의 문제점
7
• 애플리케이션의 복잡도 증가
• 코드의 양이 점점 늘어남 (스파게티 코드)
• 테스트 / 배포 시간이 증가
• 변경하기 점점 두려워짐
• 주인 의식 저하
• 자바 말고 다른 것도 해보고 싶다!!
8. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 8
애플리케이션을 많은 작은 조각으로 나누고, 요구사항에 맞추어 빠르게 개발하고 배포
마이크로서비스 아키텍처
Middleware
Module 1 Module 2 Module N
Data store
모든 모듈의
요구사항을 전부
지원해야 함
모든 기능을 제공하는
무거운 애플리케이션
Middleware
Module 1
Data store
모듈 한 개의
요구사항을
지원하면 됨
특정한 기능한
제공하는 가벼운
애플리케이션
모놀리틱 (Monoliths) 마이크로 서비스
9. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 9
애플리케이션을 많은 작은 조각으로 나누고, 요구사항에 맞추어 빠르게 개발하고 배포
마이크로서비스 아키텍처
JAVA EE
타임라인 팔로우 친구
오라클
우리는 하나 !!
JAVA EE
타임라인
오라클
모든 서비스를 분리 !!
Monoliths Microservices
PHP
팔로우
MySQL
Python
친구
오라클
분리
SNS 애플리케이션SNS 애플리케이션
10. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 10
마이크로서비스 아키텍처 장점
• 새로운 서비스를 개발할 때 원하는 언어/플랫폼을 선택 할 수 있음
• 원하는 최근 기술을 도입하고 시도 할 수 있음
• 새로운 기능을 추가하는 경우 해당 기능만 수정하고 배포 할 수 있음
• 빠른 서비스 시작 속도와 배포 (Time to Market)
• 코드의 양이 적어짐 쉽게 이해 할 수 있음 누구나 쉽게 수정 (생산성 향상)
• 쉬운 통합과 배포 자동화(DevOps)
11. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Internal/Restricted/Highly Restricted 11
마이크로서비스 아키텍처 장점
12. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 12
마이크로서비스의 사례 - Uber
13. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 13
콘 웨이의 법칙
소프트웨어의 구조는 그 소프트웨어를 만드는
조직의 구조와 일치한다
Any organization that designs a system (defined
broadly) will produce a design whose structure is a
copy of the organization's communication structure.
Melvin Conway (1968)
14. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
마이크로서비스의 팀과 조직
14
마이크로서비스 팀 기존의 조직 구조
출처: https://martinfowler.com/articles/microservices.html
15. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Internal/Restricted/Highly Restricted 15
마이크로서비스 팀- SUPERCELL
CoC and Hay Day
were each developed by teams of just five
developers
We say "get big by thinking small“
작게 생각해서 큰 것을 얻자 !!
llkka Paananen(CEO of Supercell)
출처: http://www.wired.co.uk/article/ilkka-paananen-interview
16. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
커뮤니케이션 링크
16
출처: http://blog.idonethis.com/two-pizza-team/
Communication Gets Terrible as Team Size Grows
J. Richard Hackman
• 6명일 때는 15 link, 12 명일 때는 66 링크, 50명일 때는 1225 링크
17. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Two Pizza Team
17
가장 좋은 생산성과 효과적인 커뮤케이션을
할 수 있는 조직의 규모
18. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 18
What Are Microservices?
마이크로 서비스 아키텍처 스타일(Microservice architecture style)” 은 독립적으로 배포 가능한 서비스
들의 묶음으로 소프트웨어
Monolithic Applications
• 단일, Monolithic App
• 전체 App를 함께 배포야 함
• 전체 App 이 단일 DB를 사용
• 기술 계층을 중심으로 구성
• 전체 App이 하나의 기술 스택을 채택
Microservices
• 다수의 , 최소의 기능을 더 작아진
Microservice
• 독립적으로 배포
• 각 Microservice를 각자의 데이터 저장소
• 비즈니스 중심으로 구성
• 각 Microservice 가 각자의 기술을 선택
19. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
오라클 클라우드에서 마이크로서비스
Microservices architecture in Oracle Cloud
Oracle Confidential – Internal/Restricted/Highly Restricted 19
20. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 20
마이크로서비스 아키텍처를 위한 클라우드 서비스 조건
1. 가볍고 빠르게 시작 할 수 있어야 한다.
2. 다양한 언어와 플랫폼을 지원해야 함
3. 독립적인 애플리케이션을 구성할 수 있어야 한다.
4. 마이크로 서비스에 확장성(Scalability) 을 제공할 수 있어야 한다.
21. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Highly Restricted 21
Polyglot 환경은 계속적으로 성장
개발 언어 : Polyglot
22. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
자동화는 가장 기본적인 요구사항
22
Code Build &
Package
Deploy
Host
Wiki
Task & Issue
Code Review
23. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Lightweight Container
23
스크립트(Code) 만으로 구동 –
everything is 100% Code.
매우 빠르게 구동 – try for under
10 seconds.
깔끔하게 중지 – ephemeral
Hardware
Hypervisor
VM 1
OS
App
VM 2
OS
App
Hardware Virtualization
Hardware
Operating System
Container 1
App
Container 2
App
Containers
Higher density
Easy to start/stop
Portability
24. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Oracle Application Container Cloud
An open highly available Docker
container-based elastic polyglot
cloud platform
24
25. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Application Container Cloud Service
클라우드 상에서 non-Java EE 업무를 운영하기 위한 플랫폼
Profile
Web
• 가벼운 서비스를 위한 플랫폼
– 다양한 언어: Java SE, Node.js, Ruby, Python, PHP* (최근 Java EE 추가)
• 사용이 매우 쉬움
– 간소화된 최소한의 UI & REST API
• Build, Zip, Deploy
– 인스턴스 수, 인스턴스 당 메모리 선택
– 서비스를 위한 Docker 컨테이너를 자동으로 생성
• 자동적인 로드 발란싱
25
26. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Application Container Cloud Service
• Oracle Cloud Platform과 통합
– Database CS
– Java CS
– Caching CS
• Developer Cloud Service 를 통한
Continuous Delivery
Oracle Confidential – Internal 26
클라우드 상에서 non-Java EE 업무를 운영하기 위한 플랫폼
Profile
Web
– Messaging CS
– Storage CS
– …
* Roadmap Item
– GIT, Automate build and deploy
– Issue Management
– ….
27. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 27
장점 과 기능
Application Container Cloud Service
빠른
Provision
셀프서비스, Zero Commands
버전 선택, size & capacity
간단한 운영
업그레이드 Java Flight Recorder
크기조정 DR 장애복구
부하에 따른
빠른 대응
Scale out/in Scale up/down
신속,연속
배포
Developer Cloud Service 를 통한
Continuous Delivery
Oracle Confidential – Internal
28. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Application Container Cloud Architecture
Load Balancer
443 https/wss
$PORT
Internal Network
VM
Java SE
(App 1)
Oracle Linux
$PORT
VM
Node
(App 2)
Oracle Linux
stateless
29. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 29
Integrated Oracle Cloud Services
for a DevOps Culture
Developer Cloud Service
Developer
GIT
Hudson
Push code
Submit bugs
Share on Wiki
Application Container Cloud
Java SE
Load Balancer
Node.js Java SE
Deploy Directly
Continuous
Delivery
Messaging
Cloud Service
Storage
Cloud Service
Database
Cloud Service
30. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 30
Application Container Cloud Scalability (확장성)
애플리케이션 설정
• 환경/언어: Java SE
• 사용가능 한 메모리: 1GB
• 인스턴스 개수: 2
EmployWebApp in ACCS
scale up
scale out
• 순차적으로 적용
• Down Time 없음
• 최대 20GB
• 최대 64개 까지 scale out 가능
Docker
(1G)
Java SE
(App 1)
Docker
(1G)
Java SE
(App 1)
Docker
(1G)
Java SE
(App 1)
Docker
(1G)
Java SE
(App 1)
Docker
(1G)
Java SE
(App 1)
Docker
(2G)
Java SE
(App 1)
Docker
(2G)
Java SE
(App 1)
31. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 31
Application Caches
ACCS(Application Container Cloud Service) 에서 사용할 수 있는 Cache Service 를 제공함
• 데이터 베이스 접근하는 횟수를 줄여서, Application 의 확장과 성능을 향상 시키기 위한 목적
• 독립되어 있는 서로 다른 Instance 또는 Application 간에 데이터 공유
Java SE App3 Node App4 PHP App5Java SE App1 Java SE App2
Customer
Cache
Shopping
Cart Cache
Inventory
Cache
Pricing
Cache
Offers
Cache
Bookings
Cache
Cache Service Cache Service
32. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 32
Java Flight Recorder 기본 제공
• JFR(Java Flight Recorder) 가 기본적으로 제공 되며 JFR에서 수집된 정보를 JMC 에서 모니터링이 가능
• Java Mission Control
- Java Application 에 대한 실시간 상태 정보 확인
- Application 상태 변화 및 문제 분석을 위한 정보 수집
Docker
(1G)
Java SE
(App 1)
Java Mission Control
https://www.youtube.com/watch?v=BJS97XOwrSE
33. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 33
Build Zip Deploy!
34. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Application
Archive
Image Builder
Developer
Java Image Node Image
Language Runtimes Docker Image Repository Private Tenant Docker Image Repository
Application Image
34
Application 배포
Load Balancer
Java SE
Docker
Ruby
Docker
Node
Docker
35. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 35
Demo
1. Code Review ( Java)
2. Deploy using Developer Cloud Service
3. Administration and Management
36. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Internal/Restricted/Highly Restricted 36
Oracle Application Container Cloud Service 시작하기
가벼운 애플리케이션 개발이 필요하다면 ACCS를 시작하세요!!
• 오라클 클라우드 무로 $300 Credit 신청
https://cloud.oracle.com/ko_KR/tryit
• 다양한 튜토리얼
http://docs.oracle.com/en/cloud/paas/app-container-cloud/create-sample-java-se-applications.html
• 마이크로서비스의 패턴 언어
https://www.youtube.com/watch?v=NbVkqJunf7A&t=295s