SlideShare a Scribd company logo
Realtime Apache Hadoop at Facebook
Realtime Apache Hadoop at Facebook



Jonathan Gray & Dhruba Borthakur
June 14, 2011 at SIGMOD, Athens
Agenda

 1   Why Apache Hadoop and HBase?


 2   Quick Introduction to Apache HBase


 3   Applications of HBase at Facebook
Why Hadoop and HBase?
For Realtime Data?
Realtime Apache Hadoop at Facebook
Problems with existing stack
▪ MySQL   is stable, but...
 ▪  Not inherently distributed
 ▪  Table size limits

 ▪  Inflexible schema


▪ Hadoop   is scalable, but...
 ▪  MapReduce  is slow and difficult
 ▪  Does not support random writes

 ▪  Poor support for random reads
Specialized solutions
▪ High-throughput,    persistent key-value
  ▪ Tokyo  Cabinet
▪ Large scale data warehousing

   ▪  Hive/Hadoop

▪  PhotoStore
  ▪  Haystack

▪ Custom    C++ servers for lots of other stuff
What do we need in a data store?
▪ Requirements    for Facebook Messages
  ▪  Massive  datasets, with large subsets of cold data
  ▪  Elasticity and high availability

  ▪  Strong consistency within a datacenter

  ▪  Fault isolation


▪ Some   non-requirements
  ▪  Network  partitions within a single datacenter
  ▪  Active-active serving from multiple datacenters
HBase satisfied our requirements
▪ In   early 2010, engineers at FB compared DBs
   ▪  Apache       Cassandra, Apache HBase, Sharded MySQL

▪ Compared            performance, scalability, and
 features
   ▪  HBase gave excellent write performance, good reads
   ▪  HBase already included many nice-to-have features
        ▪    Atomic read-modify-write operations
        ▪    Multiple shards per server
        ▪    Bulk importing
HBase uses HDFS
We get the benefits of HDFS as a storage
system for free
▪ Fault
      toleranceScalabilityChecksums fix
corruptionsMapReduce

▪ Faultisolation of disksHDFS battle tested at petabyte
scale at Facebook
Lots of existing operational experience
Apache HBase
▪ Originally   part of Hadoop
  ▪  HBase   adds random read/write access to HDFS

▪ Required    some Hadoop changes for FB usage
  ▪  Fileappends
  ▪  HA NameNode

  ▪  Read optimizations


▪ Plus   ZooKeeper!
HBase System Overview
                          Database Layer

                     Master       Backup Master

          Region Server    Region Server    Region Server    ...
                              HBASE
Storage                                               Coordination
Layer                                                      Service

   Namenode     Secondary Namenode                 ZK Peer
                                                               ...
  Datanode    Datanode     Datanode   ...          ZK Peer
                  HDFS                          Zookeeper Quorum
HBase in a nutshell
▪ Sortedand column-oriented
▪ High write throughputHorizontal scalability
  Automatic failoverRegions sharded
  dynamically
Applications of HBase at
Facebook
Use Case 1
    Titan
(Facebook Messages)
The New Facebook Messages




Messages   IM/Chat   email   SMS
Facebook Messaging
  ▪ High   write throughputEvery message, instant
     message, SMS, and e-mailSearch indexes for all of the
     above
  ▪  Denormalized schema



▪ A   product at massive scale on day one
  ▪  6kmessages a second
  ▪  50k instant messages a second

  ▪  300TB data growth/month compressed
Typical Cell Layout
   ▪  Multiple       cells for messaging	

   ▪    20 servers/rack; 5 or more racks per cluster         	

   ▪  Controllers       (master/Zookeeper) spread across racks
ZooKeeper              ZooKeeper          ZooKeeper                ZooKeeper          ZooKeeper
HDFS NameNode          Backup NameNode    Job Tracker              HBase Master       Backup Master

           	

Region Server
Data Node
               	

              	

                       Region Server
                       Data Node
                                    	

            	

                                          Region Server
                                          Data Node
                                                       	

                  	

                                                                   Region Server
                                                                   Data Node
                                                                                	

            	

                                                                                      Region Server
                                                                                      Data Node
                                                                                                   	

Task Tracker           Task Tracker       Task Tracker             Task Tracker       Task Tracker




        19x...              19x...             19x...                   19x...             19x...
           	

Region Server
Data Node
               	

              	

                       Region Server
                       Data Node
                                    	

            	

                                          Region Server
                                          Data Node
                                                       	

                  	

                                                                   Region Server
                                                                   Data Node
                                                                                	

            	

                                                                                      Region Server
                                                                                      Data Node
                                                                                                   	

Task Tracker           Task Tracker       Task Tracker             Task Tracker       Task Tracker
        Rack #1             Rack #2            Rack #3                  Rack #4            Rack #5
High Write Throughput
               Write
               Key Value

                                                         Sequential
     Key val                          Key val              write

     Key val                          Key val
       .
       .
       .
     Key val                            .
                                        .
                                        .
                                      Key val

       .
       .
       .
     Key val
                                  Sorted in memory
                                      Key val


     Key val         Sequential       Key val
                     write

Commit Log(in HDFS)               Memstore (in memory)
Horizontal Scalability
Region

         ...               ...
Automatic Failover
                                         Find new
                       HBase client      server from
                                         META

server
 died




         No physical data copy because data is in HDFS
Use Case 2
   Puma
(Facebook Insights)
Realtime Apache Hadoop at Facebook
Realtime Apache Hadoop at Facebook
Puma
▪ Realtime      Data Pipeline
  ▪  Utilize   existing log aggregation pipeline (Scribe-
     HDFS)
  ▪  Extend low-latency capabilities of HDFS (Sync+PTail)

  ▪  High-throughput writes (HBase)


▪ Support      for Realtime Aggregation
  ▪  Utilize
          HBase atomic increments to maintain roll-ups
  ▪  Complex HBase schemas for unique-user calculations
Puma as Realtime MapReduce
▪ Map   phase with PTail
  ▪  Divide  the input log stream into N shards
  ▪  First version only supported random bucketing

  ▪  Now supports application-level bucketing


▪ Reduce      phase with HBase
  ▪  Every row+column in HBase is an output key
  ▪  Aggregate key counts using atomic counters

  ▪  Can also maintain per-key lists or other structures
Puma for Facebook Insights
▪ Realtime      URL/Domain Insights
  ▪  Domain    owners can see deep analytics for their site
  ▪  Clicks, Likes, Shares, Comments, Impressions

  ▪  Detailed demographic breakdowns (anonymized)

  ▪  Top URLs calculated per-domain and globally


▪ Massive   Throughput
  ▪  Billions of URLs
  ▪  > 1 Million counter increments per second
Realtime Apache Hadoop at Facebook
Realtime Apache Hadoop at Facebook
Use Case 3
         ODS
(Facebook Internal Metrics)
ODS
▪ Operational           Data Store
  ▪  System metrics (CPU, Memory, IO, Network)
  ▪  Application metrics (Web, DB, Caches)

  ▪  Facebook metrics (Usage, Revenue)
       ▪    Easily graph this data over time
       ▪    Supports complex aggregation, transformations, etc.


▪  Difficultto scale with MySQL
  ▪  Millions of unique time-series with billions of points

  ▪  Irregular data growth patterns
Dynamic sharding of regions
Region

                ...      ...




           server
         overloaded
Future of HBase at Facebook
User and Graph Data
      in HBase
HBase for the important stuff
▪ Looking    at HBase to augment MySQL
  ▪  Only single row ACID from MySQL is used
  ▪  DBs are always fronted by an in-memory cache

  ▪  HBase is great at storing dictionaries and lists



▪ Database    tier size determined by IOPS
  ▪  HBase  does only sequential writes
  ▪  Lower IOPs translate to lower cost

  ▪  Larger tables on denser, cheaper, commodity nodes
Conclusion
▪ Facebook   investing in Realtime Hadoop/HBase
  ▪  Work  of a large team of Facebook engineers
  ▪  Close collaboration with open source developers



▪ Much   more detail in Realtime Hadoop paper
  ▪  Technical   details about changes to Hadoop and
     HBase
  ▪  Operational experiences in production
Questions?
jgray@fb.com
dhruba@fb.com

More Related Content

What's hot (20)

PDF
HBase @ Twitter
ctrezzo
 
PPTX
MongoDB at eBay
MongoDB
 
KEY
Hadoop Summit 2012 - Hadoop and Vertica: The Data Analytics Platform at Twitter
Bill Graham
 
PDF
Facebook keynote-nicolas-qcon
Yiwei Ma
 
PDF
Hadoop Successes and Failures to Drive Deployment Evolution
Benoit Perroud
 
PPTX
Drill njhug -19 feb2013
MapR Technologies
 
PDF
Storage Infrastructure Behind Facebook Messages
yarapavan
 
PPTX
Geo-based content processing using hbase
Ravi Veeramachaneni
 
PPTX
Hadoop World 2011: Practical HBase - Ravi Veeramchaneni, Informatica
Cloudera, Inc.
 
PPTX
Hadoop configuration & performance tuning
Vitthal Gogate
 
PDF
Design, Scale and Performance of MapR's Distribution for Hadoop
mcsrivas
 
PPTX
MongoDB San Francisco 2013: Storing eBay's Media Metadata on MongoDB present...
MongoDB
 
PPTX
HBaseCon 2012 | Low Latency OLAP with HBase - Cosmin Lehene, Adobe
Cloudera, Inc.
 
PPTX
Getting Started with Hadoop
Cloudera, Inc.
 
PPTX
Facing enterprise specific challenges – utility programming in hadoop
fann wu
 
PPTX
Big Data and Hadoop - History, Technical Deep Dive, and Industry Trends
Esther Kundin
 
KEY
TriHUG - Beyond Batch
boorad
 
PDF
Hadoop meets Agile! - An Agile Big Data Model
Uwe Printz
 
PDF
Marcel Kornacker: Impala tech talk Tue Feb 26th 2013
Modern Data Stack France
 
PDF
Bikas saha:the next generation of hadoop– hadoop 2 and yarn
hdhappy001
 
HBase @ Twitter
ctrezzo
 
MongoDB at eBay
MongoDB
 
Hadoop Summit 2012 - Hadoop and Vertica: The Data Analytics Platform at Twitter
Bill Graham
 
Facebook keynote-nicolas-qcon
Yiwei Ma
 
Hadoop Successes and Failures to Drive Deployment Evolution
Benoit Perroud
 
Drill njhug -19 feb2013
MapR Technologies
 
Storage Infrastructure Behind Facebook Messages
yarapavan
 
Geo-based content processing using hbase
Ravi Veeramachaneni
 
Hadoop World 2011: Practical HBase - Ravi Veeramchaneni, Informatica
Cloudera, Inc.
 
Hadoop configuration & performance tuning
Vitthal Gogate
 
Design, Scale and Performance of MapR's Distribution for Hadoop
mcsrivas
 
MongoDB San Francisco 2013: Storing eBay's Media Metadata on MongoDB present...
MongoDB
 
HBaseCon 2012 | Low Latency OLAP with HBase - Cosmin Lehene, Adobe
Cloudera, Inc.
 
Getting Started with Hadoop
Cloudera, Inc.
 
Facing enterprise specific challenges – utility programming in hadoop
fann wu
 
Big Data and Hadoop - History, Technical Deep Dive, and Industry Trends
Esther Kundin
 
TriHUG - Beyond Batch
boorad
 
Hadoop meets Agile! - An Agile Big Data Model
Uwe Printz
 
Marcel Kornacker: Impala tech talk Tue Feb 26th 2013
Modern Data Stack France
 
Bikas saha:the next generation of hadoop– hadoop 2 and yarn
hdhappy001
 

Viewers also liked (14)

PPTX
Big data Analytics Hadoop
Mishika Bharadwaj
 
PDF
Hadoop Operations Powered By ... Hadoop (Hadoop Summit 2014 Amsterdam)
Adam Kawa
 
PDF
Presto: Distributed SQL on Anything - Strata Hadoop 2017 San Jose, CA
kbajda
 
PPTX
Big Data Overview 2013-2014
KMS Technology
 
PDF
introduction to data processing using Hadoop and Pig
Ricardo Varela
 
PDF
Practical Problem Solving with Apache Hadoop & Pig
Milind Bhandarkar
 
PDF
Integration of Hive and HBase
Hortonworks
 
PPTX
Pig, Making Hadoop Easy
Nick Dimiduk
 
PDF
Facebooks Petabyte Scale Data Warehouse using Hive and Hadoop
royans
 
PDF
Hive Quick Start Tutorial
Carl Steinbach
 
KEY
Hadoop, Pig, and Twitter (NoSQL East 2009)
Kevin Weil
 
PPT
Introduction To Map Reduce
rantav
 
PPT
HIVE: Data Warehousing & Analytics on Hadoop
Zheng Shao
 
PPTX
Big Data Analytics with Hadoop
Philippe Julio
 
Big data Analytics Hadoop
Mishika Bharadwaj
 
Hadoop Operations Powered By ... Hadoop (Hadoop Summit 2014 Amsterdam)
Adam Kawa
 
Presto: Distributed SQL on Anything - Strata Hadoop 2017 San Jose, CA
kbajda
 
Big Data Overview 2013-2014
KMS Technology
 
introduction to data processing using Hadoop and Pig
Ricardo Varela
 
Practical Problem Solving with Apache Hadoop & Pig
Milind Bhandarkar
 
Integration of Hive and HBase
Hortonworks
 
Pig, Making Hadoop Easy
Nick Dimiduk
 
Facebooks Petabyte Scale Data Warehouse using Hive and Hadoop
royans
 
Hive Quick Start Tutorial
Carl Steinbach
 
Hadoop, Pig, and Twitter (NoSQL East 2009)
Kevin Weil
 
Introduction To Map Reduce
rantav
 
HIVE: Data Warehousing & Analytics on Hadoop
Zheng Shao
 
Big Data Analytics with Hadoop
Philippe Julio
 
Ad

Similar to Realtime Apache Hadoop at Facebook (20)

PDF
支撑Facebook消息处理的h base存储系统
yongboy
 
PDF
Facebook Messages & HBase
强 王
 
PDF
RuG Guest Lecture
fvanvollenhoven
 
PPT
Borthakur hadoop univ-research
saintdevil163
 
PDF
Hdfs Dhruba
Jeff Hammerbacher
 
PDF
HDFS Architecture
Jeff Hammerbacher
 
PDF
Design for a Distributed Name Node
Aaron Cordova
 
PPTX
Hadoop hbase mapreduce
FARUK BERKSÖZ
 
PDF
Storage Systems for big data - HDFS, HBase, and intro to KV Store - Redis
Sameer Tiwari
 
KEY
Near-realtime analytics with Kafka and HBase
dave_revell
 
PDF
Hadoop on Azure, Blue elephants
Ovidiu Dimulescu
 
PDF
HBase Advanced - Lars George
JAX London
 
PPTX
Oct 2012 HUG: Hadoop .Next (0.23) - Customer Impact and Deployment
Yahoo Developer Network
 
PDF
Facebook's HBase Backups - StampedeCon 2012
StampedeCon
 
PPTX
Hadoop Distributed File System(HDFS) : Behind the scenes
Nitin Khattar
 
PPTX
Apache Hadoop
Ajit Koti
 
PPTX
Introduction to Apache Accumulo
Jared Winick
 
PDF
Prdc2012
Yusuke Shimizu
 
PDF
Introduction to Hadoop
Ovidiu Dimulescu
 
PPTX
HDFS - What's New and Future
DataWorks Summit
 
支撑Facebook消息处理的h base存储系统
yongboy
 
Facebook Messages & HBase
强 王
 
RuG Guest Lecture
fvanvollenhoven
 
Borthakur hadoop univ-research
saintdevil163
 
Hdfs Dhruba
Jeff Hammerbacher
 
HDFS Architecture
Jeff Hammerbacher
 
Design for a Distributed Name Node
Aaron Cordova
 
Hadoop hbase mapreduce
FARUK BERKSÖZ
 
Storage Systems for big data - HDFS, HBase, and intro to KV Store - Redis
Sameer Tiwari
 
Near-realtime analytics with Kafka and HBase
dave_revell
 
Hadoop on Azure, Blue elephants
Ovidiu Dimulescu
 
HBase Advanced - Lars George
JAX London
 
Oct 2012 HUG: Hadoop .Next (0.23) - Customer Impact and Deployment
Yahoo Developer Network
 
Facebook's HBase Backups - StampedeCon 2012
StampedeCon
 
Hadoop Distributed File System(HDFS) : Behind the scenes
Nitin Khattar
 
Apache Hadoop
Ajit Koti
 
Introduction to Apache Accumulo
Jared Winick
 
Prdc2012
Yusuke Shimizu
 
Introduction to Hadoop
Ovidiu Dimulescu
 
HDFS - What's New and Future
DataWorks Summit
 
Ad

More from parallellabs (6)

PDF
Hpca2012 facebook keynote
parallellabs
 
PDF
Intel's Nehalem Microarchitecture by Glenn Hinton
parallellabs
 
PPTX
Isca needle a_0610
parallellabs
 
PDF
Dean keynote-ladis2009-jeff-dean
parallellabs
 
PDF
Building Software Systems at Google and Lessons Learned
parallellabs
 
PPT
Chalmers microprocessor sept 2010
parallellabs
 
Hpca2012 facebook keynote
parallellabs
 
Intel's Nehalem Microarchitecture by Glenn Hinton
parallellabs
 
Isca needle a_0610
parallellabs
 
Dean keynote-ladis2009-jeff-dean
parallellabs
 
Building Software Systems at Google and Lessons Learned
parallellabs
 
Chalmers microprocessor sept 2010
parallellabs
 

Recently uploaded (20)

PDF
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
PPTX
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
PPTX
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
PPTX
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
PDF
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
PDF
From Code to Challenge: Crafting Skill-Based Games That Engage and Reward
aiyshauae
 
PDF
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
PDF
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
PDF
Biography of Daniel Podor.pdf
Daniel Podor
 
PDF
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
PDF
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
PDF
Blockchain Transactions Explained For Everyone
CIFDAQ
 
PDF
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
PDF
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
PDF
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
PDF
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
PDF
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
PDF
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
PDF
"Beyond English: Navigating the Challenges of Building a Ukrainian-language R...
Fwdays
 
PDF
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
From Code to Challenge: Crafting Skill-Based Games That Engage and Reward
aiyshauae
 
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
Biography of Daniel Podor.pdf
Daniel Podor
 
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
Blockchain Transactions Explained For Everyone
CIFDAQ
 
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
"Beyond English: Navigating the Challenges of Building a Ukrainian-language R...
Fwdays
 
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 

Realtime Apache Hadoop at Facebook

  • 2. Realtime Apache Hadoop at Facebook Jonathan Gray & Dhruba Borthakur June 14, 2011 at SIGMOD, Athens
  • 3. Agenda 1 Why Apache Hadoop and HBase? 2 Quick Introduction to Apache HBase 3 Applications of HBase at Facebook
  • 4. Why Hadoop and HBase? For Realtime Data?
  • 6. Problems with existing stack ▪ MySQL is stable, but... ▪  Not inherently distributed ▪  Table size limits ▪  Inflexible schema ▪ Hadoop is scalable, but... ▪  MapReduce is slow and difficult ▪  Does not support random writes ▪  Poor support for random reads
  • 7. Specialized solutions ▪ High-throughput, persistent key-value ▪ Tokyo Cabinet ▪ Large scale data warehousing ▪  Hive/Hadoop ▪  PhotoStore ▪  Haystack ▪ Custom C++ servers for lots of other stuff
  • 8. What do we need in a data store? ▪ Requirements for Facebook Messages ▪  Massive datasets, with large subsets of cold data ▪  Elasticity and high availability ▪  Strong consistency within a datacenter ▪  Fault isolation ▪ Some non-requirements ▪  Network partitions within a single datacenter ▪  Active-active serving from multiple datacenters
  • 9. HBase satisfied our requirements ▪ In early 2010, engineers at FB compared DBs ▪  Apache Cassandra, Apache HBase, Sharded MySQL ▪ Compared performance, scalability, and features ▪  HBase gave excellent write performance, good reads ▪  HBase already included many nice-to-have features ▪  Atomic read-modify-write operations ▪  Multiple shards per server ▪  Bulk importing
  • 10. HBase uses HDFS We get the benefits of HDFS as a storage system for free ▪ Fault toleranceScalabilityChecksums fix corruptionsMapReduce ▪ Faultisolation of disksHDFS battle tested at petabyte scale at Facebook Lots of existing operational experience
  • 11. Apache HBase ▪ Originally part of Hadoop ▪  HBase adds random read/write access to HDFS ▪ Required some Hadoop changes for FB usage ▪  Fileappends ▪  HA NameNode ▪  Read optimizations ▪ Plus ZooKeeper!
  • 12. HBase System Overview Database Layer Master Backup Master Region Server Region Server Region Server ... HBASE Storage Coordination Layer Service Namenode Secondary Namenode ZK Peer ... Datanode Datanode Datanode ... ZK Peer HDFS Zookeeper Quorum
  • 13. HBase in a nutshell ▪ Sortedand column-oriented ▪ High write throughputHorizontal scalability Automatic failoverRegions sharded dynamically
  • 14. Applications of HBase at Facebook
  • 15. Use Case 1 Titan (Facebook Messages)
  • 16. The New Facebook Messages Messages IM/Chat email SMS
  • 17. Facebook Messaging ▪ High write throughputEvery message, instant message, SMS, and e-mailSearch indexes for all of the above ▪  Denormalized schema ▪ A product at massive scale on day one ▪  6kmessages a second ▪  50k instant messages a second ▪  300TB data growth/month compressed
  • 18. Typical Cell Layout ▪  Multiple cells for messaging ▪  20 servers/rack; 5 or more racks per cluster ▪  Controllers (master/Zookeeper) spread across racks ZooKeeper ZooKeeper ZooKeeper ZooKeeper ZooKeeper HDFS NameNode Backup NameNode Job Tracker HBase Master Backup Master Region Server Data Node Region Server Data Node Region Server Data Node Region Server Data Node Region Server Data Node Task Tracker Task Tracker Task Tracker Task Tracker Task Tracker 19x... 19x... 19x... 19x... 19x... Region Server Data Node Region Server Data Node Region Server Data Node Region Server Data Node Region Server Data Node Task Tracker Task Tracker Task Tracker Task Tracker Task Tracker Rack #1 Rack #2 Rack #3 Rack #4 Rack #5
  • 19. High Write Throughput Write Key Value Sequential Key val Key val write Key val Key val . . . Key val . . . Key val . . . Key val Sorted in memory Key val Key val Sequential Key val write Commit Log(in HDFS) Memstore (in memory)
  • 21. Automatic Failover Find new HBase client server from META server died No physical data copy because data is in HDFS
  • 22. Use Case 2 Puma (Facebook Insights)
  • 25. Puma ▪ Realtime Data Pipeline ▪  Utilize existing log aggregation pipeline (Scribe- HDFS) ▪  Extend low-latency capabilities of HDFS (Sync+PTail) ▪  High-throughput writes (HBase) ▪ Support for Realtime Aggregation ▪  Utilize HBase atomic increments to maintain roll-ups ▪  Complex HBase schemas for unique-user calculations
  • 26. Puma as Realtime MapReduce ▪ Map phase with PTail ▪  Divide the input log stream into N shards ▪  First version only supported random bucketing ▪  Now supports application-level bucketing ▪ Reduce phase with HBase ▪  Every row+column in HBase is an output key ▪  Aggregate key counts using atomic counters ▪  Can also maintain per-key lists or other structures
  • 27. Puma for Facebook Insights ▪ Realtime URL/Domain Insights ▪  Domain owners can see deep analytics for their site ▪  Clicks, Likes, Shares, Comments, Impressions ▪  Detailed demographic breakdowns (anonymized) ▪  Top URLs calculated per-domain and globally ▪ Massive Throughput ▪  Billions of URLs ▪  > 1 Million counter increments per second
  • 30. Use Case 3 ODS (Facebook Internal Metrics)
  • 31. ODS ▪ Operational Data Store ▪  System metrics (CPU, Memory, IO, Network) ▪  Application metrics (Web, DB, Caches) ▪  Facebook metrics (Usage, Revenue) ▪  Easily graph this data over time ▪  Supports complex aggregation, transformations, etc. ▪  Difficultto scale with MySQL ▪  Millions of unique time-series with billions of points ▪  Irregular data growth patterns
  • 32. Dynamic sharding of regions Region ... ... server overloaded
  • 33. Future of HBase at Facebook
  • 34. User and Graph Data in HBase
  • 35. HBase for the important stuff ▪ Looking at HBase to augment MySQL ▪  Only single row ACID from MySQL is used ▪  DBs are always fronted by an in-memory cache ▪  HBase is great at storing dictionaries and lists ▪ Database tier size determined by IOPS ▪  HBase does only sequential writes ▪  Lower IOPs translate to lower cost ▪  Larger tables on denser, cheaper, commodity nodes
  • 36. Conclusion ▪ Facebook investing in Realtime Hadoop/HBase ▪  Work of a large team of Facebook engineers ▪  Close collaboration with open source developers ▪ Much more detail in Realtime Hadoop paper ▪  Technical details about changes to Hadoop and HBase ▪  Operational experiences in production