SlideShare ist ein Scribd-Unternehmen logo
1 von 48
© 2018 Bloomberg Finance L.P. All rights reserved.
Me to We: Moving to a
Multi-Tenant HBase Cluster
HBaseCon 2018
June 18, 2018
Biju Nair
© 2018 Bloomberg Finance L.P. All rights reserved.
Outline
• Need for multi-tenancy
• HBase features for multi-tenancy
• Experience with multi-tenancy features
• Summary
© 2018 Bloomberg Finance L.P. All rights reserved.
Bloomberg in a nutshell
The Bloomberg Terminal delivers a
diverse array of information on a single
platform to facilitate financial decision-
making.
© 2018 Bloomberg Finance L.P. All rights reserved.
Bloomberg by the numbers
• Founded in 1981
• 325,000 subscribers in 170 countries
• Over 19,000 employees in 192 locations
• More News reporters than The New York Times + Washington Post + Chicago Tribune
© 2018 Bloomberg Finance L.P. All rights reserved.
Bloomberg technology by the numbers
• 5,000+ software engineers
• 150+ technologists and data scientists devoted to machine learning
• One of the largest private networks in the world
• 120 billion pieces of data from the financial markets each day, with a peak of more than
10 million messages/second
• 2 million news stories ingested / published each day (500+ news stories ingested/second)
• News content from 125K+ sources
• Over 1 billion messages and Instant Bloomberg (IB) chats handled daily
© 2018 Bloomberg Finance L.P. All rights reserved.
HBase at Bloomberg
• Started with v0.94.6
• 2B+ reads per day
• 1B+ writes per day
• 51+ TB of compressed data stored in HBase
© 2018 Bloomberg Finance L.P. All rights reserved.
One Cluster Per Application
Photo By: Todd Pruden, Fort Hood Public Affairs
© 2018 Bloomberg Finance L.P. All rights reserved.
Consolidation
© 2018 Bloomberg Finance L.P. All rights reserved.
Multiple Applications Per Cluster
© 2018 Bloomberg Finance L.P. All rights reserved.
Streamline Use of Clusters
© 2018 Bloomberg Finance L.P. All rights reserved.
Cost
• 550 Wh – 4,800 KWh/Year
• Greenhouse gas emissions – 8,755 miles of driving a car
• CO2 emissions from – 0.535 of 1 year home electricity use
• Sequestered by – 4.2 acres of U.S. forests in 1 year
https://www.zdnet.com/article/toolkit-calculate-datacenter-server-power-usage/
https://www.epa.gov/energy/greenhouse-gas-equivalencies-calculator
© 2018 Bloomberg Finance L.P. All rights reserved.
Namespace & ACL
© 2018 Bloomberg Finance L.P. All rights reserved.
Namespace & ACL
• hbase> create_namespace ‘PH‘
• create ' PH:red', 'f1'
• hbase> grant ‘phadmin', 'RWXCA', '@PH‘
• hbase> revoke ‘phadmin', '@PH‘
• Updates to hbase-site.xml
— hbase.security.authorization
— hbase.coprocessor.region.classes
— hbase.coprocessor.master.classes
— hbase.coprocessor.regionserver.classes
— hbase.security.exec.permission.checks
© 2018 Bloomberg Finance L.P. All rights reserved.
Region Server Groups
© 2018 Bloomberg Finance L.P. All rights reserved.
Architecture
HMaster
RS1 RS2 RS3 RS4 RS5 RS6 RS7 RS8
system
ZK
© 2018 Bloomberg Finance L.P. All rights reserved.
Architecture
HMaster
RS1 RS2 RS3 RS4 RS5 RS6 RS7 RS8
system
ZK
© 2018 Bloomberg Finance L.P. All rights reserved.
Internals
HMaster
RSGroupAdminEndpoint
RSGroupBasedLoadBalancer
FilterBy
Group
LoadBalancer
RSGroupInfoManager
RSGroup
Table
RSGroup
on ZK
Achieving HBase multitenancy with regionserver groups and favored nodes – DataWorks Summit 2017
© 2018 Bloomberg Finance L.P. All rights reserved.
RSgroup Creation
<property>
<name>hbase.coprocessor.master.classes</name>
<value>org.apache.hadoop.hbase.rsgroup.RSGroupAdminEndpoint</value>
</property>
<property>
<name>hbase.master.loadbalancer.class</name>
<value>org.apache.hadoop.hbase.rsgroup.RSGroupBasedLoadBalancer</value
</property>
© 2018 Bloomberg Finance L.P. All rights reserved.
RSgroup Creation
• add_rsgroup ‘derivatives’
• move_servers_rsgroup ‘derivatives’,[‘rs1:16020’,’rs2:16021’]
• move_tables_rsgroup ‘derivatives’,[‘tbl1’,’tbl2’]
• list_rsgroups ‘derivatives’
• move_servers_namespaces_rsgroup ‘derivatives’,[‘ns1’,’ns2’]*
• create_namespace 'ns',{'hbase.rsgroup.name' => ’derivatives'}
© 2018 Bloomberg Finance L.P. All rights reserved.
© 2018 Bloomberg Finance L.P. All rights reserved.
Storage Quota
© 2018 Bloomberg Finance L.P. All rights reserved.
Internals
Master
1 Create Quota
3 Compute Space
4 Update Current Use
Region Server
2 Report region size
5 Read Current Use
6 Enforce Policy
HBase
Quota
© 2018 Bloomberg Finance L.P. All rights reserved.
Enable Quota
<property>
<name>hbase.quota.enabled</name>
<value>true</value>
</property>
© 2018 Bloomberg Finance L.P. All rights reserved.
Space Quota Creation
• set_quota TYPE => SPACE, TABLE => 'tb1', LIMIT => '100G', POLICY =>
NO_INSERTS
• set_quota TYPE => SPACE, NAMESPACE => 'ns', LIMIT => '150T', POLICY
=> NO_WRITES
• Other Policies: NO_WRITES_COMPACTIONS, DISABLE, NONE
• Table level quota takes precedence
• Preserve quota definition - hbase.quota.remove.on.table.delete
© 2018 Bloomberg Finance L.P. All rights reserved.
CPU/Network Quota
© 2018 Bloomberg Finance L.P. All rights reserved.
Internals
Master
Create Quota
Region Server
Verify current use and
restrict
HBase
Quota
© 2018 Bloomberg Finance L.P. All rights reserved.
Query Throttling
• set_quota TYPE => THROTTLE, USER => 'u1', LIMIT => '10req/sec'
• set_quota TYPE => THROTTLE, NAMESPACE => 'ns1', LIMIT => '10req/sec'
• set_quota TYPE => THROTTLE, THROTTLE_TYPE => WRITE, TABLE => 't1',
LIMIT => '10M/sec'
• set_quota USER => 'u1', GLOBAL_BYPASS => true
© 2018 Bloomberg Finance L.P. All rights reserved.
Meta-Data Quota
© 2018 Bloomberg Finance L.P. All rights reserved.
Internals
Master
Create Quota
Verify Quota Use
Region Server
Region Split
HBase
Quota
© 2018 Bloomberg Finance L.P. All rights reserved.
Meta-Data Quota Creation
• create_namespace 'ns1', {'hbase.namespace.quota.maxregions'=>'10'}
• create_namespace 'ns2', {'hbase.namespace.quota.maxtables'=>'2’}
• alter_namespace 'ns3', {METHOD => 'set',
'hbase.namespace.quota.maxtables'=>'5’}
• alter_namespace 'ns3', {METHOD => 'unset', NAME =>
'hbase.namespace.quota.maxtables'}
© 2018 Bloomberg Finance L.P. All rights reserved.
Request Queues
© 2018 Bloomberg Finance L.P. All rights reserved.
Request Queues
• Number of request handler per region server
— hbase.regionserver.handler.count
• Number of queues per request handler
— hbase.ipc.server.callqueue.handler.factor
• read vs write queue ratio
— hbase.ipc.server.callqueue.read.ratio
• get vs scan queue ratio
—hbase.ipc.server.callqueue.scan.ratio
© 2018 Bloomberg Finance L.P. All rights reserved.
Rubber meets the road
© 2018 Bloomberg Finance L.P. All rights reserved.
RSGroup - Performance
678189 687062 667110
760310 758847
815204
Run 1 Run 1 Run 3
Write Performance Avg
Avg Avg RG
444978
481672
520719
619840 606806 603353
Run 1 Run 1 Run 3
Write Performance Min
Min Min RG
© 2018 Bloomberg Finance L.P. All rights reserved.
RSGroup – Data Locality
0.00%
8.16%
1.87%
23.81%
10.01%
2.66%
14.76%
4.90%
15.43% 14.71%
16.53% 15.99%
6.32%
21.72%
No Fail Run 1 Run 2 Run 3 Run 4 Run 5 Run 6
Non local blocks
Shared Cluster RS Group
© 2018 Bloomberg Finance L.P. All rights reserved.
© 2018 Bloomberg Finance L.P. All rights reserved.
RSGroup
• Replication doesn’t recognize RSgroup
— Vote for HBASE-15531 J
• RSes in groups should be distributed across racks
• Group for SYSTEM tables should be large to withstand failures
• Failure of RSes in a group requires master restart for recovery
— HBASE-20728
• Reverting RSgroup feature requires additional steps
• RSgroup uses SLB and hence supports region replication
© 2018 Bloomberg Finance L.P. All rights reserved.
RSGroup
• Altering namespace to set RSGroup is not supported in 1.x
• Failure of all RSes in SYSTEM RSgroup makes cluster unavailable
— HBASE-20632
• JIRA’s
— HBASE-20566
— HBASE-20606
— HBASE-20607
— HBASE-20666
© 2018 Bloomberg Finance L.P. All rights reserved.
Space Quota
Limit, 10
Actual, 210.9
0
50
100
150
200
250
300
350
Run 1 - def Run 2 - def Run3 - def Run 4 - 60 sec Run 5 - 30 sec
StoragesizeinGB
Space Quota - Limit vs Actual
© 2018 Bloomberg Finance L.P. All rights reserved.
Space Quota
• Space Quota Properties
— hbase.regionserver.quotas.policy.refresher.chore.period
— hbase.regionserver.quotas.policy.refresher.report.percent
— hbase.regionserver.quotas.region.size.reporting.chore.period
— hbase.master.quotas.observer.chore.period
• HBASE-18133
— Low-latency space quota size reports
• HBASE-20588
— LIMIT => NONE doesn’t take effect
• HBASE-20662
— Disabled table due to space violation doesn’t get re-enabled
© 2018 Bloomberg Finance L.P. All rights reserved.
Meta-Data Quota
© 2018 Bloomberg Finance L.P. All rights reserved.
Quota
• Limit on region count can lead to large regions
• HBASE-20705
— Having RPC Quota on a table prevents Space quota to be recreated/removed
• Setting HDFS quota on a namespace can bring down RS
© 2018 Bloomberg Finance L.P. All rights reserved.
Summary
© 2018 Bloomberg Finance L.P. All rights reserved.
HBase Multi-Tenancy Story is Good
HBase Feature Multi-Tenant Cluster NS* Table User
Namespace + ACL Logical grouping of tenants X X X
Regionserver Groups Allocate CPU/Memory/Network per tenant X X
Space Quota Guarantee storage space per tenant X X
Request Throttling Control CPU/Network use X X X
Meta-Data Quota Control number of objects created X
* NS - Namespace
© 2018 Bloomberg Finance L.P. All rights reserved.
Improvements
• HBASE-15531
• SYSTEM table availability
• Memory Quota
© 2018 Bloomberg Finance L.P. All rights reserved.
Acknowledgement
• HBASE-6721 – Region server groups
• HBASE-16961 – Storage quota
• HBASE-11598 – Network/CPU Quota
• HBASE-8410 – Meta-Data Quota
• HBASE-8015 – Namespace and ACL
• HBASE-11355 – Request Queue
© 2018 Bloomberg Finance L.P. All rights reserved.
Thank You!
Reference: http://hbase.apache.org
Connect with Hadoop Team: hadoop@bloomberg.net
© 2018 Bloomberg Finance L.P. All rights reserved.
We are hiring!
Questions?
https://www.bloomberg.com/careers

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (20)

Evening out the uneven: dealing with skew in Flink
Evening out the uneven: dealing with skew in FlinkEvening out the uneven: dealing with skew in Flink
Evening out the uneven: dealing with skew in Flink
 
Redo log improvements MYSQL 8.0
Redo log improvements MYSQL 8.0Redo log improvements MYSQL 8.0
Redo log improvements MYSQL 8.0
 
When Apache Spark Meets TiDB with Xiaoyu Ma
When Apache Spark Meets TiDB with Xiaoyu MaWhen Apache Spark Meets TiDB with Xiaoyu Ma
When Apache Spark Meets TiDB with Xiaoyu Ma
 
Hadoop World 2011: Advanced HBase Schema Design - Lars George, Cloudera
Hadoop World 2011: Advanced HBase Schema Design - Lars George, ClouderaHadoop World 2011: Advanced HBase Schema Design - Lars George, Cloudera
Hadoop World 2011: Advanced HBase Schema Design - Lars George, Cloudera
 
RedisConf17 - Lyft - Geospatial at Scale - Daniel Hochman
RedisConf17 - Lyft - Geospatial at Scale - Daniel HochmanRedisConf17 - Lyft - Geospatial at Scale - Daniel Hochman
RedisConf17 - Lyft - Geospatial at Scale - Daniel Hochman
 
The Stream Processor as a Database Apache Flink
The Stream Processor as a Database Apache FlinkThe Stream Processor as a Database Apache Flink
The Stream Processor as a Database Apache Flink
 
Untangling Cluster Management with Helix
Untangling Cluster Management with HelixUntangling Cluster Management with Helix
Untangling Cluster Management with Helix
 
TiDB Introduction
TiDB IntroductionTiDB Introduction
TiDB Introduction
 
Polyglot persistence @ netflix (CDE Meetup)
Polyglot persistence @ netflix (CDE Meetup) Polyglot persistence @ netflix (CDE Meetup)
Polyglot persistence @ netflix (CDE Meetup)
 
Building a fully managed stream processing platform on Flink at scale for Lin...
Building a fully managed stream processing platform on Flink at scale for Lin...Building a fully managed stream processing platform on Flink at scale for Lin...
Building a fully managed stream processing platform on Flink at scale for Lin...
 
Distributed Lock Manager
Distributed Lock ManagerDistributed Lock Manager
Distributed Lock Manager
 
Building robust CDC pipeline with Apache Hudi and Debezium
Building robust CDC pipeline with Apache Hudi and DebeziumBuilding robust CDC pipeline with Apache Hudi and Debezium
Building robust CDC pipeline with Apache Hudi and Debezium
 
Webinar slides: MORE secrets of ClickHouse Query Performance. By Robert Hodge...
Webinar slides: MORE secrets of ClickHouse Query Performance. By Robert Hodge...Webinar slides: MORE secrets of ClickHouse Query Performance. By Robert Hodge...
Webinar slides: MORE secrets of ClickHouse Query Performance. By Robert Hodge...
 
The basics of fluentd
The basics of fluentdThe basics of fluentd
The basics of fluentd
 
Making Apache Spark Better with Delta Lake
Making Apache Spark Better with Delta LakeMaking Apache Spark Better with Delta Lake
Making Apache Spark Better with Delta Lake
 
Supporting Apache HBase : Troubleshooting and Supportability Improvements
Supporting Apache HBase : Troubleshooting and Supportability ImprovementsSupporting Apache HBase : Troubleshooting and Supportability Improvements
Supporting Apache HBase : Troubleshooting and Supportability Improvements
 
Exploring Java Heap Dumps (Oracle Code One 2018)
Exploring Java Heap Dumps (Oracle Code One 2018)Exploring Java Heap Dumps (Oracle Code One 2018)
Exploring Java Heap Dumps (Oracle Code One 2018)
 
Fluentd Overview, Now and Then
Fluentd Overview, Now and ThenFluentd Overview, Now and Then
Fluentd Overview, Now and Then
 
ProxySQL High Availability (Clustering)
ProxySQL High Availability (Clustering)ProxySQL High Availability (Clustering)
ProxySQL High Availability (Clustering)
 
Cloud arch patterns
Cloud arch patternsCloud arch patterns
Cloud arch patterns
 

Ähnlich wie Multi-Tenant HBase Cluster - HBaseCon2018-final

HBaseConAsia2018 Track3-1: Serving billions of queries in millisecond latencies
HBaseConAsia2018 Track3-1: Serving billions of queries in millisecond latenciesHBaseConAsia2018 Track3-1: Serving billions of queries in millisecond latencies
HBaseConAsia2018 Track3-1: Serving billions of queries in millisecond latencies
Michael Stack
 

Ähnlich wie Multi-Tenant HBase Cluster - HBaseCon2018-final (20)

Real-Time Market Data Analytics Using Kafka Streams
Real-Time Market Data Analytics Using Kafka StreamsReal-Time Market Data Analytics Using Kafka Streams
Real-Time Market Data Analytics Using Kafka Streams
 
HBaseConAsia2018 Track3-1: Serving billions of queries in millisecond latencies
HBaseConAsia2018 Track3-1: Serving billions of queries in millisecond latenciesHBaseConAsia2018 Track3-1: Serving billions of queries in millisecond latencies
HBaseConAsia2018 Track3-1: Serving billions of queries in millisecond latencies
 
Serving queries at low latency using HBase
Serving queries at low latency using HBaseServing queries at low latency using HBase
Serving queries at low latency using HBase
 
Building a Data Subscription Service with Kafka Connect (Danica Fine & Ajay V...
Building a Data Subscription Service with Kafka Connect (Danica Fine & Ajay V...Building a Data Subscription Service with Kafka Connect (Danica Fine & Ajay V...
Building a Data Subscription Service with Kafka Connect (Danica Fine & Ajay V...
 
HBase Internals And Operations
HBase Internals And OperationsHBase Internals And Operations
HBase Internals And Operations
 
HBase coprocessors, Uses, Abuses, Solutions
HBase coprocessors, Uses, Abuses, SolutionsHBase coprocessors, Uses, Abuses, Solutions
HBase coprocessors, Uses, Abuses, Solutions
 
Replaying KStreams Apps Using State Snapshots (Nishchay Sinha & Yan Wang, Blo...
Replaying KStreams Apps Using State Snapshots (Nishchay Sinha & Yan Wang, Blo...Replaying KStreams Apps Using State Snapshots (Nishchay Sinha & Yan Wang, Blo...
Replaying KStreams Apps Using State Snapshots (Nishchay Sinha & Yan Wang, Blo...
 
Why My Streaming Job is Slow - Profiling and Optimizing Kafka Streams Apps (L...
Why My Streaming Job is Slow - Profiling and Optimizing Kafka Streams Apps (L...Why My Streaming Job is Slow - Profiling and Optimizing Kafka Streams Apps (L...
Why My Streaming Job is Slow - Profiling and Optimizing Kafka Streams Apps (L...
 
Kafka Connect and KSQL: Useful Tools in Migrating from a Legacy System to Kaf...
Kafka Connect and KSQL: Useful Tools in Migrating from a Legacy System to Kaf...Kafka Connect and KSQL: Useful Tools in Migrating from a Legacy System to Kaf...
Kafka Connect and KSQL: Useful Tools in Migrating from a Legacy System to Kaf...
 
Scaling Push Messaging for Millions of Netflix Devices
Scaling Push Messaging for Millions of Netflix DevicesScaling Push Messaging for Millions of Netflix Devices
Scaling Push Messaging for Millions of Netflix Devices
 
Introducing Performance Insights - Cloud-Based Database Performance Monitorin...
Introducing Performance Insights - Cloud-Based Database Performance Monitorin...Introducing Performance Insights - Cloud-Based Database Performance Monitorin...
Introducing Performance Insights - Cloud-Based Database Performance Monitorin...
 
Amazon Prime Video: Delivering the Amazing Video Experience (CTD203-R1) - AWS...
Amazon Prime Video: Delivering the Amazing Video Experience (CTD203-R1) - AWS...Amazon Prime Video: Delivering the Amazing Video Experience (CTD203-R1) - AWS...
Amazon Prime Video: Delivering the Amazing Video Experience (CTD203-R1) - AWS...
 
2019 03-13-implementing microservices by ddd
2019 03-13-implementing microservices by ddd2019 03-13-implementing microservices by ddd
2019 03-13-implementing microservices by ddd
 
Implementing Microservices by DDD
Implementing Microservices by DDDImplementing Microservices by DDD
Implementing Microservices by DDD
 
ElastiCache & Redis: Database Week San Francisco
ElastiCache & Redis: Database Week San FranciscoElastiCache & Redis: Database Week San Francisco
ElastiCache & Redis: Database Week San Francisco
 
ElastiCache & Redis
ElastiCache & RedisElastiCache & Redis
ElastiCache & Redis
 
Shift-Left SRE: Self-Healing with AWS Lambda Functions (DEV313-S) - AWS re:In...
Shift-Left SRE: Self-Healing with AWS Lambda Functions (DEV313-S) - AWS re:In...Shift-Left SRE: Self-Healing with AWS Lambda Functions (DEV313-S) - AWS re:In...
Shift-Left SRE: Self-Healing with AWS Lambda Functions (DEV313-S) - AWS re:In...
 
Foundations of AWS Global Cloud Infrastructure (ARC217) - AWS re:Invent 2018
Foundations of AWS Global Cloud Infrastructure (ARC217) - AWS re:Invent 2018Foundations of AWS Global Cloud Infrastructure (ARC217) - AWS re:Invent 2018
Foundations of AWS Global Cloud Infrastructure (ARC217) - AWS re:Invent 2018
 
ElastiCache & Redis: Database Week SF
ElastiCache & Redis: Database Week SFElastiCache & Redis: Database Week SF
ElastiCache & Redis: Database Week SF
 
Cost Optimisation Instructor Led Lab
Cost Optimisation Instructor Led LabCost Optimisation Instructor Led Lab
Cost Optimisation Instructor Led Lab
 

Mehr von Biju Nair

NENUG Apr14 Talk - data modeling for netezza
NENUG Apr14 Talk - data modeling for netezzaNENUG Apr14 Talk - data modeling for netezza
NENUG Apr14 Talk - data modeling for netezza
Biju Nair
 
Netezza fundamentals for developers
Netezza fundamentals for developersNetezza fundamentals for developers
Netezza fundamentals for developers
Biju Nair
 
Project Risk Management
Project Risk ManagementProject Risk Management
Project Risk Management
Biju Nair
 

Mehr von Biju Nair (15)

Chef conf-2015-chef-patterns-at-bloomberg-scale
Chef conf-2015-chef-patterns-at-bloomberg-scaleChef conf-2015-chef-patterns-at-bloomberg-scale
Chef conf-2015-chef-patterns-at-bloomberg-scale
 
Apache Kafka Reference
Apache Kafka ReferenceApache Kafka Reference
Apache Kafka Reference
 
Cursor Implementation in Apache Phoenix
Cursor Implementation in Apache PhoenixCursor Implementation in Apache Phoenix
Cursor Implementation in Apache Phoenix
 
Hadoop security
Hadoop securityHadoop security
Hadoop security
 
Chef patterns
Chef patternsChef patterns
Chef patterns
 
HBase Application Performance Improvement
HBase Application Performance ImprovementHBase Application Performance Improvement
HBase Application Performance Improvement
 
HDFS User Reference
HDFS User ReferenceHDFS User Reference
HDFS User Reference
 
NENUG Apr14 Talk - data modeling for netezza
NENUG Apr14 Talk - data modeling for netezzaNENUG Apr14 Talk - data modeling for netezza
NENUG Apr14 Talk - data modeling for netezza
 
Netezza workload management
Netezza workload managementNetezza workload management
Netezza workload management
 
Row or Columnar Database
Row or Columnar DatabaseRow or Columnar Database
Row or Columnar Database
 
Using Netezza Query Plan to Improve Performace
Using Netezza Query Plan to Improve PerformaceUsing Netezza Query Plan to Improve Performace
Using Netezza Query Plan to Improve Performace
 
Netezza fundamentals for developers
Netezza fundamentals for developersNetezza fundamentals for developers
Netezza fundamentals for developers
 
Concurrency
ConcurrencyConcurrency
Concurrency
 
Project Risk Management
Project Risk ManagementProject Risk Management
Project Risk Management
 
Websphere MQ (MQSeries) fundamentals
Websphere MQ (MQSeries) fundamentalsWebsphere MQ (MQSeries) fundamentals
Websphere MQ (MQSeries) fundamentals
 

Kürzlich hochgeladen

%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
masabamasaba
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
masabamasaba
 

Kürzlich hochgeladen (20)

%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
 
tonesoftg
tonesoftgtonesoftg
tonesoftg
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 

Multi-Tenant HBase Cluster - HBaseCon2018-final

  • 1. © 2018 Bloomberg Finance L.P. All rights reserved. Me to We: Moving to a Multi-Tenant HBase Cluster HBaseCon 2018 June 18, 2018 Biju Nair
  • 2. © 2018 Bloomberg Finance L.P. All rights reserved. Outline • Need for multi-tenancy • HBase features for multi-tenancy • Experience with multi-tenancy features • Summary
  • 3. © 2018 Bloomberg Finance L.P. All rights reserved. Bloomberg in a nutshell The Bloomberg Terminal delivers a diverse array of information on a single platform to facilitate financial decision- making.
  • 4. © 2018 Bloomberg Finance L.P. All rights reserved. Bloomberg by the numbers • Founded in 1981 • 325,000 subscribers in 170 countries • Over 19,000 employees in 192 locations • More News reporters than The New York Times + Washington Post + Chicago Tribune
  • 5. © 2018 Bloomberg Finance L.P. All rights reserved. Bloomberg technology by the numbers • 5,000+ software engineers • 150+ technologists and data scientists devoted to machine learning • One of the largest private networks in the world • 120 billion pieces of data from the financial markets each day, with a peak of more than 10 million messages/second • 2 million news stories ingested / published each day (500+ news stories ingested/second) • News content from 125K+ sources • Over 1 billion messages and Instant Bloomberg (IB) chats handled daily
  • 6. © 2018 Bloomberg Finance L.P. All rights reserved. HBase at Bloomberg • Started with v0.94.6 • 2B+ reads per day • 1B+ writes per day • 51+ TB of compressed data stored in HBase
  • 7. © 2018 Bloomberg Finance L.P. All rights reserved. One Cluster Per Application Photo By: Todd Pruden, Fort Hood Public Affairs
  • 8. © 2018 Bloomberg Finance L.P. All rights reserved. Consolidation
  • 9. © 2018 Bloomberg Finance L.P. All rights reserved. Multiple Applications Per Cluster
  • 10. © 2018 Bloomberg Finance L.P. All rights reserved. Streamline Use of Clusters
  • 11. © 2018 Bloomberg Finance L.P. All rights reserved. Cost • 550 Wh – 4,800 KWh/Year • Greenhouse gas emissions – 8,755 miles of driving a car • CO2 emissions from – 0.535 of 1 year home electricity use • Sequestered by – 4.2 acres of U.S. forests in 1 year https://www.zdnet.com/article/toolkit-calculate-datacenter-server-power-usage/ https://www.epa.gov/energy/greenhouse-gas-equivalencies-calculator
  • 12. © 2018 Bloomberg Finance L.P. All rights reserved. Namespace & ACL
  • 13. © 2018 Bloomberg Finance L.P. All rights reserved. Namespace & ACL • hbase> create_namespace ‘PH‘ • create ' PH:red', 'f1' • hbase> grant ‘phadmin', 'RWXCA', '@PH‘ • hbase> revoke ‘phadmin', '@PH‘ • Updates to hbase-site.xml — hbase.security.authorization — hbase.coprocessor.region.classes — hbase.coprocessor.master.classes — hbase.coprocessor.regionserver.classes — hbase.security.exec.permission.checks
  • 14. © 2018 Bloomberg Finance L.P. All rights reserved. Region Server Groups
  • 15. © 2018 Bloomberg Finance L.P. All rights reserved. Architecture HMaster RS1 RS2 RS3 RS4 RS5 RS6 RS7 RS8 system ZK
  • 16. © 2018 Bloomberg Finance L.P. All rights reserved. Architecture HMaster RS1 RS2 RS3 RS4 RS5 RS6 RS7 RS8 system ZK
  • 17. © 2018 Bloomberg Finance L.P. All rights reserved. Internals HMaster RSGroupAdminEndpoint RSGroupBasedLoadBalancer FilterBy Group LoadBalancer RSGroupInfoManager RSGroup Table RSGroup on ZK Achieving HBase multitenancy with regionserver groups and favored nodes – DataWorks Summit 2017
  • 18. © 2018 Bloomberg Finance L.P. All rights reserved. RSgroup Creation <property> <name>hbase.coprocessor.master.classes</name> <value>org.apache.hadoop.hbase.rsgroup.RSGroupAdminEndpoint</value> </property> <property> <name>hbase.master.loadbalancer.class</name> <value>org.apache.hadoop.hbase.rsgroup.RSGroupBasedLoadBalancer</value </property>
  • 19. © 2018 Bloomberg Finance L.P. All rights reserved. RSgroup Creation • add_rsgroup ‘derivatives’ • move_servers_rsgroup ‘derivatives’,[‘rs1:16020’,’rs2:16021’] • move_tables_rsgroup ‘derivatives’,[‘tbl1’,’tbl2’] • list_rsgroups ‘derivatives’ • move_servers_namespaces_rsgroup ‘derivatives’,[‘ns1’,’ns2’]* • create_namespace 'ns',{'hbase.rsgroup.name' => ’derivatives'}
  • 20. © 2018 Bloomberg Finance L.P. All rights reserved.
  • 21. © 2018 Bloomberg Finance L.P. All rights reserved. Storage Quota
  • 22. © 2018 Bloomberg Finance L.P. All rights reserved. Internals Master 1 Create Quota 3 Compute Space 4 Update Current Use Region Server 2 Report region size 5 Read Current Use 6 Enforce Policy HBase Quota
  • 23. © 2018 Bloomberg Finance L.P. All rights reserved. Enable Quota <property> <name>hbase.quota.enabled</name> <value>true</value> </property>
  • 24. © 2018 Bloomberg Finance L.P. All rights reserved. Space Quota Creation • set_quota TYPE => SPACE, TABLE => 'tb1', LIMIT => '100G', POLICY => NO_INSERTS • set_quota TYPE => SPACE, NAMESPACE => 'ns', LIMIT => '150T', POLICY => NO_WRITES • Other Policies: NO_WRITES_COMPACTIONS, DISABLE, NONE • Table level quota takes precedence • Preserve quota definition - hbase.quota.remove.on.table.delete
  • 25. © 2018 Bloomberg Finance L.P. All rights reserved. CPU/Network Quota
  • 26. © 2018 Bloomberg Finance L.P. All rights reserved. Internals Master Create Quota Region Server Verify current use and restrict HBase Quota
  • 27. © 2018 Bloomberg Finance L.P. All rights reserved. Query Throttling • set_quota TYPE => THROTTLE, USER => 'u1', LIMIT => '10req/sec' • set_quota TYPE => THROTTLE, NAMESPACE => 'ns1', LIMIT => '10req/sec' • set_quota TYPE => THROTTLE, THROTTLE_TYPE => WRITE, TABLE => 't1', LIMIT => '10M/sec' • set_quota USER => 'u1', GLOBAL_BYPASS => true
  • 28. © 2018 Bloomberg Finance L.P. All rights reserved. Meta-Data Quota
  • 29. © 2018 Bloomberg Finance L.P. All rights reserved. Internals Master Create Quota Verify Quota Use Region Server Region Split HBase Quota
  • 30. © 2018 Bloomberg Finance L.P. All rights reserved. Meta-Data Quota Creation • create_namespace 'ns1', {'hbase.namespace.quota.maxregions'=>'10'} • create_namespace 'ns2', {'hbase.namespace.quota.maxtables'=>'2’} • alter_namespace 'ns3', {METHOD => 'set', 'hbase.namespace.quota.maxtables'=>'5’} • alter_namespace 'ns3', {METHOD => 'unset', NAME => 'hbase.namespace.quota.maxtables'}
  • 31. © 2018 Bloomberg Finance L.P. All rights reserved. Request Queues
  • 32. © 2018 Bloomberg Finance L.P. All rights reserved. Request Queues • Number of request handler per region server — hbase.regionserver.handler.count • Number of queues per request handler — hbase.ipc.server.callqueue.handler.factor • read vs write queue ratio — hbase.ipc.server.callqueue.read.ratio • get vs scan queue ratio —hbase.ipc.server.callqueue.scan.ratio
  • 33. © 2018 Bloomberg Finance L.P. All rights reserved. Rubber meets the road
  • 34. © 2018 Bloomberg Finance L.P. All rights reserved. RSGroup - Performance 678189 687062 667110 760310 758847 815204 Run 1 Run 1 Run 3 Write Performance Avg Avg Avg RG 444978 481672 520719 619840 606806 603353 Run 1 Run 1 Run 3 Write Performance Min Min Min RG
  • 35. © 2018 Bloomberg Finance L.P. All rights reserved. RSGroup – Data Locality 0.00% 8.16% 1.87% 23.81% 10.01% 2.66% 14.76% 4.90% 15.43% 14.71% 16.53% 15.99% 6.32% 21.72% No Fail Run 1 Run 2 Run 3 Run 4 Run 5 Run 6 Non local blocks Shared Cluster RS Group
  • 36. © 2018 Bloomberg Finance L.P. All rights reserved.
  • 37. © 2018 Bloomberg Finance L.P. All rights reserved. RSGroup • Replication doesn’t recognize RSgroup — Vote for HBASE-15531 J • RSes in groups should be distributed across racks • Group for SYSTEM tables should be large to withstand failures • Failure of RSes in a group requires master restart for recovery — HBASE-20728 • Reverting RSgroup feature requires additional steps • RSgroup uses SLB and hence supports region replication
  • 38. © 2018 Bloomberg Finance L.P. All rights reserved. RSGroup • Altering namespace to set RSGroup is not supported in 1.x • Failure of all RSes in SYSTEM RSgroup makes cluster unavailable — HBASE-20632 • JIRA’s — HBASE-20566 — HBASE-20606 — HBASE-20607 — HBASE-20666
  • 39. © 2018 Bloomberg Finance L.P. All rights reserved. Space Quota Limit, 10 Actual, 210.9 0 50 100 150 200 250 300 350 Run 1 - def Run 2 - def Run3 - def Run 4 - 60 sec Run 5 - 30 sec StoragesizeinGB Space Quota - Limit vs Actual
  • 40. © 2018 Bloomberg Finance L.P. All rights reserved. Space Quota • Space Quota Properties — hbase.regionserver.quotas.policy.refresher.chore.period — hbase.regionserver.quotas.policy.refresher.report.percent — hbase.regionserver.quotas.region.size.reporting.chore.period — hbase.master.quotas.observer.chore.period • HBASE-18133 — Low-latency space quota size reports • HBASE-20588 — LIMIT => NONE doesn’t take effect • HBASE-20662 — Disabled table due to space violation doesn’t get re-enabled
  • 41. © 2018 Bloomberg Finance L.P. All rights reserved. Meta-Data Quota
  • 42. © 2018 Bloomberg Finance L.P. All rights reserved. Quota • Limit on region count can lead to large regions • HBASE-20705 — Having RPC Quota on a table prevents Space quota to be recreated/removed • Setting HDFS quota on a namespace can bring down RS
  • 43. © 2018 Bloomberg Finance L.P. All rights reserved. Summary
  • 44. © 2018 Bloomberg Finance L.P. All rights reserved. HBase Multi-Tenancy Story is Good HBase Feature Multi-Tenant Cluster NS* Table User Namespace + ACL Logical grouping of tenants X X X Regionserver Groups Allocate CPU/Memory/Network per tenant X X Space Quota Guarantee storage space per tenant X X Request Throttling Control CPU/Network use X X X Meta-Data Quota Control number of objects created X * NS - Namespace
  • 45. © 2018 Bloomberg Finance L.P. All rights reserved. Improvements • HBASE-15531 • SYSTEM table availability • Memory Quota
  • 46. © 2018 Bloomberg Finance L.P. All rights reserved. Acknowledgement • HBASE-6721 – Region server groups • HBASE-16961 – Storage quota • HBASE-11598 – Network/CPU Quota • HBASE-8410 – Meta-Data Quota • HBASE-8015 – Namespace and ACL • HBASE-11355 – Request Queue
  • 47. © 2018 Bloomberg Finance L.P. All rights reserved. Thank You! Reference: http://hbase.apache.org Connect with Hadoop Team: hadoop@bloomberg.net
  • 48. © 2018 Bloomberg Finance L.P. All rights reserved. We are hiring! Questions? https://www.bloomberg.com/careers