한재선 (NexR 대표이사 · 2015-01-22 · Google의Bigtable 사용현황 At March, 2008 500+...

37
S1 2008. 4. 24 한재선 (NexR 대표이사) [email protected] http://www.nexr.co.kr H.P: 016-405-5469

Transcript of 한재선 (NexR 대표이사 · 2015-01-22 · Google의Bigtable 사용현황 At March, 2008 500+...

Page 1: 한재선 (NexR 대표이사 · 2015-01-22 · Google의Bigtable 사용현황 At March, 2008 500+ BigTable cells Largest cells manage 6000TB+ of data, 3000+ machines Busiest cells

S1

2008. 4. 24

한 재 선 (NexR 대표이사)

[email protected]

http://www.nexr.co.kr

H.P: 016-405-5469

Page 2: 한재선 (NexR 대표이사 · 2015-01-22 · Google의Bigtable 사용현황 At March, 2008 500+ BigTable cells Largest cells manage 6000TB+ of data, 3000+ machines Busiest cells

S2

Google 검색의 성공요인은?

Page 3: 한재선 (NexR 대표이사 · 2015-01-22 · Google의Bigtable 사용현황 At March, 2008 500+ BigTable cells Largest cells manage 6000TB+ of data, 3000+ machines Busiest cells

S3

Linking = Voting

Page 4: 한재선 (NexR 대표이사 · 2015-01-22 · Google의Bigtable 사용현황 At March, 2008 500+ BigTable cells Largest cells manage 6000TB+ of data, 3000+ machines Busiest cells

S4

Big Problem

대용량 데이터 저장 대용량 데이터 처리

Page 5: 한재선 (NexR 대표이사 · 2015-01-22 · Google의Bigtable 사용현황 At March, 2008 500+ BigTable cells Largest cells manage 6000TB+ of data, 3000+ machines Busiest cells

S5

출처: Data-Rich Computing: Where It's At (Intel)

Large Dataset!!!

Page 6: 한재선 (NexR 대표이사 · 2015-01-22 · Google의Bigtable 사용현황 At March, 2008 500+ BigTable cells Largest cells manage 6000TB+ of data, 3000+ machines Busiest cells

S6

GFS: 분산 파일 시스템

Bigtable: 분산 데이터베이스

MapReduce: 분산 데이터 처리 시스템

Google 검색 플랫폼

Commodity PC 서버 클러스터

Google Search

Page 7: 한재선 (NexR 대표이사 · 2015-01-22 · Google의Bigtable 사용현황 At March, 2008 500+ BigTable cells Largest cells manage 6000TB+ of data, 3000+ machines Busiest cells

S7

Google 검색 플랫폼 원칙

우수한 비용대비성능비 High Throughput

값싼 서버들의 클러스터 분산 저장 및 병렬 처리

Google

검색 플랫폼

목표

소프트웨어에 의한안정성 확보

최신 기술 및 오픈소스 활용

분산 플랫폼 구축

Page 8: 한재선 (NexR 대표이사 · 2015-01-22 · Google의Bigtable 사용현황 At March, 2008 500+ BigTable cells Largest cells manage 6000TB+ of data, 3000+ machines Busiest cells

S8

Commodity PC 클러스터

WIN

CPU: Dual 2 GHz Intel XeonRAM: 2 GBDisk: 80 GB

X 88 대

= 176 2GHz CPU, 176GB RAM, 7TB Disk

CPU: 8 2 GHz Intel XeonRAM: 64 GBDisk: 8 TB

x86-based Server

$758,000$278,000

(2002년 비교)

Page 9: 한재선 (NexR 대표이사 · 2015-01-22 · Google의Bigtable 사용현황 At March, 2008 500+ BigTable cells Largest cells manage 6000TB+ of data, 3000+ machines Busiest cells

S9

분산 파일 시스템

Shared Disk System(SAN, NAS, DAS)

Distributed Disk System(GFS)

고려요소Large Volume, Scalability, Cost, Performance, Reliability, Manageability

Page 10: 한재선 (NexR 대표이사 · 2015-01-22 · Google의Bigtable 사용현황 At March, 2008 500+ BigTable cells Largest cells manage 6000TB+ of data, 3000+ machines Busiest cells

S10

GFS: 분산 파일 시스템

Search

Engine

file reqeust

chunk locations

metadata관리

Master

chunk reqeust

chunk data

crawldb file

Chunkservers

Single flat 파일 시스템 이미지 Shared-Nothing 구조로 우수한 확장성읽기 성능 최적화 3개 이상의 복사본 유지로 파일 안정성 확보큰 chunk 사이즈로 대용량 파일에 적합

Page 11: 한재선 (NexR 대표이사 · 2015-01-22 · Google의Bigtable 사용현황 At March, 2008 500+ BigTable cells Largest cells manage 6000TB+ of data, 3000+ machines Busiest cells

S11

Google의 GFS 사용현황

At March, 2008 200+ GFS clusters Managed by an internal service team Largest clusters

– 5000+ machines– 5+ PB of disk usage– 10000+ clients

출처: Handling Large Datasets at Google: Current Systems and Future Directions 발표자료

Page 12: 한재선 (NexR 대표이사 · 2015-01-22 · Google의Bigtable 사용현황 At March, 2008 500+ BigTable cells Largest cells manage 6000TB+ of data, 3000+ machines Busiest cells

S12

분산 데이터베이스

고려요소Large Volume, Scalability, Cost, Performance, Reliability, Manageability

Simple DistributedData Store

Traditional RDBMS

Page 13: 한재선 (NexR 대표이사 · 2015-01-22 · Google의Bigtable 사용현황 At March, 2008 500+ BigTable cells Largest cells manage 6000TB+ of data, 3000+ machines Busiest cells

S13

Bigtable: 분산 데이터베이스

컬럼 기반 대용량 데이터베이스정형 및 반정형 데이터 저장 Shared-Nothing 구조로 우수한 확장성 No ACID, No two-phase commit, No SQL, No Join

Google Search, Earth 등 60개 이상 제품에 사용

rowkey

columnvalue

column1rowkey

columnvalue

column2rowkey

columnvalue

column3

IndexTable

GFS Chunkservers

Multi-dimensional sparse

sorted map

Page 14: 한재선 (NexR 대표이사 · 2015-01-22 · Google의Bigtable 사용현황 At March, 2008 500+ BigTable cells Largest cells manage 6000TB+ of data, 3000+ machines Busiest cells

S14

Google의 Bigtable 사용현황

At March, 2008 500+ BigTable cells Largest cells manage 6000TB+ of data, 3000+ machines Busiest cells sustain >500000+ ops/second 24 hours/day, and peak muchhigher

출처: Handling Large Datasets at Google: Current Systems and Future Directions 발표자료

Page 15: 한재선 (NexR 대표이사 · 2015-01-22 · Google의Bigtable 사용현황 At March, 2008 500+ BigTable cells Largest cells manage 6000TB+ of data, 3000+ machines Busiest cells

S15

MapReduce: 분산 데이터 처리

분산 병렬 데이터 처리 프로그래밍 프레임워크대용량 데이터 & 대규모 시스템 고려 Simple: map & reduce (key/value 기반)

병렬처리, 데이터분산, 부하분산, 장애처리 Indexing, Search Quality, Earth, News 등 모든 곳에 사용

M

M

M

M

M

R

R

split 0

split 1

split 2

split 3

split 4

입력데이터(GFS)

mapprocess

reduceprocess

중간결과(local)

최종데이터(GFS)

Page 16: 한재선 (NexR 대표이사 · 2015-01-22 · Google의Bigtable 사용현황 At March, 2008 500+ BigTable cells Largest cells manage 6000TB+ of data, 3000+ machines Busiest cells

S16

MapReduce 동작순서

Task들의 병렬처리

출처: Google Slide (http://labs.google.com/papers/mapreduce-osdi04-slides/index.html)

MapReduce 논리적 처리 흐름

map(k, v) list (k’, v’)

reduce(k’, list (v’)) list (v”)

Page 17: 한재선 (NexR 대표이사 · 2015-01-22 · Google의Bigtable 사용현황 At March, 2008 500+ BigTable cells Largest cells manage 6000TB+ of data, 3000+ machines Busiest cells

S17

MapReduce 예: Link DB 생성

map(String input_key, String input_value):

// input_key: document_url

// input_value: document contents

for each anchor a in input_value:

EmitIntermediate(a, key);

reduce(String output_key,

Iterator intermediate_values):

// output_key: url

// output_value: linkdb_entry(with PageRank)

LinkDbEntry ent = new LinkDbEntry(output_key);

for each v in intermediate_values:

ent.add(v);

ent.calcPageRank();

WriteBigtable(ent);

foo.com bar.com

a.com

b.com

c.com

a.com

(a.com, foo.com)(b.com, foo.com)

(a.com, bar.com)(c.com, bar.com)

(a.com, [foo.com,bar.com])

a.com pagerank inlinks

Pseudo Code

Page 18: 한재선 (NexR 대표이사 · 2015-01-22 · Google의Bigtable 사용현황 At March, 2008 500+ BigTable cells Largest cells manage 6000TB+ of data, 3000+ machines Busiest cells

S18

Worker

t1GFS

Worker

GFS

Worker

t2GFS

Worker

t3GFS

Node #1 Node #2 Node #3 Node #n

job queue

Workqueuejob

(gen_linkdb)input list

taskallocation

JobClient

Job Submission

GFS에 Job 입력 데이터(Crawl DB) 저장

master

MapReduce 시스템

Data Locality: Computation이 데이터 위치로 이동 High aggregate bandwidth

Page 19: 한재선 (NexR 대표이사 · 2015-01-22 · Google의Bigtable 사용현황 At March, 2008 500+ BigTable cells Largest cells manage 6000TB+ of data, 3000+ machines Busiest cells

S19

Google의 MapReduce 사용현황

MapReduce 개발 및 사용 통계

MapReduce 프로그램 증가

MapReduce는 일종의 소프트웨어 컴포넌트 재사용성 증가에 따른 개발 생산성 향상

출처: MapReduce: simplified data processing on large clusters (CACM 2008)

Page 20: 한재선 (NexR 대표이사 · 2015-01-22 · Google의Bigtable 사용현황 At March, 2008 500+ BigTable cells Largest cells manage 6000TB+ of data, 3000+ machines Busiest cells

S20

Google의 MapReduce 사용예

large-scale machine learning problems

clustering problems for the Google News and Froogle

products

extracting data to produce reports of popular queries

(e.g. Google Zeitgeist and Google Trends)

extracting properties of Web pages for new experiments

and products (e.g. extraction of geographical locations

from a large corpus of Web pages for localized search)

processing of satellite imagery data

language model processing for statistical machine

translation

large-scale graph computations

출처: MapReduce: simplified data processing on large clusters (CACM 2008)

Page 21: 한재선 (NexR 대표이사 · 2015-01-22 · Google의Bigtable 사용현황 At March, 2008 500+ BigTable cells Largest cells manage 6000TB+ of data, 3000+ machines Busiest cells

S21

Google 검색엔진의 플랫폼 분석

출처: The Anatomy of a Large-Scale Hypertextual Web Search Engine (WWW 1998)

WebTable

LexiconTable

IndexTable

DocumentTable

MapReduce

Bigtable

Page 22: 한재선 (NexR 대표이사 · 2015-01-22 · Google의Bigtable 사용현황 At March, 2008 500+ BigTable cells Largest cells manage 6000TB+ of data, 3000+ machines Busiest cells

S22

SummaryGoogle 플랫폼의 교훈

비용대비성능비 우수한 솔루션 선택 저가 서버 클러스터

시스템 안정성을 HW보다 SW에서 구현 대용량 데이터 저장 및 처리 플랫폼 구축 플랫폼 중심의 어플리케이션 개발 데이터 처리 SW 컴포넌트화 미래는 Rapid Analysis가 핵심

Page 23: 한재선 (NexR 대표이사 · 2015-01-22 · Google의Bigtable 사용현황 At March, 2008 500+ BigTable cells Largest cells manage 6000TB+ of data, 3000+ machines Busiest cells

S23

Google Platform CloneApache Open Source Project

http://hadoop.apache.org/core/

Page 24: 한재선 (NexR 대표이사 · 2015-01-22 · Google의Bigtable 사용현황 At March, 2008 500+ BigTable cells Largest cells manage 6000TB+ of data, 3000+ machines Busiest cells

S24

Hadoop이란?

Brief History

2005년 Doug Cutting(Lucene & Nutch 개발자)에 의해 시작

Nutch 오픈소스 검색엔진의 분산확장 이슈에서 출발

2006년 Yahoo의 젂폭적인 지원 (Doug Cutting과 젂담팀 고용)

2008년 Apache Top-level Project로 승격

현재(2008년4월) 0.16.3 release

Hadoop

Java 언어 기반

Apache 라이선스

많은 컴포넌트들

HDFS, HBase, MapReduce, Hadoop On Demand(HOD),

Streaming, HQL, Hama, Mahout, etc

Page 25: 한재선 (NexR 대표이사 · 2015-01-22 · Google의Bigtable 사용현황 At March, 2008 500+ BigTable cells Largest cells manage 6000TB+ of data, 3000+ machines Busiest cells

S25

Hadoop Architecture

HDFS: 분산 파일 시스템

HBase: 분산 데이터베이스

MapReduce: 분산 데이터 처리 시스템

Commodity PC 서버 클러스터

Nutch: Open Source Search EngineGoogleSearch

MapReduce

Bigtable

GFS

Page 26: 한재선 (NexR 대표이사 · 2015-01-22 · Google의Bigtable 사용현황 At March, 2008 500+ BigTable cells Largest cells manage 6000TB+ of data, 3000+ machines Busiest cells

S26

Injector

Generator

Fetcher

ParseSegment

CrawlDb(update)

depth = 0?

DeleteDuplicates

LinkDb(invert)

Indexer

IndexMerge

seed URL list

fetchURL list

pages(segments)

newcrawl db

pagemetadata

Yes

No

linklist

luceneindexes

mergedindex

Nutch: Search over HadoopCrawling

MapReduceIndexing

MapReduce

HDFSHDFS

Page 27: 한재선 (NexR 대표이사 · 2015-01-22 · Google의Bigtable 사용현황 At March, 2008 500+ BigTable cells Largest cells manage 6000TB+ of data, 3000+ machines Busiest cells

S27

Powered by HadoopComplete List: http://wiki.apache.org/hadoop/PoweredBy

Page 28: 한재선 (NexR 대표이사 · 2015-01-22 · Google의Bigtable 사용현황 At March, 2008 500+ BigTable cells Largest cells manage 6000TB+ of data, 3000+ machines Busiest cells

S28

Hadoop in Yahoo!

Hadoop Cluster 10,000 대 이상 규모현재 최대 클러스터: 1600 대거의 1 PB 사용자 데이터 저장주당 10,000개 research job들 실행

최대 규모의 Hadoop 적용 싸이트

Webmap최대 Hadoop Production App.웹 문서 품질 분석단일 MapReduce 실행 위해 10,000

core 이상 사용 300 TB 데이터 출력(압축) 5 PB 디스크 사용

Page 29: 한재선 (NexR 대표이사 · 2015-01-22 · Google의Bigtable 사용현황 At March, 2008 500+ BigTable cells Largest cells manage 6000TB+ of data, 3000+ machines Busiest cells

S29

Hadoop의 약진

Google과 IBM의 대학 분산 플랫폼 수업 지원수백대 규모 클러스터 제공

UW, MIT, Stanford, UM, CMU, UC BerkerlyHadoop으로 MapReduce 프로그래밍 교육

Yahoo!의 CMU에 대용량 데이터 처리 연구 지원M45 Cluster: 4000 processors, 3 TB memory, 1.5 PB disk

검색, Information Retrieval, 자연어처리, 기계번역 등Hadoop을 이용한 분산 데이터 처리 연구

Blue Cloud

대용량 데이터 저장 및 처리를 위한 유력한 오픈소스 솔루션 기업 분산 플랫폼의 de-facto standard 새로운 분산 프로그래밍 표준(MapReduce) 대학 교육 및 연구를 위한 표준 도구 Cloud Computing의 기반 소프트웨어 플랫폼

Page 30: 한재선 (NexR 대표이사 · 2015-01-22 · Google의Bigtable 사용현황 At March, 2008 500+ BigTable cells Largest cells manage 6000TB+ of data, 3000+ machines Busiest cells

S30

Amazon

Dynamo: Highly Available Key-value Store (Amazon S3에서 사용)

MS

Dryad: Distributed Data-Parallel Programs from Sequential Building Blocks (MapReduce와 경쟁)

Yahoo

Pig, ZooKeeper

Open Source

IBM MapReduce Tools for Eclipse

Hypertable: Bigtable clone in C++ (HBase와 경쟁)

CouchDB: Distributed, fault-tolerant and schema-free document-oriented database

Kosmos File System (KFS): GFS clone in C++ (HDFS와 경쟁)

Skynet: Ruby Map/Reduce Framework

Hadoop’s Alternatives

플랫폼 소프트웨어 개발이 활발히 진행됨

Page 31: 한재선 (NexR 대표이사 · 2015-01-22 · Google의Bigtable 사용현황 At March, 2008 500+ BigTable cells Largest cells manage 6000TB+ of data, 3000+ machines Busiest cells

S31

검색 플랫폼의 진화

Page 32: 한재선 (NexR 대표이사 · 2015-01-22 · Google의Bigtable 사용현황 At March, 2008 500+ BigTable cells Largest cells manage 6000TB+ of data, 3000+ machines Busiest cells

S32

Lucene

Nutch

Apache Open Source Infra.

IBM MapReduce ToolsEclipse plug-in for

MapReduce programs

NexR MRFlowMapReduce Workflow

Management

Amazon S3 & EC2 SupportRunning Hadoopwith S3 & on EC2 ?

Open “Search Platform”

HDFS, HBase, MapReduceYahoo Pig

Query Language Interface on Hadoop

Yahoo ZookeeperDistributed Management

Page 33: 한재선 (NexR 대표이사 · 2015-01-22 · Google의Bigtable 사용현황 At March, 2008 500+ BigTable cells Largest cells manage 6000TB+ of data, 3000+ machines Busiest cells

S33

검색 플랫폼의 확장

시작은 검색 플랫폼으로 출발

Google 검색엔진 Google 플랫폼Nutch 검색엔진 Hadoop 플랫폼

범용 플랫폼으로 확장

대용량 데이터 저장 및 처리를 위한 플랫폼Cloud Computing 플랫폼

Page 34: 한재선 (NexR 대표이사 · 2015-01-22 · Google의Bigtable 사용현황 At March, 2008 500+ BigTable cells Largest cells manage 6000TB+ of data, 3000+ machines Busiest cells

S34

Cloud Computing 플랫폼

2008년 4월 7일Google App Engine 오픈

Run your web applications on Google's infrastructure

500MB Storage, 10 GB Bandwidth In&Out/day, 5 million PV/1month 무료제공Python 개발홖경 제공 (webapp framework)

파일 시스템으로 GFS, 데이터베이스 대신 Bigtable 사용서비스 제공자는 Performance, Scalability, Fault-tolerance 등의 시스템 작업서 해방

http://code.google.com/appengine/

Page 35: 한재선 (NexR 대표이사 · 2015-01-22 · Google의Bigtable 사용현황 At March, 2008 500+ BigTable cells Largest cells manage 6000TB+ of data, 3000+ machines Busiest cells

S35S35

References

Google PlatformGoogle Cluster Architecture, http://research.google.com/archive/googlecluster.html

Google Search Engine Paper, http://infolab.stanford.edu/~backrub/google.html

Google File System, http://labs.google.com/papers/gfs.html

Bigtable, http://labs.google.com/papers/bigtable.html

MapReduce, http://labs.google.com/papers/mapreduce.html

Sawzall, http://labs.google.com/papers/sawzall.html

Handling Large Datasets at Google: Current Systems and Future Directions, http://research.yahoo.com/files/6DeanGoogle.pdf

How Google Works, Baseline Magazine, http://www.baselinemag.com/article2/0,1540,1985047,00.asp

HadoopOfficial site, http://hadoop.apache.org/core/

Hadoop Wiki, http://wiki.apache.org/hadoop/FrontPage

Nutch official site, http://lucene.apache.org/nutch/

Yahoo! Hadoop Blog, http://developer.yahoo.com/blogs/hadoop/

Hadoop Summit 2008, http://developer.yahoo.com/hadoop/summit/

Hadoop Summit 2008 Slides & Video, http://research.yahoo.com/node/2104

IBM MapReduce Tools for Eclipse, http://www.alphaworks.ibm.com/tech/mapreducetools

Yahoo! Pig, http://research.yahoo.com/project/90

Yahoo! Zookeeper, http://developer.yahoo.com/blogs/hadoop/2008/03/intro-to-zookeeper-video.html

Page 36: 한재선 (NexR 대표이사 · 2015-01-22 · Google의Bigtable 사용현황 At March, 2008 500+ BigTable cells Largest cells manage 6000TB+ of data, 3000+ machines Busiest cells

S36S36

References

Hadoop’s AlternativesAmazon Dynamo, http://s3.amazonaws.com/AllThingsDistributed/sosp/amazon-dynamo-sosp2007.pdf

MS Dryad, http://research.microsoft.com/research/sv/dryad/

CouchDB, http://incubator.apache.org/couchdb/

Hypertable, http://hypertable.org/

Kosmos Distributed File System, http://kosmosfs.sourceforge.net/

Skynet, http://skynet.rubyforge.org/

Articles about Hadoophttp://radar.oreilly.com/archives/2007/08/yahoos_bet_on_h.html

http://open.blogs.nytimes.com/2007/11/01/self-service-prorated-super-computing-fun/

http://www.nytimes.com/2007/11/15/technology/15blue.html

http://www.businessweek.com/magazine/content/07_52/b4064000281756.htm

http://www.washingtonpost.com/wp-dyn/content/article/2007/10/10/AR2007101000016.html

http://www.sciam.com/article.cfm?id=yahoo-supercomputer-google-open-source

Lectures about Hadoop & MapReduceUniversity of Washington, http://www.cs.washington.edu/education/courses/cse490h/07sp/

Google MapReduce Mini Lecture, http://code.google.com/edu/submissions/mapreduce-minilecture/listing.html

MIT MapReduce Course, http://mr.iap.2008.googlepages.com/home

Page 37: 한재선 (NexR 대표이사 · 2015-01-22 · Google의Bigtable 사용현황 At March, 2008 500+ BigTable cells Largest cells manage 6000TB+ of data, 3000+ machines Busiest cells

S37

보다 기술적이고 자세한 내용은 PlatformDay 행사(무료)에서 다루겠습니다.2008년 5월 30일 금요일 10:00 ~ 18:00

서울대 엔지니어하우스 (310동) 대강당 (101호)

http://www.platformday.com