HBaseCon 2012 | Growing Your Inbox, HBase at Tumblr

Cloudera, Inc.
Cloudera, Inc.Cloudera, Inc.
Growing Your Inbox:
                      HBase at Tumblr

     HBaseCon 2012

Friday, May 11, 12
Monthly page views


               1 8 , 0 0 0, 0 0 0, 0 0 0
                                600M page views per day

                               60-80M new posts per day

                     Peak rate of 50k requests & 2k posts per second

                        Totals: 22B posts, 53M blogs, 45M users

                     23 in Engineering (7 ops, 4 net/dc, 4 SRE, 8 dev)

                       70% of traffic is destined for the dashboard

     HBaseCon 2012

Friday, May 11, 12
Posts and followers drive growth



                     Posts


                Average
               Followers




     HBaseCon 2012

Friday, May 11, 12
Traffic growth
                     Page
                     Views

                              Fun Month   Dashboard
                               Begins      Creaking




                     People




     HBaseCon 2012

Friday, May 11, 12
One small problem
               The dashboard is assembled using a time ordered
               essentially unpartitioned MySQL database without
               caching. Sharding and caching aren’t reasonable
               approaches. Write concurrency will soon introduce slave
               lag, rendering the dashboard unusable.




     HBaseCon 2012

Friday, May 11, 12
Motherboy Motivations and Goals
            Motivations                                       Goals
              ✦      Awesome Arrested Development reference   ✦   Durability and availability

              ✦      The dashboard is going to die            ✦   Multi-datacenter tenancy

              ✦      Time ordered MySQL sharding == bad       ✦   Features (read/unread, tags, etc)

              ✦      Inconsistent dashboard experience




     HBaseCon 2012

Friday, May 11, 12
Challenges
              ✦      Response time < 100ms

              ✦      Data volume

              ✦      Active legacy PHP code base

              ✦      Hardware provisioning, failures, etc.

              ✦      Small team, not much in house JVM/Hadoop experience




     HBaseCon 2012

Friday, May 11, 12
One small problem
            Assumptions                                                 Data Set Growth
              ✦      60M posts per day                                             Rows          Size
                                                                        Day        30 Billion    447 GB
              ✦      500 followers on average
                                                                        Week       210 Billion   3.1 TB
              ✦      40 bytes per row, 24 byte row key                  Month      840 Billion   12.2 TB
              ✦      Compression factor of 0.4                          Year       10 Trillion   146 TB

              ✦      Replication factor of 3.5 (3 plus scratch space)   Data Set Growth (Replicated)
                                                                                   Size
                                                                        Day        1.5 TB
                                                                        Week       10.7 TB
                                                                        Month      42.8 TB
                                                                        Year       513 TB

     HBaseCon 2012

Friday, May 11, 12
Motherboy Architecture
            Goals                                                       Failure Handling
              ✦      Dashboard posts are persistent for each follower   ✦   Reads can be fulfilled from any store
                     (their inbox)
                                                                        ✦   Writes can catch up when a store is back online
              ✦      Writes are asynchronous and distributed

              ✦      Users home to an inbox

              ✦      Inboxes are eventually consistent

              ✦      Selective materialization of feeds




     HBaseCon 2012

Friday, May 11, 12
Motherboy V0
            Implementation
              ✦      Goal: Get our feet wet!

              ✦      Single 6 node HBase cluster

              ✦      Writes to Motherboy via Finagle/Thrift RPC service

              ✦      User homed to Motherboy cluster




     HBaseCon 2012

Friday, May 11, 12
HBaseCon 2012

Friday, May 11, 12
Motherboy V0 learnings
              ✦      Conclusion: We needed more experience

              ✦      We had no clue what we were doing

              ✦      Poor automation ➜ Hard to recover in event of failure

              ✦      No test infrastructure ➜ Hard to evaluate effects of cluster performance tuning

              ✦      Very little insight into environment




     HBaseCon 2012

Friday, May 11, 12
Sidebar: OpenTSDB
              ✦      Goal: Get some hands on experience running a production cluster

              ✦      Build out fully automated cluster provisioning

              ✦      Build out a cluster monitoring infrastructure

              ✦      Build out cluster trending/visualization




     HBaseCon 2012

Friday, May 11, 12
Automated provisioning




     HBaseCon 2012

Friday, May 11, 12
Automated monitoring




     HBaseCon 2012

Friday, May 11, 12
Automated monitoring




     HBaseCon 2012

Friday, May 11, 12
OpenTSDB: Cluster 0
              ✦      10k data points per second, 500k at peak

              ✦      1200 servers reporting via collectd

              ✦      Application stats via collectd

              ✦      864M data points per day

              ✦      10 node cluster

              ✦      Making progress




     HBaseCon 2012

Friday, May 11, 12
Motherboy V1: Try again
            Implementation
              ✦      Goal: Into testing!

              ✦      Single 10 node HBase cluster

              ✦      No writes directly to Motherboy, consumed via Firehose

              ✦      Enable reads via feature flag for engineers

              ✦      Ignore discovery mechanism for now




     HBaseCon 2012

Friday, May 11, 12
HBaseCon 2012

Friday, May 11, 12
Motherboy V1 learnings
            The black-art of tuning                                 Challenges
              ✦      Disable major compactions                      ✦   Region sizing (# regions & size) is crucial and
                                                                        workload dependent
              ✦      Disable auto-splits, self manage
                                                                    ✦   YCSB was valuable for load testing but required
              ✦      regionserver.handler.count                         extensive modification
              ✦      hregion.max.filesize                           ✦   Too hard to test changes, versions, etc.
              ✦      hregion.memstore.mslab.enabled                 ✦   Failure recovery is manual and time consuming
              ✦      block.cache.size

              ✦      Table design is super important, a few bytes
                     matter



     HBaseCon 2012

Friday, May 11, 12
Sidebar:
            Cluster testing
              ✦      Goal: Make it easy!

              ✦      Fixture data

              ✦      Load test tools

              ✦      Historical data, look for regressions

              ✦      Create a baseline!

              ✦      Test different versions, patches,
                     schema, compression, split methods,
                     configurations




     HBaseCon 2012

Friday, May 11, 12
Testing setup
            Overview                                                  Motherboy Testing
              ✦      Standard test cluster: 6 RS/DN, 1HM, 1NN, 3ZK    ✦   60M posts, 24GB LZO compressed

              ✦      Drive load via separate 23 node Hadoop cluster   ✦   51 mappers

              ✦      Test dataset created for each application        ✦   Map posts into tuple of Long’s - 24 byte row key
                                                                          and 16 bytes of data in single CF
              ✦      Results recorded and annotated in OpenTSDB
                                                                      ✦   Write to HBase cluster as fast as possible




     HBaseCon 2012

Friday, May 11, 12
Sample test results
            Scenario                       Test Time              Posts per Second Avg. Request Time Avg. CPU Load
            Baseline                       2:49:46                5801.4           3.7ms                15%
            Handler Count = 100            2:39:57                6157.5           3.4ms                12%
            Disabled Auto Flush            1:58:53                8284.5           3.4ms                7%
            Pre-Created Regions            30:08                  32684.3          2.2ms                3%

              Conclusions
                                                                               Tests must be designed for intended workload
                     ✦   More region servers, better throughput

                     ✦   Less round-trips, better throughput

                     ✦   Not earth shattering

                     ✦   If experimenting is easy, people will do it

     HBaseCon 2012

Friday, May 11, 12
Motherboy V2: In progress
            Implementation
              ✦      Goal: Into production!

              ✦      Multiple 10 node HBase clusters

              ✦      Writes/reads mediated by reactor layer

              ✦      Supervisor managed migrations and region splits




     HBaseCon 2012

Friday, May 11, 12
HBaseCon 2012

Friday, May 11, 12
Lessons learned
              1. The value of automation can’t be understated

              2. Rolling upgrades and deploys are easy, but refer to #1

              3. Technology choice does play a role in how easily you can scale

              4. At scale, nothing works as advertised

              5. Operational tooling is the single most important thing you can do up front




     HBaseCon 2012

Friday, May 11, 12
Questions?
                     Blake Matheny: bmatheny@tumblr.com




     HBaseCon 2012

Friday, May 11, 12
1 of 27

Recommended

Technology stack of social networks [MTS] by
Technology stack of social networks [MTS]Technology stack of social networks [MTS]
Technology stack of social networks [MTS]philmaweb
4.7K views21 slides
HBaseCon 2012 | Leveraging HBase for the World’s Largest Curated Genomic Data... by
HBaseCon 2012 | Leveraging HBase for the World’s Largest Curated Genomic Data...HBaseCon 2012 | Leveraging HBase for the World’s Largest Curated Genomic Data...
HBaseCon 2012 | Leveraging HBase for the World’s Largest Curated Genomic Data...Cloudera, Inc.
3.5K views11 slides
Cross-Site BigTable using HBase by
Cross-Site BigTable using HBaseCross-Site BigTable using HBase
Cross-Site BigTable using HBaseHBaseCon
3.5K views41 slides
HBaseCon 2012 | Living Data: Applying Adaptable Schemas to HBase - Aaron Kimb... by
HBaseCon 2012 | Living Data: Applying Adaptable Schemas to HBase - Aaron Kimb...HBaseCon 2012 | Living Data: Applying Adaptable Schemas to HBase - Aaron Kimb...
HBaseCon 2012 | Living Data: Applying Adaptable Schemas to HBase - Aaron Kimb...Cloudera, Inc.
3.2K views11 slides
HBaseCon 2013: Being Smarter Than the Smart Meter by
HBaseCon 2013: Being Smarter Than the Smart MeterHBaseCon 2013: Being Smarter Than the Smart Meter
HBaseCon 2013: Being Smarter Than the Smart MeterCloudera, Inc.
4.3K views20 slides
HBaseCon 2013: Rebuilding for Scale on Apache HBase by
HBaseCon 2013: Rebuilding for Scale on Apache HBaseHBaseCon 2013: Rebuilding for Scale on Apache HBase
HBaseCon 2013: Rebuilding for Scale on Apache HBaseCloudera, Inc.
3.9K views17 slides

More Related Content

Viewers also liked

HBaseCon 2013: Apache HBase on Flash by
HBaseCon 2013: Apache HBase on FlashHBaseCon 2013: Apache HBase on Flash
HBaseCon 2013: Apache HBase on FlashCloudera, Inc.
4.3K views31 slides
HBaseCon 2012 | Relaxed Transactions for HBase - Francis Liu, Yahoo! by
HBaseCon 2012 | Relaxed Transactions for HBase - Francis Liu, Yahoo!HBaseCon 2012 | Relaxed Transactions for HBase - Francis Liu, Yahoo!
HBaseCon 2012 | Relaxed Transactions for HBase - Francis Liu, Yahoo!Cloudera, Inc.
3.2K views24 slides
HBaseCon 2015: Trafodion - Integrating Operational SQL into HBase by
HBaseCon 2015: Trafodion - Integrating Operational SQL into HBaseHBaseCon 2015: Trafodion - Integrating Operational SQL into HBase
HBaseCon 2015: Trafodion - Integrating Operational SQL into HBaseHBaseCon
3.3K views20 slides
HBaseCon 2012 | Unique Sets on HBase and Hadoop - Elliot Clark, StumbleUpon by
HBaseCon 2012 | Unique Sets on HBase and Hadoop - Elliot Clark, StumbleUponHBaseCon 2012 | Unique Sets on HBase and Hadoop - Elliot Clark, StumbleUpon
HBaseCon 2012 | Unique Sets on HBase and Hadoop - Elliot Clark, StumbleUponCloudera, Inc.
3.4K views14 slides
Tales from the Cloudera Field by
Tales from the Cloudera FieldTales from the Cloudera Field
Tales from the Cloudera FieldHBaseCon
4K views38 slides
HBaseCon 2013: Apache Hadoop and Apache HBase for Real-Time Video Analytics by
HBaseCon 2013: Apache Hadoop and Apache HBase for Real-Time Video Analytics HBaseCon 2013: Apache Hadoop and Apache HBase for Real-Time Video Analytics
HBaseCon 2013: Apache Hadoop and Apache HBase for Real-Time Video Analytics Cloudera, Inc.
4.8K views14 slides

Viewers also liked(20)

HBaseCon 2013: Apache HBase on Flash by Cloudera, Inc.
HBaseCon 2013: Apache HBase on FlashHBaseCon 2013: Apache HBase on Flash
HBaseCon 2013: Apache HBase on Flash
Cloudera, Inc.4.3K views
HBaseCon 2012 | Relaxed Transactions for HBase - Francis Liu, Yahoo! by Cloudera, Inc.
HBaseCon 2012 | Relaxed Transactions for HBase - Francis Liu, Yahoo!HBaseCon 2012 | Relaxed Transactions for HBase - Francis Liu, Yahoo!
HBaseCon 2012 | Relaxed Transactions for HBase - Francis Liu, Yahoo!
Cloudera, Inc.3.2K views
HBaseCon 2015: Trafodion - Integrating Operational SQL into HBase by HBaseCon
HBaseCon 2015: Trafodion - Integrating Operational SQL into HBaseHBaseCon 2015: Trafodion - Integrating Operational SQL into HBase
HBaseCon 2015: Trafodion - Integrating Operational SQL into HBase
HBaseCon3.3K views
HBaseCon 2012 | Unique Sets on HBase and Hadoop - Elliot Clark, StumbleUpon by Cloudera, Inc.
HBaseCon 2012 | Unique Sets on HBase and Hadoop - Elliot Clark, StumbleUponHBaseCon 2012 | Unique Sets on HBase and Hadoop - Elliot Clark, StumbleUpon
HBaseCon 2012 | Unique Sets on HBase and Hadoop - Elliot Clark, StumbleUpon
Cloudera, Inc.3.4K views
Tales from the Cloudera Field by HBaseCon
Tales from the Cloudera FieldTales from the Cloudera Field
Tales from the Cloudera Field
HBaseCon4K views
HBaseCon 2013: Apache Hadoop and Apache HBase for Real-Time Video Analytics by Cloudera, Inc.
HBaseCon 2013: Apache Hadoop and Apache HBase for Real-Time Video Analytics HBaseCon 2013: Apache Hadoop and Apache HBase for Real-Time Video Analytics
HBaseCon 2013: Apache Hadoop and Apache HBase for Real-Time Video Analytics
Cloudera, Inc.4.8K views
HBaseCon 2012 | Content Addressable Storages for Fun and Profit - Berk Demir,... by Cloudera, Inc.
HBaseCon 2012 | Content Addressable Storages for Fun and Profit - Berk Demir,...HBaseCon 2012 | Content Addressable Storages for Fun and Profit - Berk Demir,...
HBaseCon 2012 | Content Addressable Storages for Fun and Profit - Berk Demir,...
Cloudera, Inc.3.8K views
HBaseCon 2013: Evolving a First-Generation Apache HBase Deployment to Second... by Cloudera, Inc.
HBaseCon 2013:  Evolving a First-Generation Apache HBase Deployment to Second...HBaseCon 2013:  Evolving a First-Generation Apache HBase Deployment to Second...
HBaseCon 2013: Evolving a First-Generation Apache HBase Deployment to Second...
Cloudera, Inc.4.2K views
HBaseCon 2013: Apache HBase, Meet Ops. Ops, Meet Apache HBase. by Cloudera, Inc.
HBaseCon 2013: Apache HBase, Meet Ops. Ops, Meet Apache HBase.HBaseCon 2013: Apache HBase, Meet Ops. Ops, Meet Apache HBase.
HBaseCon 2013: Apache HBase, Meet Ops. Ops, Meet Apache HBase.
Cloudera, Inc.7.1K views
HBaseCon 2012 | Building Mobile Infrastructure with HBase by Cloudera, Inc.
HBaseCon 2012 | Building Mobile Infrastructure with HBaseHBaseCon 2012 | Building Mobile Infrastructure with HBase
HBaseCon 2012 | Building Mobile Infrastructure with HBase
Cloudera, Inc.2.6K views
HBaseCon 2012 | Scaling GIS In Three Acts by Cloudera, Inc.
HBaseCon 2012 | Scaling GIS In Three ActsHBaseCon 2012 | Scaling GIS In Three Acts
HBaseCon 2012 | Scaling GIS In Three Acts
Cloudera, Inc.3.6K views
HBaseCon 2013: Project Valta - A Resource Management Layer over Apache HBase by Cloudera, Inc.
HBaseCon 2013: Project Valta - A Resource Management Layer over Apache HBaseHBaseCon 2013: Project Valta - A Resource Management Layer over Apache HBase
HBaseCon 2013: Project Valta - A Resource Management Layer over Apache HBase
Cloudera, Inc.3.2K views
HBaseCon 2013: 1500 JIRAs in 20 Minutes by Cloudera, Inc.
HBaseCon 2013: 1500 JIRAs in 20 MinutesHBaseCon 2013: 1500 JIRAs in 20 Minutes
HBaseCon 2013: 1500 JIRAs in 20 Minutes
Cloudera, Inc.4.1K views
HBaseCon 2012 | HBase for the Worlds Libraries - OCLC by Cloudera, Inc.
HBaseCon 2012 | HBase for the Worlds Libraries - OCLCHBaseCon 2012 | HBase for the Worlds Libraries - OCLC
HBaseCon 2012 | HBase for the Worlds Libraries - OCLC
Cloudera, Inc.3.9K views
HBaseCon 2012 | You’ve got HBase! How AOL Mail Handles Big Data by Cloudera, Inc.
HBaseCon 2012 | You’ve got HBase! How AOL Mail Handles Big DataHBaseCon 2012 | You’ve got HBase! How AOL Mail Handles Big Data
HBaseCon 2012 | You’ve got HBase! How AOL Mail Handles Big Data
Cloudera, Inc.3.5K views
HBaseCon 2013: Apache HBase Operations at Pinterest by Cloudera, Inc.
HBaseCon 2013: Apache HBase Operations at PinterestHBaseCon 2013: Apache HBase Operations at Pinterest
HBaseCon 2013: Apache HBase Operations at Pinterest
Cloudera, Inc.8.5K views
HBaseCon 2015: State of HBase Docs and How to Contribute by HBaseCon
HBaseCon 2015: State of HBase Docs and How to ContributeHBaseCon 2015: State of HBase Docs and How to Contribute
HBaseCon 2015: State of HBase Docs and How to Contribute
HBaseCon3.3K views
Data Evolution in HBase by HBaseCon
Data Evolution in HBaseData Evolution in HBase
Data Evolution in HBase
HBaseCon5K views
HBaseCon 2013: ETL for Apache HBase by Cloudera, Inc.
HBaseCon 2013: ETL for Apache HBaseHBaseCon 2013: ETL for Apache HBase
HBaseCon 2013: ETL for Apache HBase
Cloudera, Inc.6.9K views
HBaseCon 2015: Just the Basics by HBaseCon
HBaseCon 2015: Just the BasicsHBaseCon 2015: Just the Basics
HBaseCon 2015: Just the Basics
HBaseCon4.8K views

More from Cloudera, Inc.

Partner Briefing_January 25 (FINAL).pptx by
Partner Briefing_January 25 (FINAL).pptxPartner Briefing_January 25 (FINAL).pptx
Partner Briefing_January 25 (FINAL).pptxCloudera, Inc.
107 views55 slides
Cloudera Data Impact Awards 2021 - Finalists by
Cloudera Data Impact Awards 2021 - Finalists Cloudera Data Impact Awards 2021 - Finalists
Cloudera Data Impact Awards 2021 - Finalists Cloudera, Inc.
6.4K views34 slides
2020 Cloudera Data Impact Awards Finalists by
2020 Cloudera Data Impact Awards Finalists2020 Cloudera Data Impact Awards Finalists
2020 Cloudera Data Impact Awards FinalistsCloudera, Inc.
6.3K views43 slides
Edc event vienna presentation 1 oct 2019 by
Edc event vienna presentation 1 oct 2019Edc event vienna presentation 1 oct 2019
Edc event vienna presentation 1 oct 2019Cloudera, Inc.
4.5K views67 slides
Machine Learning with Limited Labeled Data 4/3/19 by
Machine Learning with Limited Labeled Data 4/3/19Machine Learning with Limited Labeled Data 4/3/19
Machine Learning with Limited Labeled Data 4/3/19Cloudera, Inc.
3.6K views36 slides
Data Driven With the Cloudera Modern Data Warehouse 3.19.19 by
Data Driven With the Cloudera Modern Data Warehouse 3.19.19Data Driven With the Cloudera Modern Data Warehouse 3.19.19
Data Driven With the Cloudera Modern Data Warehouse 3.19.19Cloudera, Inc.
2.5K views21 slides

More from Cloudera, Inc.(20)

Partner Briefing_January 25 (FINAL).pptx by Cloudera, Inc.
Partner Briefing_January 25 (FINAL).pptxPartner Briefing_January 25 (FINAL).pptx
Partner Briefing_January 25 (FINAL).pptx
Cloudera, Inc.107 views
Cloudera Data Impact Awards 2021 - Finalists by Cloudera, Inc.
Cloudera Data Impact Awards 2021 - Finalists Cloudera Data Impact Awards 2021 - Finalists
Cloudera Data Impact Awards 2021 - Finalists
Cloudera, Inc.6.4K views
2020 Cloudera Data Impact Awards Finalists by Cloudera, Inc.
2020 Cloudera Data Impact Awards Finalists2020 Cloudera Data Impact Awards Finalists
2020 Cloudera Data Impact Awards Finalists
Cloudera, Inc.6.3K views
Edc event vienna presentation 1 oct 2019 by Cloudera, Inc.
Edc event vienna presentation 1 oct 2019Edc event vienna presentation 1 oct 2019
Edc event vienna presentation 1 oct 2019
Cloudera, Inc.4.5K views
Machine Learning with Limited Labeled Data 4/3/19 by Cloudera, Inc.
Machine Learning with Limited Labeled Data 4/3/19Machine Learning with Limited Labeled Data 4/3/19
Machine Learning with Limited Labeled Data 4/3/19
Cloudera, Inc.3.6K views
Data Driven With the Cloudera Modern Data Warehouse 3.19.19 by Cloudera, Inc.
Data Driven With the Cloudera Modern Data Warehouse 3.19.19Data Driven With the Cloudera Modern Data Warehouse 3.19.19
Data Driven With the Cloudera Modern Data Warehouse 3.19.19
Cloudera, Inc.2.5K views
Introducing Cloudera DataFlow (CDF) 2.13.19 by Cloudera, Inc.
Introducing Cloudera DataFlow (CDF) 2.13.19Introducing Cloudera DataFlow (CDF) 2.13.19
Introducing Cloudera DataFlow (CDF) 2.13.19
Cloudera, Inc.4.9K views
Introducing Cloudera Data Science Workbench for HDP 2.12.19 by Cloudera, Inc.
Introducing Cloudera Data Science Workbench for HDP 2.12.19Introducing Cloudera Data Science Workbench for HDP 2.12.19
Introducing Cloudera Data Science Workbench for HDP 2.12.19
Cloudera, Inc.2.7K views
Shortening the Sales Cycle with a Modern Data Warehouse 1.30.19 by Cloudera, Inc.
Shortening the Sales Cycle with a Modern Data Warehouse 1.30.19Shortening the Sales Cycle with a Modern Data Warehouse 1.30.19
Shortening the Sales Cycle with a Modern Data Warehouse 1.30.19
Cloudera, Inc.1.6K views
Leveraging the cloud for analytics and machine learning 1.29.19 by Cloudera, Inc.
Leveraging the cloud for analytics and machine learning 1.29.19Leveraging the cloud for analytics and machine learning 1.29.19
Leveraging the cloud for analytics and machine learning 1.29.19
Cloudera, Inc.1.6K views
Modernizing the Legacy Data Warehouse – What, Why, and How 1.23.19 by Cloudera, Inc.
Modernizing the Legacy Data Warehouse – What, Why, and How 1.23.19Modernizing the Legacy Data Warehouse – What, Why, and How 1.23.19
Modernizing the Legacy Data Warehouse – What, Why, and How 1.23.19
Cloudera, Inc.2.5K views
Leveraging the Cloud for Big Data Analytics 12.11.18 by Cloudera, Inc.
Leveraging the Cloud for Big Data Analytics 12.11.18Leveraging the Cloud for Big Data Analytics 12.11.18
Leveraging the Cloud for Big Data Analytics 12.11.18
Cloudera, Inc.1.7K views
Modern Data Warehouse Fundamentals Part 3 by Cloudera, Inc.
Modern Data Warehouse Fundamentals Part 3Modern Data Warehouse Fundamentals Part 3
Modern Data Warehouse Fundamentals Part 3
Cloudera, Inc.1.3K views
Modern Data Warehouse Fundamentals Part 2 by Cloudera, Inc.
Modern Data Warehouse Fundamentals Part 2Modern Data Warehouse Fundamentals Part 2
Modern Data Warehouse Fundamentals Part 2
Cloudera, Inc.2.3K views
Modern Data Warehouse Fundamentals Part 1 by Cloudera, Inc.
Modern Data Warehouse Fundamentals Part 1Modern Data Warehouse Fundamentals Part 1
Modern Data Warehouse Fundamentals Part 1
Cloudera, Inc.1.5K views
Extending Cloudera SDX beyond the Platform by Cloudera, Inc.
Extending Cloudera SDX beyond the PlatformExtending Cloudera SDX beyond the Platform
Extending Cloudera SDX beyond the Platform
Cloudera, Inc.966 views
Federated Learning: ML with Privacy on the Edge 11.15.18 by Cloudera, Inc.
Federated Learning: ML with Privacy on the Edge 11.15.18Federated Learning: ML with Privacy on the Edge 11.15.18
Federated Learning: ML with Privacy on the Edge 11.15.18
Cloudera, Inc.2.2K views
Analyst Webinar: Doing a 180 on Customer 360 by Cloudera, Inc.
Analyst Webinar: Doing a 180 on Customer 360Analyst Webinar: Doing a 180 on Customer 360
Analyst Webinar: Doing a 180 on Customer 360
Cloudera, Inc.1.4K views
Build a modern platform for anti-money laundering 9.19.18 by Cloudera, Inc.
Build a modern platform for anti-money laundering 9.19.18Build a modern platform for anti-money laundering 9.19.18
Build a modern platform for anti-money laundering 9.19.18
Cloudera, Inc.1K views
Introducing the data science sandbox as a service 8.30.18 by Cloudera, Inc.
Introducing the data science sandbox as a service 8.30.18Introducing the data science sandbox as a service 8.30.18
Introducing the data science sandbox as a service 8.30.18
Cloudera, Inc.1.2K views

Recently uploaded

ESPC 2023 - Protect and Govern your Sensitive Data with Microsoft Purview in ... by
ESPC 2023 - Protect and Govern your Sensitive Data with Microsoft Purview in ...ESPC 2023 - Protect and Govern your Sensitive Data with Microsoft Purview in ...
ESPC 2023 - Protect and Govern your Sensitive Data with Microsoft Purview in ...Jasper Oosterveld
13 views49 slides
Transcript: The Details of Description Techniques tips and tangents on altern... by
Transcript: The Details of Description Techniques tips and tangents on altern...Transcript: The Details of Description Techniques tips and tangents on altern...
Transcript: The Details of Description Techniques tips and tangents on altern...BookNet Canada
135 views15 slides
virtual reality.pptx by
virtual reality.pptxvirtual reality.pptx
virtual reality.pptxG036GaikwadSnehal
11 views15 slides
TouchLog: Finger Micro Gesture Recognition Using Photo-Reflective Sensors by
TouchLog: Finger Micro Gesture Recognition  Using Photo-Reflective SensorsTouchLog: Finger Micro Gesture Recognition  Using Photo-Reflective Sensors
TouchLog: Finger Micro Gesture Recognition Using Photo-Reflective Sensorssugiuralab
19 views15 slides
Case Study Copenhagen Energy and Business Central.pdf by
Case Study Copenhagen Energy and Business Central.pdfCase Study Copenhagen Energy and Business Central.pdf
Case Study Copenhagen Energy and Business Central.pdfAitana
16 views3 slides
Data Integrity for Banking and Financial Services by
Data Integrity for Banking and Financial ServicesData Integrity for Banking and Financial Services
Data Integrity for Banking and Financial ServicesPrecisely
12 views26 slides

Recently uploaded(20)

ESPC 2023 - Protect and Govern your Sensitive Data with Microsoft Purview in ... by Jasper Oosterveld
ESPC 2023 - Protect and Govern your Sensitive Data with Microsoft Purview in ...ESPC 2023 - Protect and Govern your Sensitive Data with Microsoft Purview in ...
ESPC 2023 - Protect and Govern your Sensitive Data with Microsoft Purview in ...
Transcript: The Details of Description Techniques tips and tangents on altern... by BookNet Canada
Transcript: The Details of Description Techniques tips and tangents on altern...Transcript: The Details of Description Techniques tips and tangents on altern...
Transcript: The Details of Description Techniques tips and tangents on altern...
BookNet Canada135 views
TouchLog: Finger Micro Gesture Recognition Using Photo-Reflective Sensors by sugiuralab
TouchLog: Finger Micro Gesture Recognition  Using Photo-Reflective SensorsTouchLog: Finger Micro Gesture Recognition  Using Photo-Reflective Sensors
TouchLog: Finger Micro Gesture Recognition Using Photo-Reflective Sensors
sugiuralab19 views
Case Study Copenhagen Energy and Business Central.pdf by Aitana
Case Study Copenhagen Energy and Business Central.pdfCase Study Copenhagen Energy and Business Central.pdf
Case Study Copenhagen Energy and Business Central.pdf
Aitana16 views
Data Integrity for Banking and Financial Services by Precisely
Data Integrity for Banking and Financial ServicesData Integrity for Banking and Financial Services
Data Integrity for Banking and Financial Services
Precisely12 views
HTTP headers that make your website go faster - devs.gent November 2023 by Thijs Feryn
HTTP headers that make your website go faster - devs.gent November 2023HTTP headers that make your website go faster - devs.gent November 2023
HTTP headers that make your website go faster - devs.gent November 2023
Thijs Feryn21 views
Attacking IoT Devices from a Web Perspective - Linux Day by Simone Onofri
Attacking IoT Devices from a Web Perspective - Linux Day Attacking IoT Devices from a Web Perspective - Linux Day
Attacking IoT Devices from a Web Perspective - Linux Day
Simone Onofri15 views
Unit 1_Lecture 2_Physical Design of IoT.pdf by StephenTec
Unit 1_Lecture 2_Physical Design of IoT.pdfUnit 1_Lecture 2_Physical Design of IoT.pdf
Unit 1_Lecture 2_Physical Design of IoT.pdf
StephenTec12 views
【USB韌體設計課程】精選講義節錄-USB的列舉過程_艾鍗學院 by IttrainingIttraining
【USB韌體設計課程】精選講義節錄-USB的列舉過程_艾鍗學院【USB韌體設計課程】精選講義節錄-USB的列舉過程_艾鍗學院
【USB韌體設計課程】精選講義節錄-USB的列舉過程_艾鍗學院

HBaseCon 2012 | Growing Your Inbox, HBase at Tumblr

  • 1. Growing Your Inbox: HBase at Tumblr HBaseCon 2012 Friday, May 11, 12
  • 2. Monthly page views 1 8 , 0 0 0, 0 0 0, 0 0 0 600M page views per day 60-80M new posts per day Peak rate of 50k requests & 2k posts per second Totals: 22B posts, 53M blogs, 45M users 23 in Engineering (7 ops, 4 net/dc, 4 SRE, 8 dev) 70% of traffic is destined for the dashboard HBaseCon 2012 Friday, May 11, 12
  • 3. Posts and followers drive growth Posts Average Followers HBaseCon 2012 Friday, May 11, 12
  • 4. Traffic growth Page Views Fun Month Dashboard Begins Creaking People HBaseCon 2012 Friday, May 11, 12
  • 5. One small problem The dashboard is assembled using a time ordered essentially unpartitioned MySQL database without caching. Sharding and caching aren’t reasonable approaches. Write concurrency will soon introduce slave lag, rendering the dashboard unusable. HBaseCon 2012 Friday, May 11, 12
  • 6. Motherboy Motivations and Goals Motivations Goals ✦ Awesome Arrested Development reference ✦ Durability and availability ✦ The dashboard is going to die ✦ Multi-datacenter tenancy ✦ Time ordered MySQL sharding == bad ✦ Features (read/unread, tags, etc) ✦ Inconsistent dashboard experience HBaseCon 2012 Friday, May 11, 12
  • 7. Challenges ✦ Response time < 100ms ✦ Data volume ✦ Active legacy PHP code base ✦ Hardware provisioning, failures, etc. ✦ Small team, not much in house JVM/Hadoop experience HBaseCon 2012 Friday, May 11, 12
  • 8. One small problem Assumptions Data Set Growth ✦ 60M posts per day Rows Size Day 30 Billion 447 GB ✦ 500 followers on average Week 210 Billion 3.1 TB ✦ 40 bytes per row, 24 byte row key Month 840 Billion 12.2 TB ✦ Compression factor of 0.4 Year 10 Trillion 146 TB ✦ Replication factor of 3.5 (3 plus scratch space) Data Set Growth (Replicated) Size Day 1.5 TB Week 10.7 TB Month 42.8 TB Year 513 TB HBaseCon 2012 Friday, May 11, 12
  • 9. Motherboy Architecture Goals Failure Handling ✦ Dashboard posts are persistent for each follower ✦ Reads can be fulfilled from any store (their inbox) ✦ Writes can catch up when a store is back online ✦ Writes are asynchronous and distributed ✦ Users home to an inbox ✦ Inboxes are eventually consistent ✦ Selective materialization of feeds HBaseCon 2012 Friday, May 11, 12
  • 10. Motherboy V0 Implementation ✦ Goal: Get our feet wet! ✦ Single 6 node HBase cluster ✦ Writes to Motherboy via Finagle/Thrift RPC service ✦ User homed to Motherboy cluster HBaseCon 2012 Friday, May 11, 12
  • 12. Motherboy V0 learnings ✦ Conclusion: We needed more experience ✦ We had no clue what we were doing ✦ Poor automation ➜ Hard to recover in event of failure ✦ No test infrastructure ➜ Hard to evaluate effects of cluster performance tuning ✦ Very little insight into environment HBaseCon 2012 Friday, May 11, 12
  • 13. Sidebar: OpenTSDB ✦ Goal: Get some hands on experience running a production cluster ✦ Build out fully automated cluster provisioning ✦ Build out a cluster monitoring infrastructure ✦ Build out cluster trending/visualization HBaseCon 2012 Friday, May 11, 12
  • 14. Automated provisioning HBaseCon 2012 Friday, May 11, 12
  • 15. Automated monitoring HBaseCon 2012 Friday, May 11, 12
  • 16. Automated monitoring HBaseCon 2012 Friday, May 11, 12
  • 17. OpenTSDB: Cluster 0 ✦ 10k data points per second, 500k at peak ✦ 1200 servers reporting via collectd ✦ Application stats via collectd ✦ 864M data points per day ✦ 10 node cluster ✦ Making progress HBaseCon 2012 Friday, May 11, 12
  • 18. Motherboy V1: Try again Implementation ✦ Goal: Into testing! ✦ Single 10 node HBase cluster ✦ No writes directly to Motherboy, consumed via Firehose ✦ Enable reads via feature flag for engineers ✦ Ignore discovery mechanism for now HBaseCon 2012 Friday, May 11, 12
  • 20. Motherboy V1 learnings The black-art of tuning Challenges ✦ Disable major compactions ✦ Region sizing (# regions & size) is crucial and workload dependent ✦ Disable auto-splits, self manage ✦ YCSB was valuable for load testing but required ✦ regionserver.handler.count extensive modification ✦ hregion.max.filesize ✦ Too hard to test changes, versions, etc. ✦ hregion.memstore.mslab.enabled ✦ Failure recovery is manual and time consuming ✦ block.cache.size ✦ Table design is super important, a few bytes matter HBaseCon 2012 Friday, May 11, 12
  • 21. Sidebar: Cluster testing ✦ Goal: Make it easy! ✦ Fixture data ✦ Load test tools ✦ Historical data, look for regressions ✦ Create a baseline! ✦ Test different versions, patches, schema, compression, split methods, configurations HBaseCon 2012 Friday, May 11, 12
  • 22. Testing setup Overview Motherboy Testing ✦ Standard test cluster: 6 RS/DN, 1HM, 1NN, 3ZK ✦ 60M posts, 24GB LZO compressed ✦ Drive load via separate 23 node Hadoop cluster ✦ 51 mappers ✦ Test dataset created for each application ✦ Map posts into tuple of Long’s - 24 byte row key and 16 bytes of data in single CF ✦ Results recorded and annotated in OpenTSDB ✦ Write to HBase cluster as fast as possible HBaseCon 2012 Friday, May 11, 12
  • 23. Sample test results Scenario Test Time Posts per Second Avg. Request Time Avg. CPU Load Baseline 2:49:46 5801.4 3.7ms 15% Handler Count = 100 2:39:57 6157.5 3.4ms 12% Disabled Auto Flush 1:58:53 8284.5 3.4ms 7% Pre-Created Regions 30:08 32684.3 2.2ms 3% Conclusions Tests must be designed for intended workload ✦ More region servers, better throughput ✦ Less round-trips, better throughput ✦ Not earth shattering ✦ If experimenting is easy, people will do it HBaseCon 2012 Friday, May 11, 12
  • 24. Motherboy V2: In progress Implementation ✦ Goal: Into production! ✦ Multiple 10 node HBase clusters ✦ Writes/reads mediated by reactor layer ✦ Supervisor managed migrations and region splits HBaseCon 2012 Friday, May 11, 12
  • 26. Lessons learned 1. The value of automation can’t be understated 2. Rolling upgrades and deploys are easy, but refer to #1 3. Technology choice does play a role in how easily you can scale 4. At scale, nothing works as advertised 5. Operational tooling is the single most important thing you can do up front HBaseCon 2012 Friday, May 11, 12
  • 27. Questions? Blake Matheny: bmatheny@tumblr.com HBaseCon 2012 Friday, May 11, 12