10
구글의 분산데이타베이스 (Bigtable) 구글을 지탱하는 기술 #3 박혜웅 2010.07.22 본 내용은 요약자의 주관적인 견해가 반영되어 있으므로 정확한 내용은 원서 ”구글을 지탱하는 기술” 를 참고하시기 바랍니다

구글을 지탱하는 기술 요약 - Bigtable

  • Upload
    -

  • View
    123

  • Download
    4

Embed Size (px)

Citation preview

Page 1: 구글을 지탱하는 기술 요약 - Bigtable

구글의 분산데이타베이스 (Bigtable)

구글을 지탱하는 기술 #3

박혜웅2010.07.22

본 내용은 요약자의 주관적인 견해가 반영되어 있으므로정확한 내용은 원서 ”구글을 지탱하는 기술” 를 참고하시기 바랍니다

Page 2: 구글을 지탱하는 기술 요약 - Bigtable

구글의 분산 아키텍쳐

Google File System(Distributed File System)

Page 3: 구글을 지탱하는 기술 요약 - Bigtable

오픈소스 진영의 분산 아키텍쳐(Apache)

Hadoop File System(Distributed File System)

Page 4: 구글을 지탱하는 기술 요약 - Bigtable

Bigtable 구조

Row Key Column Family:

Column Key Column Key

row

Data

Data

Data

Data Data

Data

Data Data

Time

old timestamp

new timestamp

Column Family:

Locality Group

Column Key

Row Key Column Family:Column Key Timestamp Data

Bigtable

RDBMS

Primary Key Value

Column Key

Page 5: 구글을 지탱하는 기술 요약 - Bigtable

Bigtable 스키마 예

URL contents:

korean english

구글 Google

구글검색Time

anchor:

Bigtable

RDBMS google.com

google.com

google.com

anchor:english timestamp1 Google

contents: timestamp2 <html>....

anchor:korean timestamp2 구글검색

Primary Key Value

timestamp1

timestamp2

<html>....

<html>....

Locality Group

google.com anchor:korean timestamp1 구글

google.com

google.com contents: timestamp1 <html>...

google.com

Page 6: 구글을 지탱하는 기술 요약 - Bigtable

Bigtable의 분산 저장

URL contents: anchor:

구글이미지 Google Images<html>a...com. google.images

Locality Group

구글맵 Google Maps<html>b...com. google.maps

구글 Google<html>c...com. google.www

anchor:koean anchor:english

구글이미지 Google Images

구글맵 Google Maps

구글 Google

com. google.images

com. google.maps

com. google.www

Tablet

split by Locality Group

Tablet

<html>a...com. google.images

<html>b...com. google.maps

<html>c...com. google.www

Page 7: 구글을 지탱하는 기술 요약 - Bigtable

태블릿의 저장구조

구글이미지 Google Images

구글맵 Google Maps

구글 Google

com. google.images

com. google.maps

com. google.www

Tablet(logical)

구글이미지 Google Images 구글맵

Google Maps 구글 Google

com. google.images

com. google.maps

com. google.www

URL anchor:

anchor:koean anchor:english

anchor:koean pointer

anchor:english pointer

anchor:koean pointer

Data Part

Index Part

SSTable(in GFS)

Page 8: 구글을 지탱하는 기술 요약 - Bigtable

태블릿의 쓰기, 읽기, 컴팩션GFS

memtable

SSTable

Commit Log

Tablet Server

create log1Client

writing2

Client

memtable

Tablet Server

in Tablet Server’s memory

check memtable1

SSTable

SSTable

reading2

Minor Compaction

SSTable

MajorCompaction

in Tablet Server’s memory

SSTable

Page 9: 구글을 지탱하는 기술 요약 - Bigtable

태블릿의 검색과정 (B+Tree)

Root Tablet

car table1

hot table2

table1

zero

zip

Chubby

sexy table3

zip table4

apple table11

box table12

hot

∙∙∙

about about.com

apple Mac PC

baby

bage bagesoft.com

car

box

car table13

zero

zip

sexy

Metadata Tablet User Tablet

bage

table2

table3

table4

table11

table12

table13

Root Tablet: Metadata Tablet 관리, 검색 시작점Metadata Tablet: User Tablet 관리User Tablet: 데이타

management

key

Page 10: 구글을 지탱하는 기술 요약 - Bigtable

전체 데이타 최대 크기

Root Tablet

1KB

1KB

Index size = 1KBTablet size = 128MBMetadata Tablets = 128MB/1KB = 227/ 210 = 217 unitsUser Tablets = 217 * 217 = 234 units∴ Total User Tablet size = 128MB * 234 units = 227 * 234 = 261

= 1 EB(Exabyte) = 1,000,000,000 GB = 10억 GB (전세계 인구 약 70억)

Metadata Tablet

1KB

1KB

....

....

1KB

1KB

....

128MB

128MB

128MB

∙∙∙

∙∙∙

User Tablet

128MB

128MB