SlideShare a Scribd company logo
1 of 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

More Related Content

What's hot

Best Practice of Compression/Decompression Codes in Apache Spark with Sophia...
 Best Practice of Compression/Decompression Codes in Apache Spark with Sophia... Best Practice of Compression/Decompression Codes in Apache Spark with Sophia...
Best Practice of Compression/Decompression Codes in Apache Spark with Sophia...
Databricks
 
Spark HBase Connector: Feature Rich and Efficient Access to HBase Through Spa...
Spark HBase Connector: Feature Rich and Efficient Access to HBase Through Spa...Spark HBase Connector: Feature Rich and Efficient Access to HBase Through Spa...
Spark HBase Connector: Feature Rich and Efficient Access to HBase Through Spa...
Databricks
 

What's hot (20)

Cassandra compaction
Cassandra compactionCassandra compaction
Cassandra compaction
 
Bootstrapping state in Apache Flink
Bootstrapping state in Apache FlinkBootstrapping state in Apache Flink
Bootstrapping state in Apache Flink
 
Thrift vs Protocol Buffers vs Avro - Biased Comparison
Thrift vs Protocol Buffers vs Avro - Biased ComparisonThrift vs Protocol Buffers vs Avro - Biased Comparison
Thrift vs Protocol Buffers vs Avro - Biased Comparison
 
Apache HBase Performance Tuning
Apache HBase Performance TuningApache HBase Performance Tuning
Apache HBase Performance Tuning
 
Streaming Data Lakes using Kafka Connect + Apache Hudi | Vinoth Chandar, Apac...
Streaming Data Lakes using Kafka Connect + Apache Hudi | Vinoth Chandar, Apac...Streaming Data Lakes using Kafka Connect + Apache Hudi | Vinoth Chandar, Apac...
Streaming Data Lakes using Kafka Connect + Apache Hudi | Vinoth Chandar, Apac...
 
How to build a streaming Lakehouse with Flink, Kafka, and Hudi
How to build a streaming Lakehouse with Flink, Kafka, and HudiHow to build a streaming Lakehouse with Flink, Kafka, and Hudi
How to build a streaming Lakehouse with Flink, Kafka, and Hudi
 
HBase in Practice
HBase in Practice HBase in Practice
HBase in Practice
 
From my sql to postgresql using kafka+debezium
From my sql to postgresql using kafka+debeziumFrom my sql to postgresql using kafka+debezium
From my sql to postgresql using kafka+debezium
 
Hadoop Overview & Architecture
Hadoop Overview & Architecture  Hadoop Overview & Architecture
Hadoop Overview & Architecture
 
Best Practice of Compression/Decompression Codes in Apache Spark with Sophia...
 Best Practice of Compression/Decompression Codes in Apache Spark with Sophia... Best Practice of Compression/Decompression Codes in Apache Spark with Sophia...
Best Practice of Compression/Decompression Codes in Apache Spark with Sophia...
 
20090713 Hbase Schema Design Case Studies
20090713 Hbase Schema Design Case Studies20090713 Hbase Schema Design Case Studies
20090713 Hbase Schema Design Case Studies
 
Impala presentation
Impala presentationImpala presentation
Impala presentation
 
Benchmark MinHash+LSH algorithm on Spark
Benchmark MinHash+LSH algorithm on SparkBenchmark MinHash+LSH algorithm on Spark
Benchmark MinHash+LSH algorithm on Spark
 
Hive+Tez: A performance deep dive
Hive+Tez: A performance deep diveHive+Tez: A performance deep dive
Hive+Tez: A performance deep dive
 
An Introduction to Apache Hadoop Yarn
An Introduction to Apache Hadoop YarnAn Introduction to Apache Hadoop Yarn
An Introduction to Apache Hadoop Yarn
 
HBaseConEast2016: How yarn timeline service v.2 unlocks 360 degree platform i...
HBaseConEast2016: How yarn timeline service v.2 unlocks 360 degree platform i...HBaseConEast2016: How yarn timeline service v.2 unlocks 360 degree platform i...
HBaseConEast2016: How yarn timeline service v.2 unlocks 360 degree platform i...
 
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
 
Spark HBase Connector: Feature Rich and Efficient Access to HBase Through Spa...
Spark HBase Connector: Feature Rich and Efficient Access to HBase Through Spa...Spark HBase Connector: Feature Rich and Efficient Access to HBase Through Spa...
Spark HBase Connector: Feature Rich and Efficient Access to HBase Through Spa...
 
[EPPG] Oracle to PostgreSQL, Challenges to Opportunity
[EPPG] Oracle to PostgreSQL, Challenges to Opportunity[EPPG] Oracle to PostgreSQL, Challenges to Opportunity
[EPPG] Oracle to PostgreSQL, Challenges to Opportunity
 
RedisConf17- Using Redis at scale @ Twitter
RedisConf17- Using Redis at scale @ TwitterRedisConf17- Using Redis at scale @ Twitter
RedisConf17- Using Redis at scale @ Twitter
 

Similar to 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
 

Similar to 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
 

More from 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
 

More from 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
 

Recently uploaded

%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
masabamasaba
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
VictorSzoltysek
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
mohitmore19
 

Recently uploaded (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
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
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 tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.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
 
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 🔝✔️✔️
 
%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg
%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg
%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg
 
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdfThe Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
 
%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
SHRMPro HRMS Software Solutions Presentation
SHRMPro HRMS Software Solutions PresentationSHRMPro HRMS Software Solutions Presentation
SHRMPro HRMS Software Solutions Presentation
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 

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