Operational Database Management Systems - Mastering ......¾Massively Scalable Database ¾Modeled...

33
Mastering Mastering Mastering Mastering Massive Data Volumes Massive Data Volumes Massive Data Volumes Massive Data Volumes with Hypertable with Hypertable with Hypertable with Hypertable Doug Judd Doug Judd www.hypertable.org www.hypertable.org

Transcript of Operational Database Management Systems - Mastering ......¾Massively Scalable Database ¾Modeled...

Page 1: Operational Database Management Systems - Mastering ......¾Massively Scalable Database ¾Modeled after Google’s Bigtable ¾OpenSource(GPL2license)Open Source (GPL 2 license) ¾Higgp()h

MasteringMasteringMasteringMasteringMassive Data VolumesMassive Data VolumesMassive Data VolumesMassive Data Volumes

with Hypertablewith Hypertablewith Hypertablewith HypertableDoug JuddDoug Judd

www.hypertable.orgwww.hypertable.org

Page 2: Operational Database Management Systems - Mastering ......¾Massively Scalable Database ¾Modeled after Google’s Bigtable ¾OpenSource(GPL2license)Open Source (GPL 2 license) ¾Higgp()h

Talk O tlineTalk O tlineTalk OutlineTalk Outline

OverviewOverviewArchitectureArchitecturePerformance EvaluationPerformance EvaluationPerformance EvaluationPerformance EvaluationCase StudiesCase Studies

www.hypertable.orgwww.hypertable.org

Page 3: Operational Database Management Systems - Mastering ......¾Massively Scalable Database ¾Modeled after Google’s Bigtable ¾OpenSource(GPL2license)Open Source (GPL 2 license) ¾Higgp()h

H pertable O er ieH pertable O er ieHypertable OverviewHypertable Overview

Massively Scalable DatabaseMassively Scalable DatabaseModeled after Google’s BigtableModeled after Google’s BigtableOpen Source (GPL 2 license)Open Source (GPL 2 license)Open Source (GPL 2 license)Open Source (GPL 2 license)High Performance Implementation (C++)High Performance Implementation (C++)g p ( )g p ( )Thrift Interface for all popular High Level Thrift Interface for all popular High Level L J R b P th PHP tL J R b P th PHP tLanguages: Java, Ruby, Python, PHP, etcLanguages: Java, Ruby, Python, PHP, etcProject started March 2007 @ ZventsProject started March 2007 @ ZventsProject started March 2007 @ ZventsProject started March 2007 @ Zvents

www.hypertable.orgwww.hypertable.org

Page 4: Operational Database Management Systems - Mastering ......¾Massively Scalable Database ¾Modeled after Google’s Bigtable ¾OpenSource(GPL2license)Open Source (GPL 2 license) ¾Higgp()h

Bigtable: the infrastructure that Bigtable: the infrastructure that Google is built onGoogle is built on

Bigtable is a proven designUnderpins 100+ Google services:

YouTube Blogger Google Earth GoogleYouTube, Blogger, Google Earth, GoogleMaps, Orkut, Gmail, Google Analytics, Google Book Search Google CodeGoogle Book Search, Google Code,Crawl Database…

Part of larger scalable comp ting stackPart of larger scalable computing stack:Bigtable + GFS + MapReduceg pProvides strong consistency

www.hypertable.orgwww.hypertable.org

Page 5: Operational Database Management Systems - Mastering ......¾Massively Scalable Database ¾Modeled after Google’s Bigtable ¾OpenSource(GPL2license)Open Source (GPL 2 license) ¾Higgp()h

Hypertable In Use TodayHypertable In Use TodayHypertable In Use TodayHypertable In Use Today

www.hypertable.orgwww.hypertable.org

Page 6: Operational Database Management Systems - Mastering ......¾Massively Scalable Database ¾Modeled after Google’s Bigtable ¾OpenSource(GPL2license)Open Source (GPL 2 license) ¾Higgp()h

ArchitectureArchitectureArchitectureArchitecture

Page 7: Operational Database Management Systems - Mastering ......¾Massively Scalable Database ¾Modeled after Google’s Bigtable ¾OpenSource(GPL2license)Open Source (GPL 2 license) ¾Higgp()h

S stem O er ieS stem O er ieSystem OverviewSystem Overview

www.hypertable.orgwww.hypertable.org

Page 8: Operational Database Management Systems - Mastering ......¾Massively Scalable Database ¾Modeled after Google’s Bigtable ¾OpenSource(GPL2license)Open Source (GPL 2 license) ¾Higgp()h

Data ModelData ModelData ModelData ModelSparse, twoSparse, two--dimensional table with cell versionsdimensional table with cell versionsCells are identified by a 4Cells are identified by a 4 part keypart keyCells are identified by a 4Cells are identified by a 4--part keypart key

Row (string)Row (string)Column FamilyColumn FamilyColumn Qualifier (string)Column Qualifier (string)Column Qualifier (string)Column Qualifier (string)TimestampTimestamp

www.hypertable.orgwww.hypertable.org

Page 9: Operational Database Management Systems - Mastering ......¾Massively Scalable Database ¾Modeled after Google’s Bigtable ¾OpenSource(GPL2license)Open Source (GPL 2 license) ¾Higgp()h

Table Vis al RepresentationTable Vis al RepresentationTable: Visual RepresentationTable: Visual Representation

www.hypertable.orgwww.hypertable.org

Page 10: Operational Database Management Systems - Mastering ......¾Massively Scalable Database ¾Modeled after Google’s Bigtable ¾OpenSource(GPL2license)Open Source (GPL 2 license) ¾Higgp()h

Table Act al RepresentationTable Act al RepresentationTable: Actual RepresentationTable: Actual Representation

www.hypertable.orgwww.hypertable.org

Page 11: Operational Database Management Systems - Mastering ......¾Massively Scalable Database ¾Modeled after Google’s Bigtable ¾OpenSource(GPL2license)Open Source (GPL 2 license) ¾Higgp()h

Anatom of a KeAnatom of a KeAnatomy of a KeyAnatomy of a KeyColumn Family is represented with 1 byteColumn Family is represented with 1 byteTimestamp and revision are stored bigTimestamp and revision are stored big--endian onesendian ones--Timestamp and revision are stored bigTimestamp and revision are stored big--endian onesendian ones--complimentcomplimentSi l b tSi l b t i ii iSimple byteSimple byte--wise comparisonwise comparison

www.hypertable.orgwww.hypertable.org

Page 12: Operational Database Management Systems - Mastering ......¾Massively Scalable Database ¾Modeled after Google’s Bigtable ¾OpenSource(GPL2license)Open Source (GPL 2 license) ¾Higgp()h

Scaling (part I)Scaling (part I)Scaling (part I)Scaling (part I)

www.hypertable.orgwww.hypertable.org

Page 13: Operational Database Management Systems - Mastering ......¾Massively Scalable Database ¾Modeled after Google’s Bigtable ¾OpenSource(GPL2license)Open Source (GPL 2 license) ¾Higgp()h

Scaling (part II)Scaling (part II)Scaling (part II)Scaling (part II)

www.hypertable.orgwww.hypertable.org

Page 14: Operational Database Management Systems - Mastering ......¾Massively Scalable Database ¾Modeled after Google’s Bigtable ¾OpenSource(GPL2license)Open Source (GPL 2 license) ¾Higgp()h

Scaling (part III)Scaling (part III)Scaling (part III)Scaling (part III)

www.hypertable.orgwww.hypertable.org

Page 15: Operational Database Management Systems - Mastering ......¾Massively Scalable Database ¾Modeled after Google’s Bigtable ¾OpenSource(GPL2license)Open Source (GPL 2 license) ¾Higgp()h

Req est Ro tingReq est Ro tingRequest RoutingRequest Routing

www.hypertable.orgwww.hypertable.org

Page 16: Operational Database Management Systems - Mastering ......¾Massively Scalable Database ¾Modeled after Google’s Bigtable ¾OpenSource(GPL2license)Open Source (GPL 2 license) ¾Higgp()h

Insert HandlingInsert HandlingInsert HandlingInsert Handling

www.hypertable.orgwww.hypertable.org

Page 17: Operational Database Management Systems - Mastering ......¾Massively Scalable Database ¾Modeled after Google’s Bigtable ¾OpenSource(GPL2license)Open Source (GPL 2 license) ¾Higgp()h

Q er HandlingQ er HandlingQuery HandlingQuery Handling

www.hypertable.orgwww.hypertable.org

Page 18: Operational Database Management Systems - Mastering ......¾Massively Scalable Database ¾Modeled after Google’s Bigtable ¾OpenSource(GPL2license)Open Source (GPL 2 license) ¾Higgp()h

CellStore FormatCellStore FormatCellStore FormatCellStore Format

ImmutableImmutable file file t i i t dt i i t dcontaining sorted containing sorted

sequence of key/valuesequence of key/valueq yq ypairspairsS f 65KS f 65KSequence of 65K Sequence of 65K blocks of compressed blocks of compressed ppkey/value pairskey/value pairs

www.hypertable.orgwww.hypertable.org

Page 19: Operational Database Management Systems - Mastering ......¾Massively Scalable Database ¾Modeled after Google’s Bigtable ¾OpenSource(GPL2license)Open Source (GPL 2 license) ¾Higgp()h

CompressionCompressionCompressionCompressionCell Store blocks are compressedCell Store blocks are compressedCommit Log updates are compressedCommit Log updates are compressedCommit Log updates are compressedCommit Log updates are compressedSupported Compression SchemesSupported Compression Schemes

lib (lib ( b db d f )f )zlib (zlib (----best and best and ----fast)fast)lzolzoquicklzquicklzbmzbmznonenone

www.hypertable.orgwww.hypertable.org

Page 20: Operational Database Management Systems - Mastering ......¾Massively Scalable Database ¾Modeled after Google’s Bigtable ¾OpenSource(GPL2license)Open Source (GPL 2 license) ¾Higgp()h

CachingCachingCachingCachingBlock CacheBlock Cache

Caches CellStore blocksCaches CellStore blocksCaches CellStore blocksCaches CellStore blocksBlocks are cached uncompressedBlocks are cached uncompressedDynamically adjusted size based on workloadDynamically adjusted size based on workloadDynamically adjusted size based on workloadDynamically adjusted size based on workload

Query CacheQuery CacheC h lC h lCaches query resultsCaches query results

www.hypertable.orgwww.hypertable.org

Page 21: Operational Database Management Systems - Mastering ......¾Massively Scalable Database ¾Modeled after Google’s Bigtable ¾OpenSource(GPL2license)Open Source (GPL 2 license) ¾Higgp()h

Bloom FilterBloom FilterBloom FilterBloom FilterP b bili ti d t t t i t d ithP b bili ti d t t t i t d ithProbabilistic data structure associated with every Probabilistic data structure associated with every CellStoreCellStoreTells you if key is definitively Tells you if key is definitively notnot presentpresent

www.hypertable.orgwww.hypertable.org

Page 22: Operational Database Management Systems - Mastering ......¾Massively Scalable Database ¾Modeled after Google’s Bigtable ¾OpenSource(GPL2license)Open Source (GPL 2 license) ¾Higgp()h

DynamicDynamicyyMemory AllocationMemory Allocation

www.hypertable.orgwww.hypertable.org

Page 23: Operational Database Management Systems - Mastering ......¾Massively Scalable Database ¾Modeled after Google’s Bigtable ¾OpenSource(GPL2license)Open Source (GPL 2 license) ¾Higgp()h

Performance EvaluationPerformance EvaluationPerformance EvaluationPerformance Evaluation

Page 24: Operational Database Management Systems - Mastering ......¾Massively Scalable Database ¾Modeled after Google’s Bigtable ¾OpenSource(GPL2license)Open Source (GPL 2 license) ¾Higgp()h

S tS tSetupSetupModeled after Test described in Bigtable paper1 Test Dispatcher, 4 Test Clients, 4 Tablet ServerspTest was written entirely in JavaHardware

1 X 1.8 GHz Dual-core Opteron10 GB RAM3X 250GB SATA drives

SoftwareHDFS 0.20.2 running on all 10 nodes, 3X replicationHBase 0.20.4H t bl 0 9 3 3Hypertable 0.9.3.3

www.hypertable.orgwww.hypertable.org

Page 25: Operational Database Management Systems - Mastering ......¾Massively Scalable Database ¾Modeled after Google’s Bigtable ¾OpenSource(GPL2license)Open Source (GPL 2 license) ¾Higgp()h

LatencLatencLatencyLatency

www.hypertable.orgwww.hypertable.org

Page 26: Operational Database Management Systems - Mastering ......¾Massively Scalable Database ¾Modeled after Google’s Bigtable ¾OpenSource(GPL2license)Open Source (GPL 2 license) ¾Higgp()h

Thro ghp tThro ghp tThroughputThroughputTest Hypertable

Advantage Relative to HBase (%)HBase (%)

Random Read Zipfian 80 GB 925

Random Read Zipfian 20 GB 777

Random Read Zipfian 2 5 GB 100Random Read Zipfian 2.5 GB 100

Random Write 10KB values 51

Random Write 1KB values 102

Random Write 100 byte values 427

Random Write 10 byte values 931

Sequential Read 10KB values 1060

Sequential Read 1KB values 68

Sequential Read 100 byte values 129

Scan 10KB values 2Scan 10KB values 2

Scan 1KB values 58

Scan 100 byte values 75

Scan 10 byte values 220www.hypertable.orgwww.hypertable.org

Scan 10 byte values 220

Page 27: Operational Database Management Systems - Mastering ......¾Massively Scalable Database ¾Modeled after Google’s Bigtable ¾OpenSource(GPL2license)Open Source (GPL 2 license) ¾Higgp()h

Detailed ReportDetailed ReportDetailed ReportDetailed Report

htt //bl h t bl /? 14htt //bl h t bl /? 14http://blog.hypertable.com/?p=14http://blog.hypertable.com/?p=14

www.hypertable.orgwww.hypertable.org

Page 28: Operational Database Management Systems - Mastering ......¾Massively Scalable Database ¾Modeled after Google’s Bigtable ¾OpenSource(GPL2license)Open Source (GPL 2 license) ¾Higgp()h

Case StudiesCase StudiesCase StudiesCase Studies

Page 29: Operational Database Management Systems - Mastering ......¾Massively Scalable Database ¾Modeled after Google’s Bigtable ¾OpenSource(GPL2license)Open Source (GPL 2 license) ¾Higgp()h

Z entsZ entsZventsZventsLongest running Hypertable deploymentLongest running Hypertable deploymentA l ti Pl tfA l ti Pl tf R tiR tiAnalytics Platform Analytics Platform -- ReportingReporting

PerPer--listing page view graphslisting page view graphsPerPer listing page view graphslisting page view graphsChange logChange log

Ruby on Rails Ruby on Rails -- HyperRecordHyperRecord

www.hypertable.orgwww.hypertable.org

Page 30: Operational Database Management Systems - Mastering ......¾Massively Scalable Database ¾Modeled after Google’s Bigtable ¾OpenSource(GPL2license)Open Source (GPL 2 license) ¾Higgp()h

Rediff comRediff comRediff.comRediff.com

rediffmail SPAM classificationrediffmail SPAM classificationSeveral hundred frontSeveral hundred front--end web serversend web serverstens of millions requests/daytens of millions requests/daytens of millions requests/daytens of millions requests/dayPeak rate 500 queries/sPeak rate 500 queries/sqq99.99% sub99.99% sub--second response timesecond response time

www.hypertable.orgwww.hypertable.org

Page 31: Operational Database Management Systems - Mastering ......¾Massively Scalable Database ¾Modeled after Google’s Bigtable ¾OpenSource(GPL2license)Open Source (GPL 2 license) ¾Higgp()h

Best Fit Use CasesBest Fit Use CasesBest Fit Use CasesBest Fit Use Cases

Serve massive data sets to live Serve massive data sets to live li tili tiapplicationsapplications

It’sIt’s orderedordered -- good for applications thatgood for applications thatIt s It s orderedordered good for applications that good for applications that need to scan over data rangesneed to scan over data ranges( ti i d t )( ti i d t )(e.g. time series data)(e.g. time series data)Typical workflow:Typical workflow:Typical workflow:Typical workflow:

logs logs --> HDFS > HDFS --> MapReduce > MapReduce --> Hypertable> Hypertable

www.hypertable.orgwww.hypertable.org

Page 32: Operational Database Management Systems - Mastering ......¾Massively Scalable Database ¾Modeled after Google’s Bigtable ¾OpenSource(GPL2license)Open Source (GPL 2 license) ¾Higgp()h

Reso rcesReso rcesResourcesResources

Project site:Project site:h t blh t blwww.hypertable.orgwww.hypertable.org

Twitter: hypertableTwitter: hypertable

Commercial Support:Commercial Support:Commercial Support:Commercial Support:www.hypertable.comwww.hypertable.com

www.hypertable.orgwww.hypertable.org

Page 33: Operational Database Management Systems - Mastering ......¾Massively Scalable Database ¾Modeled after Google’s Bigtable ¾OpenSource(GPL2license)Open Source (GPL 2 license) ¾Higgp()h

Q&AQ&A