SlideShare una empresa de Scribd logo
1 de 28
Descargar para leer sin conexión
1
Who are We?
● Leading Cloud data Platform Team
● Loves distributed Systems, open Source
● Data geek (data stores, stream, analytics etc)
● Pulsar & MySql contributor
● Developer by passion
● Love Distributed Systems, Streaming Platform
● Pulsar Enthusiast
Shivji Jha
SME for Pulsar,
Nutanix
Sourabh Agrawal
Pulsar Ninja,
Nutanix
2
Catalogue
● Quick Intro: Apache Pulsar
● Pulsar Isolation
○ What
○ Why
○ How
● Isolating by clusters
● Isolating brokers
● Isolating bookies
● Demo
3
About Pulsar
Apache Pulsar is a cloud-native, distributed, open-source pub-sub messaging and streaming
platform. Originally developed by Yahoo and contributed to the Apache Software Foundation in
2016
Provides :
● Stateless Brokers
● Horizontally Scalable
● Isolate Read and Writes
● Multi-tenant System
● Geo-Replication
● Active Community Support
4
Multi-tenancy
5
What is Pulsar Isolation ?
● Scale storage and Serving layer independently.
● Can separate resources (brokers & bookies) for specific use cases.
● Scale up/down resources as per need for specific namespaces by keeping rest of the
cluster untouched.
● Localized resource allocation
6
Why Pulsar Isolation ?
● Avoid Sharing resources within teams
○ Prevent unexpected consequences.
● Dedicated resources for a namespace.
● Allocate Localized resource in multi-region setup.
● Scale up/down nodes as per load on a namespace.
● More Secure (Permissions managed at namespace level)
● Easy setup
7
Isolation Categories
● Hard Isolation
○ Different physical Pulsar clusters (or nodes) for your isolation units
■ Failure Domains
■ Anti affinity Groups
■ Broker Isolation using Namespace Isolation Policy
■ Bookie Isolation using Affinity Groups
● Soft Isolation
○ Same Physical clusters but restrictions on tenants / namespaces by configuration
■ Disk Quotas
■ Throttling
8
Isolating by Configuration
9
Soft isolation
● Limit by configurations
○ Namespace:
● encryptionRequired
● Auth_policies
● Backlog_quota
● retention
■ Topic:
● maxProducersPerTopic
● maxConsumersPerTopic
● maxSubscriptionsPerTopic
● Limits by resources (capped per broker):
■ loadBalancerBrokerMaxTopics
■ loadBalancerBrokerOverloadedThresholdPercentage
10
Isolating by Cluster
11
Geo Replication
eu-west-2 eu-west-3
Geo
Replication
On
12
New Hotel company starts operating in London
Expand business to Paris
Enable HA
Isolating Brokers
13
14
https://github.com/apache/pulsar/wiki/PIP-7:-Pulsar-Failure-domain-and-Anti-affinity-namespaces
● Failure Domain
○ Group brokers into failure domains
○ Reduces blast radius
○ Example
■ Fix a bug / patch
■ Upgrade brokers by failure domain
■ Anti affinity of namespaces
Failure Domains
15
https://github.com/apache/pulsar/wiki/PIP-7:-Pulsar-Failure-domain-and-Anti-affinity-namespaces
● Anti affinity Group
○ Group of namespaces that should stay far.
○ Best effort
■ Prefer different failure domain
■ Prefer different broker
Anti affinity Groups
16
What is “Namespace Isolation Policy”?
Namespace Isolation Policy: Internals
min_availability=1
Primary = Broker 1,2
17
Namespace Isolation Policy: Internals
min_availability=1
Primary = Broker 1,2
18
Namespace Isolation Policy: Internals
min_availability=1
Primary = Broker 1,2
19
Namespace Isolation Policy: Internals
min_availability=1
Secondary = Broker 5
Primary = Broker 1,2
20
Namespace Isolation Policy: Setup
Configure Isolation Policy
Unload the namespace to take effect for existing topics in namespaces or restart brokers.
./pulsar-admin ns-isolation-policy set --auto-failover-policy-type min_available
--auto-failover-policy-params min_limit=?,usage_threshold=80 --namespaces <tenant/namespace>
--primary broker-node-1,broker-node2 my-cluster <policy-name> --secondary broker-node-5
./pulsar-admin namespaces unload <tenant/namespace>
./pulsar-admin topics lookup <tenant/namespace/topic>
21
Isolating Bookies
22
Bookie Affinity Groups
23
● Isolate storage at namespace
● Leverage data durability configs in
isolated bookies
● Leverage
ZkIsolatedBookieEnsemblePlacement
Policy
● Scale bookies for namespace
https://streamnative.io/uploads/images/blogs/isolation-3.png
Bookie Isolation using
Affinity Group
Setup Bookie Rack
Bookie Affinity Group
./pulsar-admin bookies set-bookie-rack --bookie 127.0.0.1:3181 --hostname 127.0.0.1:3181
--group group1 --rack rack1
./pulsar-admin namespaces set-bookie-affinity-group <tenant/namespace> --primary-group
<anti-affinity-group-name> --secondary-group <anti-affinity-group-name>
./pulsar-admin namespaces set-bookie-affinity-group public/default --primary-group group1
24
Configure Bookie Group
Configure Bookie Group with secondary
Scaling Up/Down
Broker
● When scaling up brokers, change the isolation groups and add newly added broker as
primary or secondary broker for required namespaces.
● When scaling down, make sure existing isolation groups have enough brokers.
Bookie
● When scaling up bookies, change the bookie affinity group and add newly added bookies as
primary or secondary group for required namespaces.
● When scaling down, make sure existing affinity groups have enough bookies.
25
Demo : Namespace Isolation Policy
26
References
Namespace Isolation: https://pulsar.apache.org/docs/en/administration-isolation/#broker-isolation
RackAware Ensemble Policy:
https://bookkeeper.apache.org/docs/latest/api/javadoc/org/apache/bookkeeper/client/EnsemblePl
acementPolicy.html
Bookie Affinity Group:
https://pulsar.apache.org/docs/en/administration-isolation/#bookie-isolation,
https://github.com/apache/pulsar/pull/3933
Crash course on pulsar :
https://jack-vanlightly.com/blog/2018/10/2/understanding-how-apache-pulsar-works
Soft Isolation:
https://streamnative.io/en/blog/tech/2021-03-02-taking-an-in-depth-look-at-how-to-achieve-isolat
ion-in-pulsar/
27
Questions?
Pulsar Slack
https://apache-pulsar.slack.com/
Pulsar Mail Group:
users@pulsar.apache.org
dev@pulsar.apache.org
LinkedIn :
https://www.linkedin.com/in/sourabhaggrawal/
https://www.linkedin.com/in/shivjijha/
28

Más contenido relacionado

La actualidad más candente

Speed Up Your Apache Cassandra™ Applications: A Practical Guide to Reactive P...
Speed Up Your Apache Cassandra™ Applications: A Practical Guide to Reactive P...Speed Up Your Apache Cassandra™ Applications: A Practical Guide to Reactive P...
Speed Up Your Apache Cassandra™ Applications: A Practical Guide to Reactive P...
Matt Stubbs
 

La actualidad más candente (20)

DBCC 2021 - FLiP Stack for Cloud Data Lakes
DBCC 2021 - FLiP Stack for Cloud Data LakesDBCC 2021 - FLiP Stack for Cloud Data Lakes
DBCC 2021 - FLiP Stack for Cloud Data Lakes
 
Devfest uk & ireland using apache nifi with apache pulsar for fast data on-r...
Devfest uk & ireland  using apache nifi with apache pulsar for fast data on-r...Devfest uk & ireland  using apache nifi with apache pulsar for fast data on-r...
Devfest uk & ireland using apache nifi with apache pulsar for fast data on-r...
 
Data minutes #2 Apache Pulsar with MQTT for Edge Computing Lightning - 2022
Data minutes #2   Apache Pulsar with MQTT for Edge Computing Lightning - 2022Data minutes #2   Apache Pulsar with MQTT for Edge Computing Lightning - 2022
Data minutes #2 Apache Pulsar with MQTT for Edge Computing Lightning - 2022
 
Automation + dev ops summit hail hydrate! from stream to lake
Automation + dev ops summit   hail hydrate! from stream to lakeAutomation + dev ops summit   hail hydrate! from stream to lake
Automation + dev ops summit hail hydrate! from stream to lake
 
Data science online camp using the flipn stack for edge ai (flink, nifi, pu...
Data science online camp   using the flipn stack for edge ai (flink, nifi, pu...Data science online camp   using the flipn stack for edge ai (flink, nifi, pu...
Data science online camp using the flipn stack for edge ai (flink, nifi, pu...
 
Osacon 2021 hello hydrate! from stream to clickhouse with apache pulsar and...
Osacon 2021   hello hydrate! from stream to clickhouse with apache pulsar and...Osacon 2021   hello hydrate! from stream to clickhouse with apache pulsar and...
Osacon 2021 hello hydrate! from stream to clickhouse with apache pulsar and...
 
Music city data Hail Hydrate! from stream to lake
Music city data Hail Hydrate! from stream to lakeMusic city data Hail Hydrate! from stream to lake
Music city data Hail Hydrate! from stream to lake
 
Big mountain data and dev conference apache pulsar with mqtt for edge compu...
Big mountain data and dev conference   apache pulsar with mqtt for edge compu...Big mountain data and dev conference   apache pulsar with mqtt for edge compu...
Big mountain data and dev conference apache pulsar with mqtt for edge compu...
 
fluentd -- the missing log collector
fluentd -- the missing log collectorfluentd -- the missing log collector
fluentd -- the missing log collector
 
Cloud lunch and learn real-time streaming in azure
Cloud lunch and learn real-time streaming in azureCloud lunch and learn real-time streaming in azure
Cloud lunch and learn real-time streaming in azure
 
Hail hydrate! from stream to lake using open source
Hail hydrate! from stream to lake using open sourceHail hydrate! from stream to lake using open source
Hail hydrate! from stream to lake using open source
 
Python web conference 2022 apache pulsar development 101 with python (f li-...
Python web conference 2022   apache pulsar development 101 with python (f li-...Python web conference 2022   apache pulsar development 101 with python (f li-...
Python web conference 2022 apache pulsar development 101 with python (f li-...
 
Architecting for Scale
Architecting for ScaleArchitecting for Scale
Architecting for Scale
 
Speed Up Your Apache Cassandra™ Applications: A Practical Guide to Reactive P...
Speed Up Your Apache Cassandra™ Applications: A Practical Guide to Reactive P...Speed Up Your Apache Cassandra™ Applications: A Practical Guide to Reactive P...
Speed Up Your Apache Cassandra™ Applications: A Practical Guide to Reactive P...
 
Spark optimization
Spark optimizationSpark optimization
Spark optimization
 
Using FLiP with influxdb for edgeai iot at scale 2022
Using FLiP with influxdb for edgeai iot at scale 2022Using FLiP with influxdb for edgeai iot at scale 2022
Using FLiP with influxdb for edgeai iot at scale 2022
 
Interactive Analytics on Pulsar with Pulsar SQL - Pulsar Virtual Summit Europ...
Interactive Analytics on Pulsar with Pulsar SQL - Pulsar Virtual Summit Europ...Interactive Analytics on Pulsar with Pulsar SQL - Pulsar Virtual Summit Europ...
Interactive Analytics on Pulsar with Pulsar SQL - Pulsar Virtual Summit Europ...
 
Apache Pulsar at Yahoo! Japan
Apache Pulsar at Yahoo! JapanApache Pulsar at Yahoo! Japan
Apache Pulsar at Yahoo! Japan
 
Five years of operating a large scale globally replicated Pulsar installation...
Five years of operating a large scale globally replicated Pulsar installation...Five years of operating a large scale globally replicated Pulsar installation...
Five years of operating a large scale globally replicated Pulsar installation...
 
Introduction to Apache Kafka- Part 1
Introduction to Apache Kafka- Part 1Introduction to Apache Kafka- Part 1
Introduction to Apache Kafka- Part 1
 

Similar a Designing Pulsar Clients to Run in Isolation - Puslar Summit Asia 2021

Security and Multi-Tenancy with Apache Pulsar in Yahoo! (Verizon Media) - Pul...
Security and Multi-Tenancy with Apache Pulsar in Yahoo! (Verizon Media) - Pul...Security and Multi-Tenancy with Apache Pulsar in Yahoo! (Verizon Media) - Pul...
Security and Multi-Tenancy with Apache Pulsar in Yahoo! (Verizon Media) - Pul...
StreamNative
 
Open stack in_production__the_good,_the_bad_&_the_ugly
Open stack in_production__the_good,_the_bad_&_the_uglyOpen stack in_production__the_good,_the_bad_&_the_ugly
Open stack in_production__the_good,_the_bad_&_the_ugly
OpenStack Foundation
 
Contributing within Odoo Community Association Projects
Contributing within Odoo Community Association ProjectsContributing within Odoo Community Association Projects
Contributing within Odoo Community Association Projects
afayolle
 
Princeton Dec 2022 Meetup_ NiFi + Flink + Pulsar
Princeton Dec 2022 Meetup_ NiFi + Flink + PulsarPrinceton Dec 2022 Meetup_ NiFi + Flink + Pulsar
Princeton Dec 2022 Meetup_ NiFi + Flink + Pulsar
Timothy Spann
 
NetflixOSS meetup lightning talks and roadmap
NetflixOSS meetup lightning talks and roadmapNetflixOSS meetup lightning talks and roadmap
NetflixOSS meetup lightning talks and roadmap
Ruslan Meshenberg
 
(Current22) Let's Monitor The Conditions at the Conference
(Current22) Let's Monitor The Conditions at the Conference(Current22) Let's Monitor The Conditions at the Conference
(Current22) Let's Monitor The Conditions at the Conference
Timothy Spann
 

Similar a Designing Pulsar Clients to Run in Isolation - Puslar Summit Asia 2021 (20)

Production Plone on OpenStack Cloud
Production Plone on OpenStack CloudProduction Plone on OpenStack Cloud
Production Plone on OpenStack Cloud
 
Security and Multi-Tenancy with Apache Pulsar in Yahoo! (Verizon Media) - Pul...
Security and Multi-Tenancy with Apache Pulsar in Yahoo! (Verizon Media) - Pul...Security and Multi-Tenancy with Apache Pulsar in Yahoo! (Verizon Media) - Pul...
Security and Multi-Tenancy with Apache Pulsar in Yahoo! (Verizon Media) - Pul...
 
Manila project onboarding - OpenStack Summit/Forum Sydney 2017
Manila project onboarding - OpenStack Summit/Forum Sydney 2017Manila project onboarding - OpenStack Summit/Forum Sydney 2017
Manila project onboarding - OpenStack Summit/Forum Sydney 2017
 
Open stack in_production__the_good,_the_bad_&_the_ugly
Open stack in_production__the_good,_the_bad_&_the_uglyOpen stack in_production__the_good,_the_bad_&_the_ugly
Open stack in_production__the_good,_the_bad_&_the_ugly
 
OpenStack in Production
OpenStack in ProductionOpenStack in Production
OpenStack in Production
 
Contributing within OCA projects
Contributing within OCA projectsContributing within OCA projects
Contributing within OCA projects
 
Contributing within Odoo Community Association Projects
Contributing within Odoo Community Association ProjectsContributing within Odoo Community Association Projects
Contributing within Odoo Community Association Projects
 
BlackStor - World's fastest & most reliable Cloud Native Software Defined Sto...
BlackStor - World's fastest & most reliable Cloud Native Software Defined Sto...BlackStor - World's fastest & most reliable Cloud Native Software Defined Sto...
BlackStor - World's fastest & most reliable Cloud Native Software Defined Sto...
 
Building a Messaging Solutions for OVHcloud with Apache Pulsar_Pierre Zemb
Building a Messaging Solutions for OVHcloud with Apache Pulsar_Pierre ZembBuilding a Messaging Solutions for OVHcloud with Apache Pulsar_Pierre Zemb
Building a Messaging Solutions for OVHcloud with Apache Pulsar_Pierre Zemb
 
Manila Project Onboarding - Denver Open Infrastructure Summit - May 2019
Manila Project Onboarding - Denver Open Infrastructure Summit - May 2019Manila Project Onboarding - Denver Open Infrastructure Summit - May 2019
Manila Project Onboarding - Denver Open Infrastructure Summit - May 2019
 
SM16 - Can i move my stuff to openstack
SM16 - Can i move my stuff to openstackSM16 - Can i move my stuff to openstack
SM16 - Can i move my stuff to openstack
 
Caching
CachingCaching
Caching
 
Princeton Dec 2022 Meetup_ NiFi + Flink + Pulsar
Princeton Dec 2022 Meetup_ NiFi + Flink + PulsarPrinceton Dec 2022 Meetup_ NiFi + Flink + Pulsar
Princeton Dec 2022 Meetup_ NiFi + Flink + Pulsar
 
HKG18-411 - Introduction to OpenAMP which is an open source solution for hete...
HKG18-411 - Introduction to OpenAMP which is an open source solution for hete...HKG18-411 - Introduction to OpenAMP which is an open source solution for hete...
HKG18-411 - Introduction to OpenAMP which is an open source solution for hete...
 
NetflixOSS meetup lightning talks and roadmap
NetflixOSS meetup lightning talks and roadmapNetflixOSS meetup lightning talks and roadmap
NetflixOSS meetup lightning talks and roadmap
 
Let’s Monitor Conditions at the Conference With Timothy Spann & David Kjerrum...
Let’s Monitor Conditions at the Conference With Timothy Spann & David Kjerrum...Let’s Monitor Conditions at the Conference With Timothy Spann & David Kjerrum...
Let’s Monitor Conditions at the Conference With Timothy Spann & David Kjerrum...
 
(Current22) Let's Monitor The Conditions at the Conference
(Current22) Let's Monitor The Conditions at the Conference(Current22) Let's Monitor The Conditions at the Conference
(Current22) Let's Monitor The Conditions at the Conference
 
It's in the cloud
It's in the cloudIt's in the cloud
It's in the cloud
 
From Zero to Hero - Nexinto
From Zero to Hero - NexintoFrom Zero to Hero - Nexinto
From Zero to Hero - Nexinto
 
Apache Kafka - Free Friday
Apache Kafka - Free FridayApache Kafka - Free Friday
Apache Kafka - Free Friday
 

Más de StreamNative

Pulsar's Journey in Yahoo!: On-prem, Cloud and Hybrid - Pulsar Summit SF 2022
Pulsar's Journey in Yahoo!: On-prem, Cloud and Hybrid - Pulsar Summit SF 2022Pulsar's Journey in Yahoo!: On-prem, Cloud and Hybrid - Pulsar Summit SF 2022
Pulsar's Journey in Yahoo!: On-prem, Cloud and Hybrid - Pulsar Summit SF 2022
StreamNative
 

Más de StreamNative (20)

Is Using KoP (Kafka-on-Pulsar) a Good Idea? - Pulsar Summit SF 2022
Is Using KoP (Kafka-on-Pulsar) a Good Idea? - Pulsar Summit SF 2022Is Using KoP (Kafka-on-Pulsar) a Good Idea? - Pulsar Summit SF 2022
Is Using KoP (Kafka-on-Pulsar) a Good Idea? - Pulsar Summit SF 2022
 
Building an Asynchronous Application Framework with Python and Pulsar - Pulsa...
Building an Asynchronous Application Framework with Python and Pulsar - Pulsa...Building an Asynchronous Application Framework with Python and Pulsar - Pulsa...
Building an Asynchronous Application Framework with Python and Pulsar - Pulsa...
 
Blue-green deploys with Pulsar & Envoy in an event-driven microservice ecosys...
Blue-green deploys with Pulsar & Envoy in an event-driven microservice ecosys...Blue-green deploys with Pulsar & Envoy in an event-driven microservice ecosys...
Blue-green deploys with Pulsar & Envoy in an event-driven microservice ecosys...
 
Distributed Database Design Decisions to Support High Performance Event Strea...
Distributed Database Design Decisions to Support High Performance Event Strea...Distributed Database Design Decisions to Support High Performance Event Strea...
Distributed Database Design Decisions to Support High Performance Event Strea...
 
Simplify Pulsar Functions Development with SQL - Pulsar Summit SF 2022
Simplify Pulsar Functions Development with SQL - Pulsar Summit SF 2022Simplify Pulsar Functions Development with SQL - Pulsar Summit SF 2022
Simplify Pulsar Functions Development with SQL - Pulsar Summit SF 2022
 
Towards a ZooKeeper-less Pulsar, etcd, etcd, etcd. - Pulsar Summit SF 2022
Towards a ZooKeeper-less Pulsar, etcd, etcd, etcd. - Pulsar Summit SF 2022Towards a ZooKeeper-less Pulsar, etcd, etcd, etcd. - Pulsar Summit SF 2022
Towards a ZooKeeper-less Pulsar, etcd, etcd, etcd. - Pulsar Summit SF 2022
 
Validating Apache Pulsar’s Behavior under Failure Conditions - Pulsar Summit ...
Validating Apache Pulsar’s Behavior under Failure Conditions - Pulsar Summit ...Validating Apache Pulsar’s Behavior under Failure Conditions - Pulsar Summit ...
Validating Apache Pulsar’s Behavior under Failure Conditions - Pulsar Summit ...
 
Cross the Streams! Creating Streaming Data Pipelines with Apache Flink + Apac...
Cross the Streams! Creating Streaming Data Pipelines with Apache Flink + Apac...Cross the Streams! Creating Streaming Data Pipelines with Apache Flink + Apac...
Cross the Streams! Creating Streaming Data Pipelines with Apache Flink + Apac...
 
Message Redelivery: An Unexpected Journey - Pulsar Summit SF 2022
Message Redelivery: An Unexpected Journey - Pulsar Summit SF 2022Message Redelivery: An Unexpected Journey - Pulsar Summit SF 2022
Message Redelivery: An Unexpected Journey - Pulsar Summit SF 2022
 
Unlocking the Power of Lakehouse Architectures with Apache Pulsar and Apache ...
Unlocking the Power of Lakehouse Architectures with Apache Pulsar and Apache ...Unlocking the Power of Lakehouse Architectures with Apache Pulsar and Apache ...
Unlocking the Power of Lakehouse Architectures with Apache Pulsar and Apache ...
 
Understanding Broker Load Balancing - Pulsar Summit SF 2022
Understanding Broker Load Balancing - Pulsar Summit SF 2022Understanding Broker Load Balancing - Pulsar Summit SF 2022
Understanding Broker Load Balancing - Pulsar Summit SF 2022
 
Building an Asynchronous Application Framework with Python and Pulsar - Pulsa...
Building an Asynchronous Application Framework with Python and Pulsar - Pulsa...Building an Asynchronous Application Framework with Python and Pulsar - Pulsa...
Building an Asynchronous Application Framework with Python and Pulsar - Pulsa...
 
Pulsar's Journey in Yahoo!: On-prem, Cloud and Hybrid - Pulsar Summit SF 2022
Pulsar's Journey in Yahoo!: On-prem, Cloud and Hybrid - Pulsar Summit SF 2022Pulsar's Journey in Yahoo!: On-prem, Cloud and Hybrid - Pulsar Summit SF 2022
Pulsar's Journey in Yahoo!: On-prem, Cloud and Hybrid - Pulsar Summit SF 2022
 
Event-Driven Applications Done Right - Pulsar Summit SF 2022
Event-Driven Applications Done Right - Pulsar Summit SF 2022Event-Driven Applications Done Right - Pulsar Summit SF 2022
Event-Driven Applications Done Right - Pulsar Summit SF 2022
 
Pulsar @ Scale. 200M RPM and 1K instances - Pulsar Summit SF 2022
Pulsar @ Scale. 200M RPM and 1K instances - Pulsar Summit SF 2022Pulsar @ Scale. 200M RPM and 1K instances - Pulsar Summit SF 2022
Pulsar @ Scale. 200M RPM and 1K instances - Pulsar Summit SF 2022
 
Data Democracy: Journey to User-Facing Analytics - Pulsar Summit SF 2022
Data Democracy: Journey to User-Facing Analytics - Pulsar Summit SF 2022Data Democracy: Journey to User-Facing Analytics - Pulsar Summit SF 2022
Data Democracy: Journey to User-Facing Analytics - Pulsar Summit SF 2022
 
Beam + Pulsar: Powerful Stream Processing at Scale - Pulsar Summit SF 2022
Beam + Pulsar: Powerful Stream Processing at Scale - Pulsar Summit SF 2022Beam + Pulsar: Powerful Stream Processing at Scale - Pulsar Summit SF 2022
Beam + Pulsar: Powerful Stream Processing at Scale - Pulsar Summit SF 2022
 
Welcome and Opening Remarks - Pulsar Summit SF 2022
Welcome and Opening Remarks - Pulsar Summit SF 2022Welcome and Opening Remarks - Pulsar Summit SF 2022
Welcome and Opening Remarks - Pulsar Summit SF 2022
 
Log System As Backbone – How We Built the World’s Most Advanced Vector Databa...
Log System As Backbone – How We Built the World’s Most Advanced Vector Databa...Log System As Backbone – How We Built the World’s Most Advanced Vector Databa...
Log System As Backbone – How We Built the World’s Most Advanced Vector Databa...
 
MoP(MQTT on Pulsar) - a Powerful Tool for Apache Pulsar in IoT - Pulsar Summi...
MoP(MQTT on Pulsar) - a Powerful Tool for Apache Pulsar in IoT - Pulsar Summi...MoP(MQTT on Pulsar) - a Powerful Tool for Apache Pulsar in IoT - Pulsar Summi...
MoP(MQTT on Pulsar) - a Powerful Tool for Apache Pulsar in IoT - Pulsar Summi...
 

Último

一比一原版田纳西大学毕业证如何办理
一比一原版田纳西大学毕业证如何办理一比一原版田纳西大学毕业证如何办理
一比一原版田纳西大学毕业证如何办理
F
 
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样
ayvbos
 
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
ydyuyu
 
Abu Dhabi Escorts Service 0508644382 Escorts in Abu Dhabi
Abu Dhabi Escorts Service 0508644382 Escorts in Abu DhabiAbu Dhabi Escorts Service 0508644382 Escorts in Abu Dhabi
Abu Dhabi Escorts Service 0508644382 Escorts in Abu Dhabi
Monica Sydney
 
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
ydyuyu
 
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdfpdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
JOHNBEBONYAP1
 
Russian Escort Abu Dhabi 0503464457 Abu DHabi Escorts
Russian Escort Abu Dhabi 0503464457 Abu DHabi EscortsRussian Escort Abu Dhabi 0503464457 Abu DHabi Escorts
Russian Escort Abu Dhabi 0503464457 Abu DHabi Escorts
Monica Sydney
 
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
ydyuyu
 
一比一原版奥兹学院毕业证如何办理
一比一原版奥兹学院毕业证如何办理一比一原版奥兹学院毕业证如何办理
一比一原版奥兹学院毕业证如何办理
F
 
Indian Escort in Abu DHabi 0508644382 Abu Dhabi Escorts
Indian Escort in Abu DHabi 0508644382 Abu Dhabi EscortsIndian Escort in Abu DHabi 0508644382 Abu Dhabi Escorts
Indian Escort in Abu DHabi 0508644382 Abu Dhabi Escorts
Monica Sydney
 

Último (20)

一比一原版田纳西大学毕业证如何办理
一比一原版田纳西大学毕业证如何办理一比一原版田纳西大学毕业证如何办理
一比一原版田纳西大学毕业证如何办理
 
Trump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts SweatshirtTrump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts Sweatshirt
 
Vip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac Room
Vip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac RoomVip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac Room
Vip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac Room
 
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
 
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样
 
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
 
Abu Dhabi Escorts Service 0508644382 Escorts in Abu Dhabi
Abu Dhabi Escorts Service 0508644382 Escorts in Abu DhabiAbu Dhabi Escorts Service 0508644382 Escorts in Abu Dhabi
Abu Dhabi Escorts Service 0508644382 Escorts in Abu Dhabi
 
Ballia Escorts Service Girl ^ 9332606886, WhatsApp Anytime Ballia
Ballia Escorts Service Girl ^ 9332606886, WhatsApp Anytime BalliaBallia Escorts Service Girl ^ 9332606886, WhatsApp Anytime Ballia
Ballia Escorts Service Girl ^ 9332606886, WhatsApp Anytime Ballia
 
best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...
best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...
best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...
 
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
 
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdfpdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
 
Meaning of On page SEO & its process in detail.
Meaning of On page SEO & its process in detail.Meaning of On page SEO & its process in detail.
Meaning of On page SEO & its process in detail.
 
20240508 QFM014 Elixir Reading List April 2024.pdf
20240508 QFM014 Elixir Reading List April 2024.pdf20240508 QFM014 Elixir Reading List April 2024.pdf
20240508 QFM014 Elixir Reading List April 2024.pdf
 
Russian Escort Abu Dhabi 0503464457 Abu DHabi Escorts
Russian Escort Abu Dhabi 0503464457 Abu DHabi EscortsRussian Escort Abu Dhabi 0503464457 Abu DHabi Escorts
Russian Escort Abu Dhabi 0503464457 Abu DHabi Escorts
 
Local Call Girls in Seoni 9332606886 HOT & SEXY Models beautiful and charmin...
Local Call Girls in Seoni  9332606886 HOT & SEXY Models beautiful and charmin...Local Call Girls in Seoni  9332606886 HOT & SEXY Models beautiful and charmin...
Local Call Girls in Seoni 9332606886 HOT & SEXY Models beautiful and charmin...
 
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
 
一比一原版奥兹学院毕业证如何办理
一比一原版奥兹学院毕业证如何办理一比一原版奥兹学院毕业证如何办理
一比一原版奥兹学院毕业证如何办理
 
Call girls Service in Ajman 0505086370 Ajman call girls
Call girls Service in Ajman 0505086370 Ajman call girlsCall girls Service in Ajman 0505086370 Ajman call girls
Call girls Service in Ajman 0505086370 Ajman call girls
 
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
 
Indian Escort in Abu DHabi 0508644382 Abu Dhabi Escorts
Indian Escort in Abu DHabi 0508644382 Abu Dhabi EscortsIndian Escort in Abu DHabi 0508644382 Abu Dhabi Escorts
Indian Escort in Abu DHabi 0508644382 Abu Dhabi Escorts
 

Designing Pulsar Clients to Run in Isolation - Puslar Summit Asia 2021

  • 1. 1
  • 2. Who are We? ● Leading Cloud data Platform Team ● Loves distributed Systems, open Source ● Data geek (data stores, stream, analytics etc) ● Pulsar & MySql contributor ● Developer by passion ● Love Distributed Systems, Streaming Platform ● Pulsar Enthusiast Shivji Jha SME for Pulsar, Nutanix Sourabh Agrawal Pulsar Ninja, Nutanix 2
  • 3. Catalogue ● Quick Intro: Apache Pulsar ● Pulsar Isolation ○ What ○ Why ○ How ● Isolating by clusters ● Isolating brokers ● Isolating bookies ● Demo 3
  • 4. About Pulsar Apache Pulsar is a cloud-native, distributed, open-source pub-sub messaging and streaming platform. Originally developed by Yahoo and contributed to the Apache Software Foundation in 2016 Provides : ● Stateless Brokers ● Horizontally Scalable ● Isolate Read and Writes ● Multi-tenant System ● Geo-Replication ● Active Community Support 4
  • 6. What is Pulsar Isolation ? ● Scale storage and Serving layer independently. ● Can separate resources (brokers & bookies) for specific use cases. ● Scale up/down resources as per need for specific namespaces by keeping rest of the cluster untouched. ● Localized resource allocation 6
  • 7. Why Pulsar Isolation ? ● Avoid Sharing resources within teams ○ Prevent unexpected consequences. ● Dedicated resources for a namespace. ● Allocate Localized resource in multi-region setup. ● Scale up/down nodes as per load on a namespace. ● More Secure (Permissions managed at namespace level) ● Easy setup 7
  • 8. Isolation Categories ● Hard Isolation ○ Different physical Pulsar clusters (or nodes) for your isolation units ■ Failure Domains ■ Anti affinity Groups ■ Broker Isolation using Namespace Isolation Policy ■ Bookie Isolation using Affinity Groups ● Soft Isolation ○ Same Physical clusters but restrictions on tenants / namespaces by configuration ■ Disk Quotas ■ Throttling 8
  • 10. Soft isolation ● Limit by configurations ○ Namespace: ● encryptionRequired ● Auth_policies ● Backlog_quota ● retention ■ Topic: ● maxProducersPerTopic ● maxConsumersPerTopic ● maxSubscriptionsPerTopic ● Limits by resources (capped per broker): ■ loadBalancerBrokerMaxTopics ■ loadBalancerBrokerOverloadedThresholdPercentage 10
  • 12. Geo Replication eu-west-2 eu-west-3 Geo Replication On 12 New Hotel company starts operating in London Expand business to Paris Enable HA
  • 14. 14 https://github.com/apache/pulsar/wiki/PIP-7:-Pulsar-Failure-domain-and-Anti-affinity-namespaces ● Failure Domain ○ Group brokers into failure domains ○ Reduces blast radius ○ Example ■ Fix a bug / patch ■ Upgrade brokers by failure domain ■ Anti affinity of namespaces Failure Domains
  • 15. 15 https://github.com/apache/pulsar/wiki/PIP-7:-Pulsar-Failure-domain-and-Anti-affinity-namespaces ● Anti affinity Group ○ Group of namespaces that should stay far. ○ Best effort ■ Prefer different failure domain ■ Prefer different broker Anti affinity Groups
  • 16. 16 What is “Namespace Isolation Policy”?
  • 17. Namespace Isolation Policy: Internals min_availability=1 Primary = Broker 1,2 17
  • 18. Namespace Isolation Policy: Internals min_availability=1 Primary = Broker 1,2 18
  • 19. Namespace Isolation Policy: Internals min_availability=1 Primary = Broker 1,2 19
  • 20. Namespace Isolation Policy: Internals min_availability=1 Secondary = Broker 5 Primary = Broker 1,2 20
  • 21. Namespace Isolation Policy: Setup Configure Isolation Policy Unload the namespace to take effect for existing topics in namespaces or restart brokers. ./pulsar-admin ns-isolation-policy set --auto-failover-policy-type min_available --auto-failover-policy-params min_limit=?,usage_threshold=80 --namespaces <tenant/namespace> --primary broker-node-1,broker-node2 my-cluster <policy-name> --secondary broker-node-5 ./pulsar-admin namespaces unload <tenant/namespace> ./pulsar-admin topics lookup <tenant/namespace/topic> 21
  • 23. Bookie Affinity Groups 23 ● Isolate storage at namespace ● Leverage data durability configs in isolated bookies ● Leverage ZkIsolatedBookieEnsemblePlacement Policy ● Scale bookies for namespace https://streamnative.io/uploads/images/blogs/isolation-3.png
  • 24. Bookie Isolation using Affinity Group Setup Bookie Rack Bookie Affinity Group ./pulsar-admin bookies set-bookie-rack --bookie 127.0.0.1:3181 --hostname 127.0.0.1:3181 --group group1 --rack rack1 ./pulsar-admin namespaces set-bookie-affinity-group <tenant/namespace> --primary-group <anti-affinity-group-name> --secondary-group <anti-affinity-group-name> ./pulsar-admin namespaces set-bookie-affinity-group public/default --primary-group group1 24 Configure Bookie Group Configure Bookie Group with secondary
  • 25. Scaling Up/Down Broker ● When scaling up brokers, change the isolation groups and add newly added broker as primary or secondary broker for required namespaces. ● When scaling down, make sure existing isolation groups have enough brokers. Bookie ● When scaling up bookies, change the bookie affinity group and add newly added bookies as primary or secondary group for required namespaces. ● When scaling down, make sure existing affinity groups have enough bookies. 25
  • 26. Demo : Namespace Isolation Policy 26
  • 27. References Namespace Isolation: https://pulsar.apache.org/docs/en/administration-isolation/#broker-isolation RackAware Ensemble Policy: https://bookkeeper.apache.org/docs/latest/api/javadoc/org/apache/bookkeeper/client/EnsemblePl acementPolicy.html Bookie Affinity Group: https://pulsar.apache.org/docs/en/administration-isolation/#bookie-isolation, https://github.com/apache/pulsar/pull/3933 Crash course on pulsar : https://jack-vanlightly.com/blog/2018/10/2/understanding-how-apache-pulsar-works Soft Isolation: https://streamnative.io/en/blog/tech/2021-03-02-taking-an-in-depth-look-at-how-to-achieve-isolat ion-in-pulsar/ 27
  • 28. Questions? Pulsar Slack https://apache-pulsar.slack.com/ Pulsar Mail Group: users@pulsar.apache.org dev@pulsar.apache.org LinkedIn : https://www.linkedin.com/in/sourabhaggrawal/ https://www.linkedin.com/in/shivjijha/ 28