Understanding Cloud Computing: Its Evolution Beyond Our Imagination 2012년 11월 30일 홍성수
[email protected]
서울대학교 전기컴퓨터공학부 교수 융합과학기술대학원 부원장 가헌신도리코재단 석좌교수 차세대융합기술원 스마트시스템연구소 소장
Understanding Cloud Computing
Agenda I. II. III. IV. V.
클라우드 컴퓨팅이란? 클라우드 컴퓨팅을 통한 멀티미디어 서비스 혁신 클라우드 컴퓨팅 Infrastructure 클라우드에서 프로그래밍하기 결론
2
I. 클라우드 컴퓨팅이란?
클라우드 컴퓨팅의 역사
Client-Server 컴퓨팅 모델 등장 1990년대 초
1982년 인터넷 출현 1980년대 중반 마이크로컴퓨터의 출현 그리고 1990년대 초 Client-Server 컴퓨팅 모델 등장
3
I. 클라우드 컴퓨팅이란?
클라우드 컴퓨팅의 역사
Dot-com Bubble 1995년 인터넷 서비스 상용화와 보급 인터넷 붐과 함께 수많은 사이트 탄생 Dot-com bubble
1995~2000년 인터넷 사이트들을 관리할 서버 환경을 위해 데이터 센터 등장 1998년 Google 창업
4
I. 클라우드 컴퓨팅이란?
클라우드 컴퓨팅의 역사
초기 Google의 데이터 센터 고가, 고성능의 데이터 센터 장비들 - UNIX 기반 서버와 High-End Storage 7x24x365 동안 100% uptime 유지
1995~2000년 Traffic peak 문제 - 일시적인 traffic 급등(예: 크리스마스) - 최대 traffic을 기준으로 100% uptime 심각한 자원 낭비
비용 문제 자원 활용 문제
5
I. 클라우드 컴퓨팅이란?
클라우드 컴퓨팅의 역사
Google의 성장 성장의 밑바탕 - 데이터센터에 대한 새로운 접근 HW 문제를 SW로 해결 고가의 UNIX 기반 서버 대신 저가의 Linux 기반 서버를 대량으로 활용 비용 절감
2000년대
성능상 부족한 부분을 소프트웨어로 해결 - 분산 파일 시스템 (GFS) - 대용량 데이터 분산 처리 프레임워크 (MapReduce) - 분산 데이터베이스 (BigTable) - 분산 컴퓨팅 자원 활용도 함께 상승
6
I. 클라우드 컴퓨팅이란?
클라우드 컴퓨팅의 역사
클라우드 컴퓨팅 시대 도래 클라우드 컴퓨팅 서비스의 보급 - 클라우드에 대한 해석이 다양 - 인터넷을 통한 컴퓨팅 서비스를 클라우드라고 부르기 시작 다양한 클라우드 컴퓨팅 서비스 - Amazon EC2, Google Apps & AppEngine, MS Azure, Eucalyptus, …
2010년대, 현재
스마트폰, 테블릿PC 등을 통한 모바일 클라우드 시대 도래
7
I. 클라우드 컴퓨팅이란?
클라우드 컴퓨팅의 정의 한마디로 표현하자면 Cloud computing provides on-demand, network access to configurable computing resources
Definition by NIST “Cloud computing is a model for enabling convenient, on-demand network access to a shared pool of configurable computing resources (e.g., networks, servers, storage, applications, and services) that can be rapidly provisioned and released with minimal management effort or service provider interaction”
8
I. 클라우드 컴퓨팅이란?
클라우드 컴퓨팅의 기본 개념 (1) Client-server computing vs. cloud computing Client
(Pre-defined) Method Invocation 요청
Server Method 1
Client-Server Model
Method Response
Method 2
… Method N
Code + 수행 요청
Client
Cloud Computing
Cloud
Code Code Code 수행 Response
9
I. 클라우드 컴퓨팅이란?
클라우드 컴퓨팅의 기본 개념 (2) 동적 코드 upload와 수행을 위한 그릇이 필요 Virtual machine
Code + 수행 요청
Client
Code
Cloud Code
Code 수행 Response
Virtual Machine
10
Understanding Cloud Computing
Agenda I. II. III. IV. V.
클라우드 컴퓨팅이란? 클라우드 컴퓨팅을 통한 멀티미디어 서비스 혁신 클라우드 컴퓨팅 Infrastructure 클라우드에서 프로그래밍하기 결론
11
II. 클라우드 컴퓨팅을 통한 멀티미디어 서비스 혁신
멀티미디어 서비스와 클라우드 컴퓨팅
Benefits 1. 콘텐츠 품질 향상
2. 탄력적 IT 인프라 확장
3. 재해 복구
4. N-Screen
12
II. 클라우드 컴퓨팅을 통한 멀티미디어 서비스 혁신
1. 콘텐츠 품질 향상 (1) 문제 멀티미디어 콘텐츠 제작, 관리, 배포 시스템 구현에 막대한 IT 자원 필요 • 추세: 점점 방대해지는 데이터 (고화질, 3D, N-Screen 지원 등) • 빅데이터 저장/관리의 어려움 • 빅데이터 분산 처리 알고리즘 개발의 어려움
Full HD 3D movies
13
II. 클라우드 컴퓨팅을 통한 멀티미디어 서비스 혁신
1. 콘텐츠 품질 향상 (2) 해결 클라우드 스토리지와 데이터베이스 기반 빅데이터 저장/관리 MapReduce 기반 분산 데이터 병렬 처리 Multimedia Applications
Big Data in Cloud
Encoding
Decoding
Rendering
Stereo Conversion
Transcoding
…
FRAME No. TYPE DATE AMOUNT DATE AMOUNT
21022 I 2009-03-02 $10.00 2009-03-02 21023 B $10.00 2007-12-13 $25.00 2007-12-13 21024 B $25.00 2008-04-19 $53.00 2008-04-19 21025 P $53.00 2008-01-19 $12.00 2008-01-19 21026 B $12.00 2008-05-20 $45.00 2008-05-20 21027 B $45.00 2009-03-21 $99.00 2009-03-21 21028 P $99.00 2009-01-18 0 2009-01-18$15.0 $15.0 0
B
Map Map worker Map worker worker
2009-03-01 21023 $10.00 21024 $25.00 21026 $53.00 21027
P
2009-03-02 21025 $10.00 21028 $25.00 $53.00
Reduce Map worker Map worker worker
B 21023
P 21025
…
…
14
II. 클라우드 컴퓨팅을 통한 멀티미디어 서비스 혁신
1. 콘텐츠 품질 향상 (3) 성공 사례 Revision3 (encoding.com)
인터넷TV 프로그램
다양한 포맷, 해상도의 비디오
encoding.com의 Amazon EC2 기반 transcoding 서비스
MLB.com (CISCO Videoscape Cloud Solution) • Video transcoding and streaming
MLB 중계 방송
CISCO의 클라우드 기반 streaming 서비스
다양한 기기를 위한 transcoding 및 streaming
15
II. 클라우드 컴퓨팅을 통한 멀티미디어 서비스 혁신
2. 탄력적 IT 인프라 확장 (1) 문제 Peak load capacity 대응을 위한 서버 구축 비용 막대 • 예, 월드컵 시즌과 같이 시청률이 급등하는 시기 Transaction Volume
Average load를 감당하기 위한 서버
Peak load를 감당하기 위한 서버
Nov.
Jul.
16
II. 클라우드 컴퓨팅을 통한 멀티미디어 서비스 혁신
2. 탄력적 IT 인프라 확장 (2) 해결 클라우드 기반 서비스 확장 • Cost effective (pay-per-use) • Elastic (서버 구매, 설치, 운영에 드는 시간 無) Ordinary day
Customer Affordable orders
Servers Reference VMware Customer Case Study: NYSE
Christmas
Many customers
Enterprise cloud
Beyond Affordable capacity orders
Servers for online delivery Servers service
Web hosting to Amazon EC2 servers
17
II. 클라우드 컴퓨팅을 통한 멀티미디어 서비스 혁신
2. 탄력적 IT 인프라 확장 (3) 성공 사례 Netflix • AWS 호스팅을 통해 데이터 처리 능력 탄력적 확장 • 초저녁에 발생하는 peak traffic을 부하가 적은 AWS 데이터 센터 로 분산 처리
ANIMOTO • 이미지와 음악, 영상을 결합하는 서비스 제공 • 부하의 변화에 따라 Amazon EC2를 탄력적으로 사용
Netflix사의 Amazon EC2 사용
AMINOTO사의 Amazon EC2 사용
18
II. 클라우드 컴퓨팅을 통한 멀티미디어 서비스 혁신
3. 재해 복구 (1) 문제 홍수, 지진 등 천재지변에 의한 서비스 중단 시간 최소화 필요 • 서버 중지, 이전, 재시작에 막대한 비용과 긴 시간 필요 • 지리적, 조직적 데이터 중복 배치를 위한 높은 비용
19
II. 클라우드 컴퓨팅을 통한 멀티미디어 서비스 혁신
3. 재해 복구 (2) 해결 가상화 기반 재해 복구 시스템 구축 • 사이트 단위로 가상화된 서버와 데이터의 live migration 자동화 • 고객에게 중단 없는 서비스 제공
20
II. 클라우드 컴퓨팅을 통한 멀티미디어 서비스 혁신
3. 재해 복구 (3) 성공 사례 QIC (호주 최대 기관투자사) • VMware사의 재해 복구 시스템 (vCenter Site Recovery) 구축 • 2011년 1월 브리즈번 강의 범람 (2주 동안 본사 접근 불가) • 업무 연속성 계획 실행 – 두 시간 만에 100대 이상의 서버를 모 두 백업 위치로 migration시키고 업무 지속 • 고객의 입장에서 업무 중단 발생 無
원격 데이터 센터 Live Migration
21
II. 클라우드 컴퓨팅을 통한 멀티미디어 서비스 혁신
4. N-Screen (1) 문제 기기 및 고객 요구 다양화 • 다양한 포맷의 동일 콘텐츠 반복 제작 • 고객별 서비스 커스터마이징의 한계
22
II. 클라우드 컴퓨팅을 통한 멀티미디어 서비스 혁신
4. N-Screen (2) 해결 클라우드 기반 on-demand transcoding 고객 단말 특성 및 요청에 따른 콘텐츠 분해, 재조립 콘텐츠 원본
On-demand transcoding - 자유로운 단말 화면 구성 - 2D/3D 변환 - 정보 교환/광고/판매 - 타 단말과 동기화 - 통합 DRM 관리 및 과금
데이터 센터
23
II. 클라우드 컴퓨팅을 통한 멀티미디어 서비스 혁신
4. N-Screen (3) 성공 사례 PBS • 다양한 기기를 통해 뉴스, 교육, 오락 방송 등을 서비스 • Zencoder사가 제공하는 AWS 기반 transcoding 서비스를 활용 하여 iOS 기기에 스트리밍 서비스 제공
클라우드를 통한 실시간 transcoding 및 streaming
연결 상태 등에 따라 영상 품질 조절
24
Understanding Cloud Computing
Agenda I. II. III. IV. V.
클라우드 컴퓨팅이란? 클라우드 컴퓨팅을 통한 멀티미디어 서비스 혁신 클라우드 컴퓨팅 Infrastructure 클라우드에서 프로그래밍하기 결론
25
III. 클라우드 컴퓨팅 Infrastructure
References [1] Dennis Abts and John Kim, “High Performance Datacenter Networks”, MORGAN & CLAYPOOL PUBLISHERS, Mar. 2011. [2] Juniper networks, “Cloud-ready Data Center Reference Architecture”, Juniper networks Inc., Feb. 2011. [3] Sanjeev Kumar, “Social Networking at Scale”, HPCA, Feb. 2012. [4] HP, “HP FlexFabric Reference Architecture Overview”, HP white paper, Apr. 2012. [5] Mark Nowell, Matt Traverso and Kapil Shrikhande, “Data Center Architecture Trends and Their Impact on PMD Requirements”, IEEE 802.3 NG100GE Optics Study Group, Mar. 2012. [6] Ed Austin, “The Anatomy of the Google Architecture”, Google Talk, Nov. 2009. [7] Grace A. Lewis, “Software Architecture and the Cloud”, SASI, May 2012. 26
III. 클라우드 컴퓨팅 Infrastructure
클라우드 컴퓨팅 Infrastructure Today’s Datacenter Architecture Datacenter overview General datacenter architecture Software infrastructure Case studies
New Datacenter Architecture
27
Datacenter Overview
Beowulf: The Early Cluster Thomas Sterling and Donald Becker, NASA, 1994
Connect 128 commodity-grade computers Use “Parallel Virtual Machine” and “Message Passing Interface” 28
Datacenter Overview
Datacenter vs. Supercomputer The early cluster has evolved into two different forms Datacenter server (WSC)
Supercomputer server (Cray XE6)
Sockets per server
2 sockets x86 platform
8 sockets x86 platform
Memory capacity
16GB DRAM
32/64GB DRAM
Disk capacity
5x1TB HDD, 1x160GB SSD
96xPCIe-II (768GB/s per direction)
Compute density
80 sockets per rack
192 sockets per rack
Network bandwidth per rack
1x48-port GigE switch with 40 downlinks and 8 uplinks
48x48-port Gemini switch with 160GB/s bandwidth
Network bandwidth per socket
100Mb/s or 1Gb/s bandwidth
9.6GB/s bandwidth with ncHT3
Low Large
performance High number of operations/watt Small
29
Datacenter Overview
Today’s Datacenter OVH’s (Web hosting service company, France) the newest datacenter built in Montreal, Canada
Two important considerations for datacenter • Energy and security 30
III. 클라우드 컴퓨팅 Infrastructure
클라우드 컴퓨팅 Infrastructure Today’s Datacenter Architecture Datacenter overview General datacenter architecture Software infrastructure Case studies
New Datacenter Architecture
31
General Datacenter Architecture
General Datacenter Architecture (1)
Domain
32
General Datacenter Architecture
General Datacenter Architecture (2) 3-tier architecture Internet Border router
External network Data center
BR
Primary device Redundant device
1. Core tier
2. Aggregation tier
3. Access tier
Access switch
Core switch
CS (active)
Agg. switch
Agg. S (standby)
Service modules
SMs (standby)
AS (standby)
Server
AS
AS
10 Gigabit Ethernet (10 GigE) 1 Gigabit Ethernet (1 GigE)
Aggregation module
AS
AS
Server
Server
Use for application
Use for database
...
Servers Use for web
33
General Datacenter Architecture
Core Tier Objective Layer 3 routing to aggregation modules like a gateway
Requirement High bandwidth and availability
Feature Internet
1. About 8~32 ports of aggregation tier link • Each port has 10 GigE interface
2. Redundant active core switches • High bandwidth to aggregation switches • Weak resiliency
Border router
BR
Core switch
CS
...
...
Core tier
Port Agg. module
Agg. module
...
Agg. module
34
General Datacenter Architecture
Aggregation Tier (1) Objective Provision of services such as firewall, server load balancing, intrusion detection, traffic analysis, and so on Aggregation module
Requirement High bandwidth with low oversubscription Core switch
oversubscription
CS
Aggregation module
Access switch
AS
Access switch
AS
Agg. switch
Agg. Switch
Service modules
SMs
# of switches for sub - network # of switches for upper tier
AS
AS
1.5:1 oversubscription example
Efficient allocation of bandwidth to sub-network Low overhead for processing service modules
Firewall Load balance Detector Analyzer
…
35
General Datacenter Architecture
Aggregation Tier (2) Feature 1. Redundant aggregation modules • Fault tolerance (standby status)
2. Design for low oversubscription 3. Virtual routing and forwarding for bandwidth allocation 4. Server load balancing • IP address mapper between VIP and DIP – VIP: IP address to be seen at the external network – DIP: IP address only used in datacenter
• Algorithms – Least connection – Round-robin – Hashing
36
General Datacenter Architecture
Access Tier (1) Objective Layer 2 switching to physical servers Providing web, application and database servers
Requirement High bandwidth with low oversubscription Bandwidth allocation among VLANs VLAN for web server
Agg. module
Access tier
Access switch
AS
...
VLAN for application server AS
AS
VLAN for database server 10 GigE link
Server Server Server Server
...
1 GigE link Server Server Server Server
37
General Datacenter Architecture
Access Tier (2) Feature 1. Redundant access switch • Fault tolerance (standby status)
2. Design for low oversubscription 3. Bandwidth allocation by virtual switch
38
General Datacenter Architecture
Various Datacenter Designs General architecture can be modified for target
Juniper’s reference architectures
Transaction
High performance computing
Content/services hosting
Enterprise
Small/midsize business
39
III. 클라우드 컴퓨팅 Infrastructure
클라우드 컴퓨팅 Infrastructure Today’s Datacenter Architecture Datacenter overview General datacenter architecture Software infrastructure Case studies
New Datacenter Architecture
40
Software Infrastructure
Software Infrastructure (1) 클라우드 컴퓨팅의 핵심 기술 및 요소와 소프트웨어 구조 간 관계 핵심 기술 및 요소
Software Architecture
클라우드 컴퓨팅 서비스 응용 Application 가상 머신 데이터 분산 처리 프레임워크 분산 데이터베이스
Application Framework
Middleware
가상 머신 모니터 OS 분산 파일 시스템
41
Software Infrastructure
Software Infrastructure (2) 계층적 클라우드 컴퓨팅 서비스 모델 “X-as-a-service” 모델 SaaS user
PaaS user
IaaS user
Application
Software as a Service (SaaS) - Delivers applications to users (E.g., CRM SW by Saleforce.com)
PaaS APIs Application Framework
Platform as a Service (PaaS) - Delivers SW platforms to users (E.g., AppEngine by Saleforce.com)
SaaS APIs
Middleware IaaS APIs Guest OS Hypervisor
Infrastructure as a Service (IaaS) - Delivers virtual machines to users (E.g., EC2 by Amazon)
Cloud Server
42
Software Infrastructure
Software Infrastructure (3) Google cloud 소프트웨어 구조와 서비스 사용 예시 Software architecture 이 컴퓨터엔 아! 워드엑셀이 설치하지 안 말고 깔려있네 내 Google 문서는 엑셀로 Docs로작업해야 작업해야겠다 하는데..
Application
Python Process
JVM
User Code
User Code
SaaS
Application Framework
아! Google 내가 개발할 AppEngine이 웹 응용은 제공하 는 Java 환경에서 런타임 개발하면 환경이 필요한데.. 되겠구나
MapReduce
PaaS
Middleware
OS
Python Environment
Java Environment
RPC
BigTable
GFS
43
Software Infrastructure
Software Infrastructure (4) Amazon cloud 소프트웨어 구조와 서비스 사용 예시 Software architecture Application SimpleDB Service
8,90년대 발행된 신문 내용을 우리 아! Amazon SimpleDB 라면 많은 언론사 사이트에서 쉽게 구조화 검색할 수 데이터를 효과적으로 하자 할 있게 수 있을거야
Application framework Middleware PaaS OS
아! 4G Amazon RAM에 퀴드 EC2 에서 코어인 가상 시스템 머신 여러 몇개 개가 쓰면 필요한데.. 되겠다
VM
VM
S3 Service
EC2 Service
MapReduce
SimpleDB
HDFS (Hadoop)
SOAP-RPC
Hypervisor
Xen
IaaS Huge Data Storage (S3)
44
III. 클라우드 컴퓨팅 Infrastructure
클라우드 컴퓨팅 Infrastructure Today’s Datacenter Architecture Datacenter overview General datacenter architecture Software infrastructure Case studies
New Datacenter Architecture
45
Case Studies
Case Studies Each cloud service provider deploys its own software on the datacenter architecture Entire architecture (including software) case studies Google Facebook Yahoo’ish
46
Case Studies
Case: Google (1) Global website ranking
Global search market share
1
85.68%
Daily visitors
Daily page view
Daily processed data
620M
7.2B
20PB
800K machines
Largest Linux Base 47
Case Studies
Case: Google (2) Architecture Google APP Engine, Google apps, Gmail, others Python, Java, C++, Sawzall, others GWQ MapReduce, BigTable, Chubby lock GFS/GFS II Interior network IPv6 RHEL
HW
Server hardware Rack Datacenter
Worldwide Google datacenters at 2009 36 datacenters and 800K machines
Exterior network
48
Case Studies
Case: Google (3) Architecture Google APP Engine, Google apps, Gmail, others Python, Java, C++, Sawzall, others GWQ MapReduce, BigTable, Chubby lock GFS/GFS II Interior network IPv6
“Where do they store all that Data?”
RHEL
HW
Server hardware Rack Datacenter Exterior network
Standard Google modular cell Each cell holds 1160 servers 250KW power consumption in 30 racks A datacenter would consist of 100s of modular cells
“Where do they store all that Data?”
49
Case Studies
Case: Google (4) Architecture Google APP Engine, Google apps, Gmail, others Python, Java, C++, Sawzall, others GWQ MapReduce, BigTable, Chubby lock GFS/GFS II Interior network IPv6
“How is a server stored in the datacenter?”
HW
RHEL Server hardware
Google rack
Rack
Have their own HW builds Build redundancy on top of failure Motherboard directly mounted into Rack Servers have no casing just bare boards Assist with heat dispersal issues
Datacenter Exterior network
“How is a server stored in the datacenter?”
50
Case Studies
Case: Google (5) Architecture Google APP Engine, Google apps, Gmail, others Python, Java, C++, Sawzall, others GWQ MapReduce, BigTable, Chubby lock GFS/GFS II
“Millions exactly what?” 2-way low-costof commodity server (2009)
Interior network IPv6
HW
RHEL
YEAR
Average Server Specification
Server hardware
1999/2000
PII/PIII 128MB+
Rack
2003/2004
Celeron 533, PIII 1.4 SMP, 2-4GB DRAM, Dual XEON 2.0/1-4GB/40160GB IDE - SATA Disks via Silicon Images SATA 3114/SATA 3124
Datacenter
2006
Dual Opteron/Working Set DRAM(4GB+)/2x400GB IDE (RAID0)
Exterior network
2009
2-Way/Dual Core/16GB/1-2TB SATA
“Millions of exactly what?”
51
Case Studies
Case: Google (6) Architecture Google APP Engine, Google apps, Gmail, others Python, Java, C++, Sawzall, others GWQ MapReduce, BigTable, Chubby lock GFS/GFS II Interior network IPv6
- Custom glibc.. rpc... ipvs... - Custom FS (GFS II) - Custom Kerberos - Custom NFS - Custom CUPS - Custom gPXE bootloader
“The core software on each of those servers”
RHEL Server hardware Rack Datacenter
Kernel/subsystem key modifications tcmalloc – replaces glibc (faster and suit for threads) rpc – performance increase (52%) and latency decrease (40%)
Exterior network
“The core software on each of those servers”
52
Case Studies
Case: Google (7) Architecture Google APP Engine, Google apps, Gmail, others Python, Java, C++, Sawzall, others GWQ MapReduce, BigTable, Chubby lock GFS/GFS II Interior network IPv6 RHEL
Routing protocol • • • •
IPv6 Heavily modified version of OSPF as IRP Intra-rack network is 100baseT Inter-rack network is 1000baseT
“How does your data travel around the Google empire?” Technology providers • Juniper, Cisco, Foundry, HP, etc.
Server hardware Rack Datacenter
Software • ipvs (ip virtual server)
Exterior network
“How does your data travel around the Google empire?”
53
Case Studies
Case: Google (8) Architecture Google APP Engine, Google apps, Gmail, others Python, Java, C++, Sawzall, others GWQ MapReduce, BigTable, Chubby lock GFS/GFS II Interior network IPv6 RHEL
“Manages the underlying Data on behalf of the upper layers Google File System IIthe applications” and ultimately
Server hardware Rack Datacenter Exterior network
• Consists of Master servers and Chunk servers • Chunk servers serve the data in 1MB chunks • Data redundancy/fault tolerance: triplicate copies of chunks (during 2004-2008, GFS I lost only 1 chunk) • Elegant Master failover: no more 2s delays • Data compression: BMDiff/Zippy
“Manages the underlying Data on behalf of the upper layers and ultimately the applications”
54
Case Studies
Case: Google (9) Architecture
MapReduce
Google APP Engine, Google apps, Gmail, others Python, Java, C++, Sawzall, others GWQ MapReduce, BigTable, Chubby lock GFS/GFS II Interior network IPv6
“Computes the underlying Data on behalf of the applications”
RHEL Server hardware Rack Datacenter
• Language bindings: C++, Java, Python, Sawzall • Statistics: September 2009 3,467,000 MR jobs with an average 475s completion time, 488 machines per MR and utilizing 25.5K machine years
Exterior network
“Computes the underlying Data on behalf of the applications”
55
Case Studies
Case: Google (10) Architecture Google APP Engine, Google apps, Gmail, others
BigTable
Python, Java, C++, Sawzall, others GWQ MapReduce, BigTable, Chubby lock GFS/GFS II Interior network IPv6 RHEL Server hardware Rack Datacenter
• Google database implementation since 1994 • Used internally for all large scale (search, indexing, Gmail, etc.) • Data referencing: Distributed Multi-dimensional Sparse Map (simple addressing model: {row, column, timestamp})
“Accesses the underlying Data ontables behalf of down theinupper How are broken storage? layers - Largeultimately tables split into tablets at row boundaries and the applications” - Tablets spread over DC - Tablet size is 100-200MB of compressed data - Load balanced: migrate tablets from heavily loaded machines to lightly loaded ones - Heavily used tablets probably stay in working set (cached)
Exterior network
“Accesses the underlying Data on behalf of the upper layers and ultimately the applications”
56
Case Studies
Case: Google (11) Architecture Google APP Engine, Google apps, Gmail, others
Chubby lock
Python, Java, C++, Sawzall, others GWQ MapReduce, BigTable, Chubby lock GFS/GFS II Interior network IPv6 RHEL Server hardware
• • • • •
Google’s Distributed File Locking Service for BigTable Provides Mutex Support for Data Access Used to synchronize access to shared resources Consists of a Master and Slaves (designated by election) Failover consists of a Slave replacing the functionality of a Master • Also servers as an ultra-fast high availability File Server for small fines (100‘s bytes) • Provides an ACL for tablet authentication (row and column data)
Rack Datacenter Exterior network
“Accesses the underlying Data on behalf of the upper layers and ultimately the applications”
57
Case Studies
Case: Google (12) Architecture Google APP Engine, Google apps, Gmail, others Python, Java, C++, Sawzall, others GWQ MapReduce, BigTable, Chubby lock GFS/GFS II Interior network IPv6 RHEL
Google WorkQueue • Batch submission/scheduler system • Software to submit Mapreduce jobs to a cell • Arbitrates (process priorities) schedules, allocates resources, process failover, reports status, collects results • Launched via API or command line
“Provides Resource Management for the Computational Jobs”
Server hardware Rack Datacenter Exterior network
“Provides Resource Management for the Computational Jobs”
58
III. 클라우드 컴퓨팅 Infrastructure
Contents Today’s Datacenter Architecture New Datacenter Architecture
59
New Datacenter Architecture
Drivers for New Datacenter Architectures (1) “The consequence of changing application deployment and increased use of VM migration will mean that traffic patterns in the data center network are changing from being predominantly client/server (north-south) to a significant level of server-toserver (east-west) flows. By 2014, network planners should expect more than 80 percent of traffic in the data center network to be between servers” [1]
[1] Gartner, “Your Data Center Network Is Heading for Traffic Chaos, Bjarne Munch”, 27 April 2011, ID Number: G00210674.
60
New Datacenter Architecture
Drivers for New Datacenter Architectures (2) 1. Datacenter consolidation • Customers are deploying more and more sophisticated applications on a larger scale. • To reduce the complexity and improve operations of these deployments, customers are seeking to consolidate fragmented, dispersed facilities into fewer, centralized locations.
2. Increasingly powerful and scalable compute • Large-scale solutions are dramatically increasing network performance requirements at the server edge and across the extended network. • Live migration for moving VMs are introducing high-volume machine-to-machine traffic flows.
3. New application deployment and delivery models • Web 2.0 mashups, SOA solutions, and other federated applications are being widely deployed. • These deployments drive new, bandwidth-intensive traffic flows within the datacenter and demand low-latency, high-performance server-to-server and intra-server, VM-to-VM connections.
4. Virtualization and cloud mega trends • Conventional hierarchical datacenter built to support traditional siloed IT architectures can’t meet the security, agility, and price/performance requirements of virtualized cloud computing. • Emerging clouds must implement flatter, simpler data center networks.
61
New Datacenter Architecture
Requirements for the New Cloudoptimized Datacenter (1) Low-latency server-to-server connections
High availability, business continuity and disaster recovery
Grater performance and resiliency
Converged network infrastructure
Large layer 2 domains
Unified management
Higher bandwidth at the server edge
Virtualization-aware security
Reliable application delivery across public or private cloud 62
New Datacenter Architecture
Requirements for the New Cloudoptimized Datacenter (2) Legacy design vs. emerging cloud requirements Traditional legacy network design
Emerging cloud network requirements
80% traffic north-to-south
80% traffic east-to-west
Inter-rack latency 100+us
Inter-rack latency 15+us
Up to 64:1 oversubscription
1:1 oversubscription
10/100M and GbE attached rack servers
10/40 GbE attached Blade servers
Siloed, serial application/network provisioning model, CLI
Agile, flexible control plan provisioning
Designed for peaks (over-provisioned)
Right-sized design burst as needed
High cost and complexity
Lower (shared) cost and complexity
63
New Datacenter Architecture
Architecture Change 3-tier architecture
• Tree-based architecture optimized for N-S traffic • Over-subscription in access, aggregation and core
Non-blocking datacenter fabric
• Meshed architecture better suited for E-W traffic • Over-subscription only in access, 1:1 in aggregation and core
64
Understanding Cloud Computing
Agenda I. II. III. IV. V.
클라우드 컴퓨팅이란? 클라우드 컴퓨팅을 통한 멀티미디어 서비스 혁신 클라우드 컴퓨팅 Infrastructure 클라우드에서 프로그래밍하기 결론
65
V. 클라우드에서 프로그래밍하기
아마존 웹 서비스 (AWS) Amazon.com이 제공하는 각종 원격 컴퓨팅 서비스 여러 가지 서비스들이 모여서 클라우드 컴퓨팅 플랫폼을 구성 클라우드 컴퓨팅 사용량의 약 70%를 점유 수십 만개의 비즈니스가 190여 개 국에 서비스 되고 있음
66
V. 클라우드에서 프로그래밍하기
AWS의 분류
67
V. 클라우드에서 프로그래밍하기
AWS의 주요 구성 요소
68
V. 클라우드에서 프로그래밍하기
AWS의 활용 예제 방대한 웹 문서들을 대상으로 정규식을 통한 검색을 어떻게 수행할 것인가? 예, 선거 여론 조사를 위한 트위터 멘션 분석
69
V. 클라우드에서 프로그래밍하기
AWS의 활용 예제 – GrepTheWeb 예제: GrepTheWeb 개요 • 웹 문서들을 대상으로 grep 명령을 사용한다는 의미의 이름 – grep : 유닉스에서 패턴 검색을 위해서 사용되는 명령어
• 현재 Amazon.com 에서 서비스 되고 있음
70
V. 클라우드에서 프로그래밍하기
GrepTheWeb 구조 – Zoom Level 1 입력 (방대한) 웹 문서 리스트 정규식 패턴
출력 정규식 패턴을 포함하는 웹 문서 리스트
71
V. 클라우드에서 프로그래밍하기
GrepTheWeb 설계 (1) 요구 사항 1. 2. 3. 4. 5.
빅데이터 (수백 테라 바이트) 처리 가능해야 함 수많은 사용자의 요청을 동시에 수행 가능해야 함 요구에 따라 작업 처리 규모가 커질 것 작업 처리 규모가 커질 때 많은 비용이 들지 않을 것 Idle 상태를 유지할 때 비용이 들지 않을 것 이러한 요구사항을 모두 만족하는 프로그램을 처음부터 새로 개발하는 것은 비현실적!
72
V. 클라우드에서 프로그래밍하기
GrepTheWeb 설계 (2) AWS를 사용한다면… Just Plug In…
프로그래머의 역할 MapReduce 알고리즘 개발 (Map Function과 Reduce Function)
AWS가 제공하는 것들 - 빅데이터 분산 처리 - 수많은 요청의 병렬 처리 - 요청 증가에 따른 유연한 리소스 확장 - 쓰는 만큼만 비용 지불 (pay-per-use) - Idle 상태 비용 없음
단 67 라인의 Java 프로그래밍 (http://risenfall.wordpress.com/2012/01/08/ distributed-grep-using-hadoop/)
73
V. 클라우드에서 프로그래밍하기
GrepTheWeb 설계 (3) AWS를 사용한다면… 사용자 요청에 따라 EC2 Instance(VM)이 동적으로 할당됨 개발자가 작성한 MapReduce 알고리즘 수행자(worker)가 분 산 배치되어 수행됨
Map Worker Map MapWorker Worker MapReduce 알고리즘 Reduce Reduce Reduce Worker Worker Worker
74
V. 클라우드에서 프로그래밍하기
GrepTheWeb 구조 – Zoom Level 2
75
V. 클라우드에서 프로그래밍하기
GrepTheWeb 에 사용되는 AWS 구성요소들 (1) Amazon SQS (Simple Queue Service) 버퍼를 제공하여 AWS의 여러 구성 요소들을 연결함 메시지 전달자의 역할을 수행 AWS 구성 요소간 정보를 전달하는 방법을 하나의 방식으로 통일
컴포넌트간 분리 (Decoupling) • 컨트롤러들이 다른 컨트롤러를 직접적으로 호출하지 않음
76
V. 클라우드에서 프로그래밍하기
GrepTheWeb 에 사용되는 AWS 구성요소들 (2) Amazon SimpleDB (Non-relational database) 각 구성요소의 상태를 저장 상태 추적 및 모니터링
77
V. 클라우드에서 프로그래밍하기
GrepTheWeb 에 사용되는 AWS 구성요소들 (3) Amazon EC2 (Elastic Compute Cloud) 사용자에게 virtual machine instance를 제공 • Hadoop을 수행하여 대규모 분산 처리를 수행 • 모든 컨트롤러 코드들이 수행되는 곳
Amazon S3 (Simple Storage Service) 입력 데이터와 출력 데이터를 저장
Hadoop 대규모 분산처리를 지원하는 오픈 소스 프레임워크 분산처리, 자동 병렬화, 작업 스케줄링을 제공
78
V. 클라우드에서 프로그래밍하기
결과와 비용 두 가지 경우의 테스트 결과 Email 주소를 정규식 검색의 입력으로 천만개의 문서를 대상으로 검색을 수행 인스턴스 개수
소요 시간
소요 비용
48개
21분
$5
92개
6분
$ 10
79
V. 클라우드에서 프로그래밍하기
GrepTheWeb – 결론 클라우드를 사용함으로써, 작업을 많은 수의 노드로 나누어서 병렬적으로 대규모 분산 처리 수행 작업 처리량에 따라 작업 처리 규모가 증가 Idle 시간을 최소화하여 인프라스트럭쳐를 최대한 효율적으 로 사용 작업 처리 규모를 증가시키는데 큰 비용이 소요되지 않음
80
Understanding Cloud Computing
Agenda I. II. III. IV. V.
클라우드 컴퓨팅이란? 클라우드 컴퓨팅을 통한 멀티미디어 서비스 혁신 클라우드 컴퓨팅 Infrastructure 클라우드에서 프로그래밍하기 결론
81
V. 결론
Summary 클라우드 컴퓨팅 Provides on-demand, network access to configurable computing resources
클라우드 컴퓨팅을 통한 멀티미디어 서비스 혁신 콘텐츠 품질 향상, 재해 복구, 탄력적 IT 인프라 확장, N-Screen
클라우드 컴퓨팅의 핵심 기술 가상화 기술 분산 파일 시스템 데이터 분산 처리 프레임워크 웹 응용을 위한 표준 언어와 운영체제 82