SlideShare ist ein Scribd-Unternehmen logo
1 von 27
Downloaden Sie, um offline zu lesen
Confidential and proprietary materials for authorized Verizon personnel and outside agencies only. Use, disclosure or
distribution of this material is not permitted to any unauthorized persons or third parties except by written agreement.
Apache Pulsar
Multi-tenancy and Security
June 17, 2021
Rajan Dhabalia rdhabalia@verizonmedia.com
Ludwig Pummer ludwig@verizonmedia.com
1
Speakers
2
Rajan Dhabalia
Principal Software Engineer, Verizon Media
Ludwig Pummer
Principal Production Engineer, Verizon Media
Agenda
● Pulsar in Yahoo/Verizon Media
● Multi tenancy
● Security
● SNI routing and proxy support
● Future
● QA
3
Pulsar journey in Yahoo
● Developed as a hosted pub-sub service within Yahoo/VMG
○ open-sourced in 2016
● Global deployment
○ 6 DC (Asia, Europe, US)
○ full mesh replication
● Mission critical use cases
○ Serving applications
○ Lower latency bus for use by other low latency services
○ Write availability
4
● Pulsar scale and storage evolution talk
https://pulsar-summit.org/en/event/virtual-conference-2020/sessions/pulsar-storage-on-bookkeepe
r-seamless-evolution
● Pulsar growth since 2015
○ 120+ tenants and 15M rps
○ Storage evolution : HDD, SDD, NVMe, PMEM
○ On-prem, public-cloud and cross org integration
● Scale but what about multi-tenancy?
Scale & Multi-Tenancy
5
6
Secured multi-tenant system with Apache Pulsar
Multi-tenancy & Security Requirement
7
Multi-tenancy
Tenant and Namespace
IO isolation
Quota and Throttling
Broker and Bookie isolation
Anti-affinity group
Security
Authentication & Authorization
Encryption in transit
Encryption at rest
Pulsar proxy
Support ATS, HAProxy, Nginx
Multi-tenancy
8
Tenant
● Highest level of provisioning
● Unit of administration
● Managed by Pulsar
administrators
● Usually one team
9
Tenant and Namespace
Namespace
● Middle level of provisioning
● Unit of data policy
● Managed by Pulsar
administrators and/or Tenants
● Usually one application/use
case
persistent://tenant/namespace/topic
1. Portal find User to Team mapping
2. User creates or modifies tenant
○ Tenant name, Admin Authorization Principals
○ Clusters, WPS & RPS Estimates
○ Jira project, Contact Info, Documentation Link
3. Portal reviews capacity & calls Admin API to manage tenant
○ Jira ticket for Pulsar operator if needed
10
Self-Service Tenant Management
11
IO Isolation
Writer Reader
Journal Data File
Data Device
Journal Device
Write Reads (cold)
Storage Quota
● Tenant-controlled
● Namespace-level and
Topic-level
● Storage Limit
● Policy
Throttling
● Pulsar Administrator-controlled
● Namespace-level
● Publish Rate (broker)
● Dispatch Rate
● Replicator Dispatch Rate
● Max
○ Producers
○ Subscriptions
○ Consumers
○ Unacked Messages
12
Quota & Throttling
Broker Isolation
● Regex of Namespaces to
Regex of Brokers/IP Range
● Primary and Secondary broker
Regexes
13
Broker Isolation
Why
● High Profile/Reserved capacity
● Misbehaving tenants
● Debugging
bin/pulsar-admin ns-isolation-policy set 
--auto-failover-policy-type min_available 
--auto-failover-policy-params min_limit=5,usage_threshold=80 
--namespaces ‘my-tenant/.*’ 
--primary ‘broker-mytenant[0-9]+.mydomain’ --secondary
‘spare[0-9]+.mydomain’ my-cluster policy-name
Bookie Isolation
● Bookies to “Affinity Group”
● Namespace(s) to
Primary/Secondary Affinity
Group
● Rack-Aware within group
14
Bookie Isolation
Why
● SLA
● High Profile/Reserved capacity
bin/pulsar-admin bookies set-bookie-rack -b 1.1.1.1:3181 
-g group-bookie1 --hostname bookie1.mydomain -r /default-rack
...
bin/pulsar-admin namespaces set-bookie-affinity-group 
my-tenant/my-namespace1 --primary-group group-bookie1
● Common unit of failure
for multiple brokers
15
Failure Domain
bin/pulsar-admin clusters 
create-failure-domain 
cluster-name 
--domain-name domain-1 
--broker-list 
broker-1,broker-2
Broker-1
Broker-2
Domain-1
Broker-3
Broker-4
Domain-2
Namespace-1
Namespace-2
Namespace-3
Namespace-4
1
2
3
4
Loadbalancer: Namespace
assignment sequence
Anti-affinity-namespaces: “Namespace-X”
● Assign Namespaces to
Anti-Affinity Group
● Changes Load Balancer
Behavior
16
Anti-affinity group
bin/pulsar-admin namespaces
set-anti-affinity-group
tenant/namespace1 --group
tenant-aag-a
bin/pulsar-admin namespaces
set-anti-affinity-group
tenant/namespace2 --group
tenant-aag-a
Broker-1
Broker-2
Domain-1
Broker-3
Broker-4
Domain-2
Namespace-1
Namespace-2
Namespace-3
Namespace-4
1
2
3
4
Loadbalancer: Namespace
assignment sequence
Anti-affinity-namespaces: “Namespace-X”
Security
17
● Authentication
○ TLS Authentication
○ Athenz
○ Kerberos
○ JSON Web Token Authentication
○ Pluggable authentication provider
● Authorization
○ Pluggable authorization provider
○ Default authorization provider on metadata service
18
Authentication & Authorization
19
Encryption over the wire
PulsarClient client = PulsarClient.builder()
.serviceUrl("pulsar+ssl://pulsar-broler:6651/")
.tlsTrustCertsFilePath("/ca.cert.pem")
.authentication(AUTH, "tlsCertFile:/cert.pem,"+"tlsKeyFile:/key.pem")
.enableTlsHostnameVerification(true)
.build();
Producer creation
Producer producer = pulsarClient.newProducer()
.topic(
"persistent://my-tenant/my-ns/my-topic"
)
.addEncryptionKey("myappkey")
.cryptoKeyReader(new MyCryptoKeyReader())
.create();
20
Encryption at rest
Consumer creation
Consumer consumer = pulsarClient.newConsumer()
.topic(
"persistent://my-tenant/my-ns/my-topic"
)
.subscriptionName(
"my-subscriber-name"
)
.cryptoKeyReader(new MyCryptoKeyReader())
.subscribe();
● Proxy for hybrid could application
● Gateway in a cloud environment or on
Kubernetes
21
Pulsar Proxy: Public cloud access
Proxy Configuration
brokerServiceURLTls=pulsar+ssl://brokers.example.com:6651
brokerWebServiceURLTls=https://brokers.example.com:8443
● Proxy server creates a TLS tunnel between remote client and server
● The goal is to enable external clients to connect to internal services and do their
own client certificate verification, possibly because distribution of private keys to
the edge Traffic Server instances is too difficult or too risky.
22
Support Layer-4 SNI Routing
23
Pulsar client: SNI Routing
PulsarClient client = PulsarClient.builder()
.serviceUrl("pulsar+ssl://pulsar-broker:6651/")
.enableTls(true).tlsTrustCertsFilePath("/ca.cert.pem")
.proxyServiceUrl(proxyUrl, ProxyProtocol.SNI)
.authentication(AUTH, "tlsCertFile:/cert.pem,"+"tlsKeyFile:/key.pem")
.build();
24
Cross Organization geo-replication
pulsar-admin clusters create orgB-cluster 
--broker-url-secure pulsar+ssl:// orgB-broker-vip:6651
 --proxy-protocol SNI 
--proxy-url pulsar+ssl:// orgA-proxy:443
pulsar-admin clusters create orgA-cluster 
--broker-url-secure pulsar+ssl:// orgA-broker-vip:6651
 --proxy-protocol SNI 
--proxy-url pulsar+ssl:// orgB-proxy:443
For more info: PIP-60:
https://github.com/apache/pulsar/wiki/PIP-60%3A-Support-Proxy-server-with-SNI-routing
Future Roadmap
● Tenant based broker virtualization
○ Container based brokers on BookKeeper service
● Hybrid cloud deployment with geo-replication
25
Questions?
26
Thank you
Rajan Dhabalia rdhabalia@verizonmedia.com
Ludwig Pummer ludwig@verizonmedia.com

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (20)

Xdp and ebpf_maps
Xdp and ebpf_mapsXdp and ebpf_maps
Xdp and ebpf_maps
 
The Apache Spark File Format Ecosystem
The Apache Spark File Format EcosystemThe Apache Spark File Format Ecosystem
The Apache Spark File Format Ecosystem
 
Node Labels in YARN
Node Labels in YARNNode Labels in YARN
Node Labels in YARN
 
New Features for Multitenant in Oracle Database 21c
New Features for Multitenant in Oracle Database 21cNew Features for Multitenant in Oracle Database 21c
New Features for Multitenant in Oracle Database 21c
 
Patroni - HA PostgreSQL made easy
Patroni - HA PostgreSQL made easyPatroni - HA PostgreSQL made easy
Patroni - HA PostgreSQL made easy
 
Everyday I'm Shuffling - Tips for Writing Better Spark Programs, Strata San J...
Everyday I'm Shuffling - Tips for Writing Better Spark Programs, Strata San J...Everyday I'm Shuffling - Tips for Writing Better Spark Programs, Strata San J...
Everyday I'm Shuffling - Tips for Writing Better Spark Programs, Strata San J...
 
Comparing Next-Generation Container Image Building Tools
 Comparing Next-Generation Container Image Building Tools Comparing Next-Generation Container Image Building Tools
Comparing Next-Generation Container Image Building Tools
 
Cilium - Fast IPv6 Container Networking with BPF and XDP
Cilium - Fast IPv6 Container Networking with BPF and XDPCilium - Fast IPv6 Container Networking with BPF and XDP
Cilium - Fast IPv6 Container Networking with BPF and XDP
 
Linux tuning to improve PostgreSQL performance
Linux tuning to improve PostgreSQL performanceLinux tuning to improve PostgreSQL performance
Linux tuning to improve PostgreSQL performance
 
Meet cute-between-ebpf-and-tracing
Meet cute-between-ebpf-and-tracingMeet cute-between-ebpf-and-tracing
Meet cute-between-ebpf-and-tracing
 
Log analytics with ELK stack
Log analytics with ELK stackLog analytics with ELK stack
Log analytics with ELK stack
 
Standard Edition High Availability (SEHA) - The Why, What & How
Standard Edition High Availability (SEHA) - The Why, What & HowStandard Edition High Availability (SEHA) - The Why, What & How
Standard Edition High Availability (SEHA) - The Why, What & How
 
Cloud Native Networking & Security with Cilium & eBPF
Cloud Native Networking & Security with Cilium & eBPFCloud Native Networking & Security with Cilium & eBPF
Cloud Native Networking & Security with Cilium & eBPF
 
VictoriaLogs: Open Source Log Management System - Preview
VictoriaLogs: Open Source Log Management System - PreviewVictoriaLogs: Open Source Log Management System - Preview
VictoriaLogs: Open Source Log Management System - Preview
 
FPGA-Based Acceleration Architecture for Spark SQL Qi Xie and Quanfu Wang
FPGA-Based Acceleration Architecture for Spark SQL Qi Xie and Quanfu Wang FPGA-Based Acceleration Architecture for Spark SQL Qi Xie and Quanfu Wang
FPGA-Based Acceleration Architecture for Spark SQL Qi Xie and Quanfu Wang
 
Apache BookKeeper State Store: A Durable Key-Value Store - Pulsar Summit NA 2021
Apache BookKeeper State Store: A Durable Key-Value Store - Pulsar Summit NA 2021Apache BookKeeper State Store: A Durable Key-Value Store - Pulsar Summit NA 2021
Apache BookKeeper State Store: A Durable Key-Value Store - Pulsar Summit NA 2021
 
Envoy and Kafka
Envoy and KafkaEnvoy and Kafka
Envoy and Kafka
 
Flink vs. Spark
Flink vs. SparkFlink vs. Spark
Flink vs. Spark
 
OpenGurukul : Database : PostgreSQL
OpenGurukul : Database : PostgreSQLOpenGurukul : Database : PostgreSQL
OpenGurukul : Database : PostgreSQL
 
SRv6 study
SRv6 studySRv6 study
SRv6 study
 

Ähnlich wie Security and Multi-Tenancy with Apache Pulsar in Yahoo! (Verizon Media) - Pulsar Summit NA 2021

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
 
(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
 
Directory Write Leases in MagFS
Directory Write Leases in MagFSDirectory Write Leases in MagFS
Directory Write Leases in MagFS
Maginatics
 
NYC Dec 2022 Meetup_ Building Real-Time Requires a Team
NYC Dec 2022 Meetup_ Building Real-Time Requires a TeamNYC Dec 2022 Meetup_ Building Real-Time Requires a Team
NYC Dec 2022 Meetup_ Building Real-Time Requires a Team
Timothy Spann
 

Ähnlich wie Security and Multi-Tenancy with Apache Pulsar in Yahoo! (Verizon Media) - Pulsar Summit NA 2021 (20)

Make Internet Safer with DNS Firewall - Implementation Case Study at a Major ISP
Make Internet Safer with DNS Firewall - Implementation Case Study at a Major ISPMake Internet Safer with DNS Firewall - Implementation Case Study at a Major ISP
Make Internet Safer with DNS Firewall - Implementation Case Study at a Major ISP
 
Make the internet safe with DNS Firewall
Make the internet safe with DNS FirewallMake the internet safe with DNS Firewall
Make the internet safe with DNS Firewall
 
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
 
Netflix Open Source Meetup Season 4 Episode 2
Netflix Open Source Meetup Season 4 Episode 2Netflix Open Source Meetup Season 4 Episode 2
Netflix Open Source Meetup Season 4 Episode 2
 
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
 
Get your instance by name integration of nova, neutron and designate
Get your instance by name  integration of nova, neutron and designateGet your instance by name  integration of nova, neutron and designate
Get your instance by name integration of nova, neutron and designate
 
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...
 
Why Spring Belongs In Your Data Stream (From Edge to Multi-Cloud)
Why Spring Belongs In Your Data Stream (From Edge to Multi-Cloud)Why Spring Belongs In Your Data Stream (From Edge to Multi-Cloud)
Why Spring Belongs In Your Data Stream (From Edge to Multi-Cloud)
 
Traefik on Kubernetes at MySocialApp (CNCF Paris Meetup)
Traefik on Kubernetes at MySocialApp (CNCF Paris Meetup)Traefik on Kubernetes at MySocialApp (CNCF Paris Meetup)
Traefik on Kubernetes at MySocialApp (CNCF Paris Meetup)
 
Banog meetup August 30th, network device property as code
Banog meetup August 30th, network device property as codeBanog meetup August 30th, network device property as code
Banog meetup August 30th, network device property as code
 
Let's keep it simple and streaming
Let's keep it simple and streamingLet's keep it simple and streaming
Let's keep it simple and streaming
 
Let's keep it simple and streaming.pdf
Let's keep it simple and streaming.pdfLet's keep it simple and streaming.pdf
Let's keep it simple and streaming.pdf
 
Scenic City Summit (2021): Real-Time Streaming in any and all clouds, hybrid...
Scenic City Summit (2021):  Real-Time Streaming in any and all clouds, hybrid...Scenic City Summit (2021):  Real-Time Streaming in any and all clouds, hybrid...
Scenic City Summit (2021): Real-Time Streaming in any and all clouds, hybrid...
 
Directory Write Leases in MagFS
Directory Write Leases in MagFSDirectory Write Leases in MagFS
Directory Write Leases in MagFS
 
Open stack HA - Theory to Reality
Open stack HA -  Theory to RealityOpen stack HA -  Theory to Reality
Open stack HA - Theory to Reality
 
NYC Dec 2022 Meetup_ Building Real-Time Requires a Team
NYC Dec 2022 Meetup_ Building Real-Time Requires a TeamNYC Dec 2022 Meetup_ Building Real-Time Requires a Team
NYC Dec 2022 Meetup_ Building Real-Time Requires a Team
 
What’s New in NGINX Plus R16?
What’s New in NGINX Plus R16?What’s New in NGINX Plus R16?
What’s New in NGINX Plus R16?
 
PortoTechHub - Hail Hydrate! From Stream to Lake with Apache Pulsar and Friends
PortoTechHub  - Hail Hydrate! From Stream to Lake with Apache Pulsar and FriendsPortoTechHub  - Hail Hydrate! From Stream to Lake with Apache Pulsar and Friends
PortoTechHub - Hail Hydrate! From Stream to Lake with Apache Pulsar and Friends
 
Gluster for sysadmins
Gluster for sysadminsGluster for sysadmins
Gluster for sysadmins
 

Mehr von 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
 

Mehr von 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...
 
Improvements Made in KoP 2.9.0 - Pulsar Summit Asia 2021
Improvements Made in KoP 2.9.0  - Pulsar Summit Asia 2021Improvements Made in KoP 2.9.0  - Pulsar Summit Asia 2021
Improvements Made in KoP 2.9.0 - Pulsar Summit Asia 2021
 

Kürzlich hochgeladen

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Kürzlich hochgeladen (20)

Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 

Security and Multi-Tenancy with Apache Pulsar in Yahoo! (Verizon Media) - Pulsar Summit NA 2021

  • 1. Confidential and proprietary materials for authorized Verizon personnel and outside agencies only. Use, disclosure or distribution of this material is not permitted to any unauthorized persons or third parties except by written agreement. Apache Pulsar Multi-tenancy and Security June 17, 2021 Rajan Dhabalia rdhabalia@verizonmedia.com Ludwig Pummer ludwig@verizonmedia.com 1
  • 2. Speakers 2 Rajan Dhabalia Principal Software Engineer, Verizon Media Ludwig Pummer Principal Production Engineer, Verizon Media
  • 3. Agenda ● Pulsar in Yahoo/Verizon Media ● Multi tenancy ● Security ● SNI routing and proxy support ● Future ● QA 3
  • 4. Pulsar journey in Yahoo ● Developed as a hosted pub-sub service within Yahoo/VMG ○ open-sourced in 2016 ● Global deployment ○ 6 DC (Asia, Europe, US) ○ full mesh replication ● Mission critical use cases ○ Serving applications ○ Lower latency bus for use by other low latency services ○ Write availability 4
  • 5. ● Pulsar scale and storage evolution talk https://pulsar-summit.org/en/event/virtual-conference-2020/sessions/pulsar-storage-on-bookkeepe r-seamless-evolution ● Pulsar growth since 2015 ○ 120+ tenants and 15M rps ○ Storage evolution : HDD, SDD, NVMe, PMEM ○ On-prem, public-cloud and cross org integration ● Scale but what about multi-tenancy? Scale & Multi-Tenancy 5
  • 6. 6 Secured multi-tenant system with Apache Pulsar
  • 7. Multi-tenancy & Security Requirement 7 Multi-tenancy Tenant and Namespace IO isolation Quota and Throttling Broker and Bookie isolation Anti-affinity group Security Authentication & Authorization Encryption in transit Encryption at rest Pulsar proxy Support ATS, HAProxy, Nginx
  • 9. Tenant ● Highest level of provisioning ● Unit of administration ● Managed by Pulsar administrators ● Usually one team 9 Tenant and Namespace Namespace ● Middle level of provisioning ● Unit of data policy ● Managed by Pulsar administrators and/or Tenants ● Usually one application/use case persistent://tenant/namespace/topic
  • 10. 1. Portal find User to Team mapping 2. User creates or modifies tenant ○ Tenant name, Admin Authorization Principals ○ Clusters, WPS & RPS Estimates ○ Jira project, Contact Info, Documentation Link 3. Portal reviews capacity & calls Admin API to manage tenant ○ Jira ticket for Pulsar operator if needed 10 Self-Service Tenant Management
  • 11. 11 IO Isolation Writer Reader Journal Data File Data Device Journal Device Write Reads (cold)
  • 12. Storage Quota ● Tenant-controlled ● Namespace-level and Topic-level ● Storage Limit ● Policy Throttling ● Pulsar Administrator-controlled ● Namespace-level ● Publish Rate (broker) ● Dispatch Rate ● Replicator Dispatch Rate ● Max ○ Producers ○ Subscriptions ○ Consumers ○ Unacked Messages 12 Quota & Throttling
  • 13. Broker Isolation ● Regex of Namespaces to Regex of Brokers/IP Range ● Primary and Secondary broker Regexes 13 Broker Isolation Why ● High Profile/Reserved capacity ● Misbehaving tenants ● Debugging bin/pulsar-admin ns-isolation-policy set --auto-failover-policy-type min_available --auto-failover-policy-params min_limit=5,usage_threshold=80 --namespaces ‘my-tenant/.*’ --primary ‘broker-mytenant[0-9]+.mydomain’ --secondary ‘spare[0-9]+.mydomain’ my-cluster policy-name
  • 14. Bookie Isolation ● Bookies to “Affinity Group” ● Namespace(s) to Primary/Secondary Affinity Group ● Rack-Aware within group 14 Bookie Isolation Why ● SLA ● High Profile/Reserved capacity bin/pulsar-admin bookies set-bookie-rack -b 1.1.1.1:3181 -g group-bookie1 --hostname bookie1.mydomain -r /default-rack ... bin/pulsar-admin namespaces set-bookie-affinity-group my-tenant/my-namespace1 --primary-group group-bookie1
  • 15. ● Common unit of failure for multiple brokers 15 Failure Domain bin/pulsar-admin clusters create-failure-domain cluster-name --domain-name domain-1 --broker-list broker-1,broker-2 Broker-1 Broker-2 Domain-1 Broker-3 Broker-4 Domain-2 Namespace-1 Namespace-2 Namespace-3 Namespace-4 1 2 3 4 Loadbalancer: Namespace assignment sequence Anti-affinity-namespaces: “Namespace-X”
  • 16. ● Assign Namespaces to Anti-Affinity Group ● Changes Load Balancer Behavior 16 Anti-affinity group bin/pulsar-admin namespaces set-anti-affinity-group tenant/namespace1 --group tenant-aag-a bin/pulsar-admin namespaces set-anti-affinity-group tenant/namespace2 --group tenant-aag-a Broker-1 Broker-2 Domain-1 Broker-3 Broker-4 Domain-2 Namespace-1 Namespace-2 Namespace-3 Namespace-4 1 2 3 4 Loadbalancer: Namespace assignment sequence Anti-affinity-namespaces: “Namespace-X”
  • 18. ● Authentication ○ TLS Authentication ○ Athenz ○ Kerberos ○ JSON Web Token Authentication ○ Pluggable authentication provider ● Authorization ○ Pluggable authorization provider ○ Default authorization provider on metadata service 18 Authentication & Authorization
  • 19. 19 Encryption over the wire PulsarClient client = PulsarClient.builder() .serviceUrl("pulsar+ssl://pulsar-broler:6651/") .tlsTrustCertsFilePath("/ca.cert.pem") .authentication(AUTH, "tlsCertFile:/cert.pem,"+"tlsKeyFile:/key.pem") .enableTlsHostnameVerification(true) .build();
  • 20. Producer creation Producer producer = pulsarClient.newProducer() .topic( "persistent://my-tenant/my-ns/my-topic" ) .addEncryptionKey("myappkey") .cryptoKeyReader(new MyCryptoKeyReader()) .create(); 20 Encryption at rest Consumer creation Consumer consumer = pulsarClient.newConsumer() .topic( "persistent://my-tenant/my-ns/my-topic" ) .subscriptionName( "my-subscriber-name" ) .cryptoKeyReader(new MyCryptoKeyReader()) .subscribe();
  • 21. ● Proxy for hybrid could application ● Gateway in a cloud environment or on Kubernetes 21 Pulsar Proxy: Public cloud access Proxy Configuration brokerServiceURLTls=pulsar+ssl://brokers.example.com:6651 brokerWebServiceURLTls=https://brokers.example.com:8443
  • 22. ● Proxy server creates a TLS tunnel between remote client and server ● The goal is to enable external clients to connect to internal services and do their own client certificate verification, possibly because distribution of private keys to the edge Traffic Server instances is too difficult or too risky. 22 Support Layer-4 SNI Routing
  • 23. 23 Pulsar client: SNI Routing PulsarClient client = PulsarClient.builder() .serviceUrl("pulsar+ssl://pulsar-broker:6651/") .enableTls(true).tlsTrustCertsFilePath("/ca.cert.pem") .proxyServiceUrl(proxyUrl, ProxyProtocol.SNI) .authentication(AUTH, "tlsCertFile:/cert.pem,"+"tlsKeyFile:/key.pem") .build();
  • 24. 24 Cross Organization geo-replication pulsar-admin clusters create orgB-cluster --broker-url-secure pulsar+ssl:// orgB-broker-vip:6651 --proxy-protocol SNI --proxy-url pulsar+ssl:// orgA-proxy:443 pulsar-admin clusters create orgA-cluster --broker-url-secure pulsar+ssl:// orgA-broker-vip:6651 --proxy-protocol SNI --proxy-url pulsar+ssl:// orgB-proxy:443 For more info: PIP-60: https://github.com/apache/pulsar/wiki/PIP-60%3A-Support-Proxy-server-with-SNI-routing
  • 25. Future Roadmap ● Tenant based broker virtualization ○ Container based brokers on BookKeeper service ● Hybrid cloud deployment with geo-replication 25
  • 27. Thank you Rajan Dhabalia rdhabalia@verizonmedia.com Ludwig Pummer ludwig@verizonmedia.com