SlideShare a Scribd company logo
1 of 23
Siphon Data Bus
Shared Data
Soumyajit Sahu
Engineer @ Microsoft
Siphon Usage
3.9 million
EVENTS PER SECOND INGRESS (AVG)
800 TB
Ingestion PER DAY
1,700
PRODUCTION KAFKA BROKERS
10 Sec
99th PERCENTILE LATENCY
KEY CUSTOMER SCENARIOS
Ads Monetization (Fast BI)
O365 Customer Fabric NRT – Tenant & User insights
BingNRT Operational Intelligence
Presto (Fast SML) interactive analysis
Delve Analytics
0
10
20
30
40
50
60
Throughput(inGBps)
Siphon Data Volume (Ingress and Egress)
Volume published (GBps) Volume subscribed (GBps) Total Volume (GBps)
0
5
10
15
20
25
Throughput(eventspersec)Millions
Siphon Events per second (Ingress and Egress)
EPS In Eps Out Total EPS
Siphon Architecture
Asia DC
Zookeeper Canary
Kafka
Collector
Agent
Services Data Pull (Agent)
Services Data Push
Device Proxy Services
Consumer
API (Push/
Pull)
Europe DC
Zookeeper Canary
Kafka
US DC
Zookeeper Canary
Kafka
Streaming
Batch
Audit Trail
Open
Source
Microsoft Internal
Siphon
On Autopilot!
Kafka Cluster Storage
Management
A nightmare today!
The Problem - Unbalanced Disk and Machine usage
Machine 1 Machine 3Machine 2
Disk 1 Disk 1Disk 1
Disk 2 Disk 2Disk 2
Partitions with intense IO
New disk added to the machine
New machine added to the cluster
Disk 1
Disk 2
Disk 3
T1-P1
T2-P2 T2-P3
T1-P2 T2-P1
* Disk-3 is a newly added disk and we could move some partitions there.
* If Topic T1 is a higher IO demanding topic, then prefer to put T1-P1 and T1-P2 on separate drives.
Closer look: Imbalance inside a Broker
Assuming:
1) All disks are similar
2) All partitions of a topic are equally IO demanding
Solution
Just before broker start
{
Get alphabetically sorted list of all local kafka directories
Put them on the list of disks in a round robin fashion
}
Ensures:
1) Partitions of the same Topic go to different drives
2) All disks get equal share of directories
* This method doesn’t cover all scenarios, but does a decent job. Two heavy throughput partitions could still
end up on the same disk.
Closer look: Imbalance inside a Broker
Disk 1
Disk 2
Disk 3
T1-P1 T2-P2
T2-P3T1-P2
T2-P1
* Disk-3 is a newly added disk and we could move some partitions there.
* If Topic T1 is a higher IO demanding topic, then prefer to put T1-P1 and T1-P2 on separate drives.
Closer look: Imbalance inside a Broker solved
Broker-1 Broker-3
T1-P1
T2-P1
T3-P1
T3-P2
Broker-2
T1-P2
T2-P2
* Broker-3 is a newly added broker to the cluster.
* T3 was created when Broker-2 was down.
Closer look: Imbalance across machines
• The static approach (usually has the following wrong assumptions):
Assuming heterogeneous topics’ partitions will show
homogenous throughput characteristics.
Number of partitions for a topic is in the control of the Cluster
manager (Operations team).
All machines in the cluster are of the same configuration
Closer look: Imbalance across machines
Broker-1 Broker-3
T1-P1
Broker-2
T1-P2
T2-P2T2-P1
* Equal partitions across machines isn’t enough to achieve fair load
* Perhaps T3-P1 is very IO intensive
* Perhaps Broker-1 is of low hardware configuration
Closer look: Imbalance across machines
T3-P1
Broker-2 Broker-1
T1-P1
T1-P2
T2-P2
T2-P1
T3-P1
Broker-2
• The dynamic approach:
Since a statically defined approach didn’t work,
we need a dynamic approach…
Next, we will discuss the dynamic approach (which I call the
“Adoption Marketplace”)
Closer look: Imbalance across machines
An Adoption
Marketplace
An Adoption Marketplace
Broker-1 Broker-3
Adoption Ads
(First come first serve)
Item: Topic1-
Partition1
Requires: 2
MBPS at peak
Broker-2
An Adoption Marketplace
• The (POC) logic/tool runs on each
broker independently
• The logic is completely distributed,
but needs co-ordination.
Zookeeper is leveraged here.
An Adoption Marketplace
• Advertisement format:
{
Version: 1.0
Item: TopicA-PartitionB,
ResourcesRequired: [
{ResourceName:”X”, ResourceQty: X1},
{ResourceName:”Y”, ResourceQty: Y1},
…
]
}
Example (Advertise to give away Topic1’s partition 1):
{
Version: 1.0
Item: “Topic1-1”,
ResourcesRequired: [
{ResourceName:”PeakMBPS”, ResourceQty: 2}
]
}
Versioning allows future enhancements
to take place seamlessly
An Adoption Marketplace
• The Interface
public interface IAdoptionLogic {
// Individual Developers need to implement/perfect this based on their need
Partition findLocalPartitionToGiveOut() throws Exception;
// Individual Developers need to implement/perfect this based on their need
Partition findRemotePartitionToTakeIn()throws Exception;
// This method will be a zookeeper backed implementation out of the box
void advertisePartitionForAdoption(Partition partitionToGiveOut)throws Exception;
// This method will be a zookeeper backed implementation out of the box
void adoptRemotePartition(Partition partitionToTakeIn)throws Exception;
}
An Adoption Marketplace
• LOOP START:
Find any local partition to be given away
Post the Ad and wait for its adoption
Find any Ads from others for adoption and check your eligibility
Lock on an Ad and adopt it if you are eligible
GOTO LOOP START
Proof of Concept Experiment – The logic
The logic to put/take partitions for adoption was kept straight forward:
1) findLocalPartitionToGiveOut()
If a broker sees that it has more partitions for a topic than the
Ceil((Partitions * Replication-factor) / total brokers in cluster), then it
puts a partition of that topic for adoption
2) adoptRemotePartition()
If a broker has less partitions for a topic than the Ceil((Partitions
* Replication-factor) / total brokers in cluster), and it sees an
advertisement for such a partition, then it tries to adopt it.
Proof of Concept Experiment – Result
Cluster with 3 brokers
Before case (completely skewed topic with all partitions on one broker):
Topic:topic1 PartitionCount:10 ReplicationFactor:1 Configs:
Topic: topic1 Partition: 0 Leader: 169595708 Replicas: 169595708 Isr: 169595708
Topic: topic1 Partition: 1 Leader: 169595708 Replicas: 169595708 Isr: 169595708
Topic: topic1 Partition: 2 Leader: 169595708 Replicas: 169595708 Isr: 169595708
Topic: topic1 Partition: 3 Leader: 169595708 Replicas: 169595708 Isr: 169595708
Topic: topic1 Partition: 4 Leader: 169595708 Replicas: 169595708 Isr: 169595708
Topic: topic1 Partition: 5 Leader: 169595708 Replicas: 169595708 Isr: 169595708
Topic: topic1 Partition: 6 Leader: 169595708 Replicas: 169595708 Isr: 169595708
Topic: topic1 Partition: 7 Leader: 169595708 Replicas: 169595708 Isr: 169595708
Topic: topic1 Partition: 8 Leader: 169595708 Replicas: 169595708 Isr: 169595708
Topic: topic1 Partition: 9 Leader: 169595708 Replicas: 169595708 Isr: 169595708
Proof of Concept Experiment – Result
After case (running the tool in background yielded an uniform distribution eventually):
Topic:topic1 PartitionCount:10 ReplicationFactor:1 Configs:
Topic: topic1 Partition: 0 Leader: 169595708 Replicas: 169595708 Isr: 169595708
Topic: topic1 Partition: 1 Leader: 169595708 Replicas: 169595708 Isr: 169595708
Topic: topic1 Partition: 2 Leader: 177775588 Replicas: 177775588 Isr: 177775588
Topic: topic1 Partition: 3 Leader: 169595708 Replicas: 169595708 Isr: 169595708
Topic: topic1 Partition: 4 Leader: 169595679 Replicas: 169595679 Isr: 169595679
Topic: topic1 Partition: 5 Leader: 177775588 Replicas: 177775588 Isr: 177775588
Topic: topic1 Partition: 6 Leader: 177775588 Replicas: 177775588 Isr: 177775588
Topic: topic1 Partition: 7 Leader: 169595708 Replicas: 169595708 Isr: 169595708
Topic: topic1 Partition: 8 Leader: 169595679 Replicas: 169595679 Isr: 169595679
Topic: topic1 Partition: 9 Leader: 169595679 Replicas: 169595679 Isr: 169595679
An Adoption Marketplace
Benefits:
1) Kafka Reassignment command runs continuously throughout the
cluster.
2) Older partitions can spread to the new machines without any
manual operations.
3) The advertisements can be monitored. If there are no adopters, then
it is time to add more machines.
4) The logic to determine which partitions to put for/take in for
adoptions could be constantly improved, and will be dependent on
ones environment and use case.
Proof of Concept Experiment – Code
Github:
https://github.com/Microsoft/Cluster-Partition-Rebalancer-For-Kafka

More Related Content

Similar to Microsoft kafka load imbalance

Pharo 11: A stabilization release
Pharo 11: A stabilization releasePharo 11: A stabilization release
Pharo 11: A stabilization releaseESUG
 
Linux Kernel Platform Development: Challenges and Insights
 Linux Kernel Platform Development: Challenges and Insights Linux Kernel Platform Development: Challenges and Insights
Linux Kernel Platform Development: Challenges and InsightsGlobalLogic Ukraine
 
KubeFlow + GPU + Keras/TensorFlow 2.0 + TF Extended (TFX) + Kubernetes + PyTo...
KubeFlow + GPU + Keras/TensorFlow 2.0 + TF Extended (TFX) + Kubernetes + PyTo...KubeFlow + GPU + Keras/TensorFlow 2.0 + TF Extended (TFX) + Kubernetes + PyTo...
KubeFlow + GPU + Keras/TensorFlow 2.0 + TF Extended (TFX) + Kubernetes + PyTo...Chris Fregly
 
Apache Flink Deep Dive
Apache Flink Deep DiveApache Flink Deep Dive
Apache Flink Deep DiveVasia Kalavri
 
TEE - kernel support is now upstream. What this means for open source security
TEE - kernel support is now upstream. What this means for open source securityTEE - kernel support is now upstream. What this means for open source security
TEE - kernel support is now upstream. What this means for open source securityLinaro
 
The Latest and Greatest from OpenNTF and the IBM Social Business Toolkit, #dd13
The Latest and Greatest from OpenNTF and the IBM Social Business Toolkit, #dd13The Latest and Greatest from OpenNTF and the IBM Social Business Toolkit, #dd13
The Latest and Greatest from OpenNTF and the IBM Social Business Toolkit, #dd13Dominopoint - Italian Lotus User Group
 
Dd13.2013.milano.open ntf
Dd13.2013.milano.open ntfDd13.2013.milano.open ntf
Dd13.2013.milano.open ntfUlrich Krause
 
Linux Perf Tools
Linux Perf ToolsLinux Perf Tools
Linux Perf ToolsRaj Pandey
 
Linux Performance Analysis: New Tools and Old Secrets
Linux Performance Analysis: New Tools and Old SecretsLinux Performance Analysis: New Tools and Old Secrets
Linux Performance Analysis: New Tools and Old SecretsBrendan Gregg
 
NTTドコモ様 導入事例 OpenStack Summit 2015 Tokyo 講演「After One year of OpenStack Cloud...
NTTドコモ様 導入事例 OpenStack Summit 2015 Tokyo 講演「After One year of OpenStack Cloud...NTTドコモ様 導入事例 OpenStack Summit 2015 Tokyo 講演「After One year of OpenStack Cloud...
NTTドコモ様 導入事例 OpenStack Summit 2015 Tokyo 講演「After One year of OpenStack Cloud...VirtualTech Japan Inc.
 
Exactly-Once Financial Data Processing at Scale with Flink and Pinot
Exactly-Once Financial Data Processing at Scale with Flink and PinotExactly-Once Financial Data Processing at Scale with Flink and Pinot
Exactly-Once Financial Data Processing at Scale with Flink and PinotFlink Forward
 
Async Web Frameworks in Python
Async Web Frameworks in PythonAsync Web Frameworks in Python
Async Web Frameworks in PythonRyan Johnson
 
HeapStats: Troubleshooting with Serviceability and the New Runtime Monitoring...
HeapStats: Troubleshooting with Serviceability and the New Runtime Monitoring...HeapStats: Troubleshooting with Serviceability and the New Runtime Monitoring...
HeapStats: Troubleshooting with Serviceability and the New Runtime Monitoring...Yuji Kubota
 
BUD17-405: Building a reference IoT product with Zephyr
BUD17-405: Building a reference IoT product with Zephyr BUD17-405: Building a reference IoT product with Zephyr
BUD17-405: Building a reference IoT product with Zephyr Linaro
 
Let's Talk Locks!
Let's Talk Locks!Let's Talk Locks!
Let's Talk Locks!C4Media
 
Coverage Solutions on Emulators
Coverage Solutions on EmulatorsCoverage Solutions on Emulators
Coverage Solutions on EmulatorsDVClub
 
Triggers In MongoDB
Triggers In MongoDBTriggers In MongoDB
Triggers In MongoDBJason Terpko
 
360|Flex Greenthreading In Flex
360|Flex Greenthreading In Flex360|Flex Greenthreading In Flex
360|Flex Greenthreading In FlexHuyen Tue Dao
 
Ugif 10 2012 ppt0000001
Ugif 10 2012 ppt0000001Ugif 10 2012 ppt0000001
Ugif 10 2012 ppt0000001UGIF
 

Similar to Microsoft kafka load imbalance (20)

Pharo 11: A stabilization release
Pharo 11: A stabilization releasePharo 11: A stabilization release
Pharo 11: A stabilization release
 
Linux Kernel Platform Development: Challenges and Insights
 Linux Kernel Platform Development: Challenges and Insights Linux Kernel Platform Development: Challenges and Insights
Linux Kernel Platform Development: Challenges and Insights
 
KubeFlow + GPU + Keras/TensorFlow 2.0 + TF Extended (TFX) + Kubernetes + PyTo...
KubeFlow + GPU + Keras/TensorFlow 2.0 + TF Extended (TFX) + Kubernetes + PyTo...KubeFlow + GPU + Keras/TensorFlow 2.0 + TF Extended (TFX) + Kubernetes + PyTo...
KubeFlow + GPU + Keras/TensorFlow 2.0 + TF Extended (TFX) + Kubernetes + PyTo...
 
Apache Flink Deep Dive
Apache Flink Deep DiveApache Flink Deep Dive
Apache Flink Deep Dive
 
TEE - kernel support is now upstream. What this means for open source security
TEE - kernel support is now upstream. What this means for open source securityTEE - kernel support is now upstream. What this means for open source security
TEE - kernel support is now upstream. What this means for open source security
 
The Latest and Greatest from OpenNTF and the IBM Social Business Toolkit, #dd13
The Latest and Greatest from OpenNTF and the IBM Social Business Toolkit, #dd13The Latest and Greatest from OpenNTF and the IBM Social Business Toolkit, #dd13
The Latest and Greatest from OpenNTF and the IBM Social Business Toolkit, #dd13
 
Dd13.2013.milano.open ntf
Dd13.2013.milano.open ntfDd13.2013.milano.open ntf
Dd13.2013.milano.open ntf
 
Linux Perf Tools
Linux Perf ToolsLinux Perf Tools
Linux Perf Tools
 
Linux Performance Analysis: New Tools and Old Secrets
Linux Performance Analysis: New Tools and Old SecretsLinux Performance Analysis: New Tools and Old Secrets
Linux Performance Analysis: New Tools and Old Secrets
 
NTTドコモ様 導入事例 OpenStack Summit 2015 Tokyo 講演「After One year of OpenStack Cloud...
NTTドコモ様 導入事例 OpenStack Summit 2015 Tokyo 講演「After One year of OpenStack Cloud...NTTドコモ様 導入事例 OpenStack Summit 2015 Tokyo 講演「After One year of OpenStack Cloud...
NTTドコモ様 導入事例 OpenStack Summit 2015 Tokyo 講演「After One year of OpenStack Cloud...
 
Exactly-Once Financial Data Processing at Scale with Flink and Pinot
Exactly-Once Financial Data Processing at Scale with Flink and PinotExactly-Once Financial Data Processing at Scale with Flink and Pinot
Exactly-Once Financial Data Processing at Scale with Flink and Pinot
 
Switching to Git
Switching to GitSwitching to Git
Switching to Git
 
Async Web Frameworks in Python
Async Web Frameworks in PythonAsync Web Frameworks in Python
Async Web Frameworks in Python
 
HeapStats: Troubleshooting with Serviceability and the New Runtime Monitoring...
HeapStats: Troubleshooting with Serviceability and the New Runtime Monitoring...HeapStats: Troubleshooting with Serviceability and the New Runtime Monitoring...
HeapStats: Troubleshooting with Serviceability and the New Runtime Monitoring...
 
BUD17-405: Building a reference IoT product with Zephyr
BUD17-405: Building a reference IoT product with Zephyr BUD17-405: Building a reference IoT product with Zephyr
BUD17-405: Building a reference IoT product with Zephyr
 
Let's Talk Locks!
Let's Talk Locks!Let's Talk Locks!
Let's Talk Locks!
 
Coverage Solutions on Emulators
Coverage Solutions on EmulatorsCoverage Solutions on Emulators
Coverage Solutions on Emulators
 
Triggers In MongoDB
Triggers In MongoDBTriggers In MongoDB
Triggers In MongoDB
 
360|Flex Greenthreading In Flex
360|Flex Greenthreading In Flex360|Flex Greenthreading In Flex
360|Flex Greenthreading In Flex
 
Ugif 10 2012 ppt0000001
Ugif 10 2012 ppt0000001Ugif 10 2012 ppt0000001
Ugif 10 2012 ppt0000001
 

More from Nitin Kumar

Deep learning with kafka
Deep learning with kafkaDeep learning with kafka
Deep learning with kafkaNitin Kumar
 
2019 04 seattle_meetup___kafka_machine_learning___kai_waehner
2019 04 seattle_meetup___kafka_machine_learning___kai_waehner2019 04 seattle_meetup___kafka_machine_learning___kai_waehner
2019 04 seattle_meetup___kafka_machine_learning___kai_waehnerNitin Kumar
 
Kafka meetup seattle 2019 mirus reliable, high performance replication for ap...
Kafka meetup seattle 2019 mirus reliable, high performance replication for ap...Kafka meetup seattle 2019 mirus reliable, high performance replication for ap...
Kafka meetup seattle 2019 mirus reliable, high performance replication for ap...Nitin Kumar
 
Processing trillions of events per day with apache
Processing trillions of events per day with apacheProcessing trillions of events per day with apache
Processing trillions of events per day with apacheNitin Kumar
 
Ren cao kafka connect
Ren cao   kafka connectRen cao   kafka connect
Ren cao kafka connectNitin Kumar
 
Insta clustr seattle kafka meetup presentation bb
Insta clustr seattle kafka meetup presentation   bbInsta clustr seattle kafka meetup presentation   bb
Insta clustr seattle kafka meetup presentation bbNitin Kumar
 
EventHub for kafka ecosystems kafka meetup
EventHub for kafka ecosystems   kafka meetupEventHub for kafka ecosystems   kafka meetup
EventHub for kafka ecosystems kafka meetupNitin Kumar
 
Microsoft challenges of a multi tenant kafka service
Microsoft challenges of a multi tenant kafka serviceMicrosoft challenges of a multi tenant kafka service
Microsoft challenges of a multi tenant kafka serviceNitin Kumar
 
Net flix kafka seattle meetup
Net flix kafka seattle meetupNet flix kafka seattle meetup
Net flix kafka seattle meetupNitin Kumar
 
Brandon obrien streaming_data
Brandon obrien streaming_dataBrandon obrien streaming_data
Brandon obrien streaming_dataNitin Kumar
 
Confluent kafka meetupseattle jan2017
Confluent kafka meetupseattle jan2017Confluent kafka meetupseattle jan2017
Confluent kafka meetupseattle jan2017Nitin Kumar
 
Map r seattle streams meetup oct 2016
Map r seattle streams meetup   oct 2016Map r seattle streams meetup   oct 2016
Map r seattle streams meetup oct 2016Nitin Kumar
 
Linked in multi tier, multi-tenant, multi-problem kafka
Linked in multi tier, multi-tenant, multi-problem kafkaLinked in multi tier, multi-tenant, multi-problem kafka
Linked in multi tier, multi-tenant, multi-problem kafkaNitin Kumar
 
Seattle kafka meetup nov 2015 published siphon
Seattle kafka meetup nov 2015 published  siphonSeattle kafka meetup nov 2015 published  siphon
Seattle kafka meetup nov 2015 published siphonNitin Kumar
 

More from Nitin Kumar (16)

Deep learning with kafka
Deep learning with kafkaDeep learning with kafka
Deep learning with kafka
 
2019 04 seattle_meetup___kafka_machine_learning___kai_waehner
2019 04 seattle_meetup___kafka_machine_learning___kai_waehner2019 04 seattle_meetup___kafka_machine_learning___kai_waehner
2019 04 seattle_meetup___kafka_machine_learning___kai_waehner
 
Kafka meetup seattle 2019 mirus reliable, high performance replication for ap...
Kafka meetup seattle 2019 mirus reliable, high performance replication for ap...Kafka meetup seattle 2019 mirus reliable, high performance replication for ap...
Kafka meetup seattle 2019 mirus reliable, high performance replication for ap...
 
Processing trillions of events per day with apache
Processing trillions of events per day with apacheProcessing trillions of events per day with apache
Processing trillions of events per day with apache
 
Ren cao kafka connect
Ren cao   kafka connectRen cao   kafka connect
Ren cao kafka connect
 
Insta clustr seattle kafka meetup presentation bb
Insta clustr seattle kafka meetup presentation   bbInsta clustr seattle kafka meetup presentation   bb
Insta clustr seattle kafka meetup presentation bb
 
EventHub for kafka ecosystems kafka meetup
EventHub for kafka ecosystems   kafka meetupEventHub for kafka ecosystems   kafka meetup
EventHub for kafka ecosystems kafka meetup
 
Kafka eos
Kafka eosKafka eos
Kafka eos
 
Microsoft challenges of a multi tenant kafka service
Microsoft challenges of a multi tenant kafka serviceMicrosoft challenges of a multi tenant kafka service
Microsoft challenges of a multi tenant kafka service
 
Net flix kafka seattle meetup
Net flix kafka seattle meetupNet flix kafka seattle meetup
Net flix kafka seattle meetup
 
Avvo fkafka
Avvo fkafkaAvvo fkafka
Avvo fkafka
 
Brandon obrien streaming_data
Brandon obrien streaming_dataBrandon obrien streaming_data
Brandon obrien streaming_data
 
Confluent kafka meetupseattle jan2017
Confluent kafka meetupseattle jan2017Confluent kafka meetupseattle jan2017
Confluent kafka meetupseattle jan2017
 
Map r seattle streams meetup oct 2016
Map r seattle streams meetup   oct 2016Map r seattle streams meetup   oct 2016
Map r seattle streams meetup oct 2016
 
Linked in multi tier, multi-tenant, multi-problem kafka
Linked in multi tier, multi-tenant, multi-problem kafkaLinked in multi tier, multi-tenant, multi-problem kafka
Linked in multi tier, multi-tenant, multi-problem kafka
 
Seattle kafka meetup nov 2015 published siphon
Seattle kafka meetup nov 2015 published  siphonSeattle kafka meetup nov 2015 published  siphon
Seattle kafka meetup nov 2015 published siphon
 

Recently uploaded

Cheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 night
Cheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 nightCheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 night
Cheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 nightDelhi Call girls
 
Capstone Project on IBM Data Analytics Program
Capstone Project on IBM Data Analytics ProgramCapstone Project on IBM Data Analytics Program
Capstone Project on IBM Data Analytics ProgramMoniSankarHazra
 
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% SecureCall me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% SecurePooja Nehwal
 
Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...
Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...
Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...amitlee9823
 
Probability Grade 10 Third Quarter Lessons
Probability Grade 10 Third Quarter LessonsProbability Grade 10 Third Quarter Lessons
Probability Grade 10 Third Quarter LessonsJoseMangaJr1
 
hybrid Seed Production In Chilli & Capsicum.pptx
hybrid Seed Production In Chilli & Capsicum.pptxhybrid Seed Production In Chilli & Capsicum.pptx
hybrid Seed Production In Chilli & Capsicum.pptx9to5mart
 
👉 Amritsar Call Girl 👉📞 6367187148 👉📞 Just📲 Call Ruhi Call Girl Phone No Amri...
👉 Amritsar Call Girl 👉📞 6367187148 👉📞 Just📲 Call Ruhi Call Girl Phone No Amri...👉 Amritsar Call Girl 👉📞 6367187148 👉📞 Just📲 Call Ruhi Call Girl Phone No Amri...
👉 Amritsar Call Girl 👉📞 6367187148 👉📞 Just📲 Call Ruhi Call Girl Phone No Amri...karishmasinghjnh
 
Call Girls Begur Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Begur Just Call 👗 7737669865 👗 Top Class Call Girl Service BangaloreCall Girls Begur Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Begur Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangaloreamitlee9823
 
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...Valters Lauzums
 
Mg Road Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Banga...
Mg Road Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Banga...Mg Road Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Banga...
Mg Road Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Banga...amitlee9823
 
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...amitlee9823
 
DATA SUMMIT 24 Building Real-Time Pipelines With FLaNK
DATA SUMMIT 24  Building Real-Time Pipelines With FLaNKDATA SUMMIT 24  Building Real-Time Pipelines With FLaNK
DATA SUMMIT 24 Building Real-Time Pipelines With FLaNKTimothy Spann
 
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...amitlee9823
 
➥🔝 7737669865 🔝▻ Thrissur Call-girls in Women Seeking Men 🔝Thrissur🔝 Escor...
➥🔝 7737669865 🔝▻ Thrissur Call-girls in Women Seeking Men  🔝Thrissur🔝   Escor...➥🔝 7737669865 🔝▻ Thrissur Call-girls in Women Seeking Men  🔝Thrissur🔝   Escor...
➥🔝 7737669865 🔝▻ Thrissur Call-girls in Women Seeking Men 🔝Thrissur🔝 Escor...amitlee9823
 
➥🔝 7737669865 🔝▻ Mathura Call-girls in Women Seeking Men 🔝Mathura🔝 Escorts...
➥🔝 7737669865 🔝▻ Mathura Call-girls in Women Seeking Men  🔝Mathura🔝   Escorts...➥🔝 7737669865 🔝▻ Mathura Call-girls in Women Seeking Men  🔝Mathura🔝   Escorts...
➥🔝 7737669865 🔝▻ Mathura Call-girls in Women Seeking Men 🔝Mathura🔝 Escorts...amitlee9823
 
➥🔝 7737669865 🔝▻ mahisagar Call-girls in Women Seeking Men 🔝mahisagar🔝 Esc...
➥🔝 7737669865 🔝▻ mahisagar Call-girls in Women Seeking Men  🔝mahisagar🔝   Esc...➥🔝 7737669865 🔝▻ mahisagar Call-girls in Women Seeking Men  🔝mahisagar🔝   Esc...
➥🔝 7737669865 🔝▻ mahisagar Call-girls in Women Seeking Men 🔝mahisagar🔝 Esc...amitlee9823
 

Recently uploaded (20)

Predicting Loan Approval: A Data Science Project
Predicting Loan Approval: A Data Science ProjectPredicting Loan Approval: A Data Science Project
Predicting Loan Approval: A Data Science Project
 
Cheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 night
Cheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 nightCheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 night
Cheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 night
 
CHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Capstone Project on IBM Data Analytics Program
Capstone Project on IBM Data Analytics ProgramCapstone Project on IBM Data Analytics Program
Capstone Project on IBM Data Analytics Program
 
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% SecureCall me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
 
Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...
Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...
Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...
 
Probability Grade 10 Third Quarter Lessons
Probability Grade 10 Third Quarter LessonsProbability Grade 10 Third Quarter Lessons
Probability Grade 10 Third Quarter Lessons
 
hybrid Seed Production In Chilli & Capsicum.pptx
hybrid Seed Production In Chilli & Capsicum.pptxhybrid Seed Production In Chilli & Capsicum.pptx
hybrid Seed Production In Chilli & Capsicum.pptx
 
👉 Amritsar Call Girl 👉📞 6367187148 👉📞 Just📲 Call Ruhi Call Girl Phone No Amri...
👉 Amritsar Call Girl 👉📞 6367187148 👉📞 Just📲 Call Ruhi Call Girl Phone No Amri...👉 Amritsar Call Girl 👉📞 6367187148 👉📞 Just📲 Call Ruhi Call Girl Phone No Amri...
👉 Amritsar Call Girl 👉📞 6367187148 👉📞 Just📲 Call Ruhi Call Girl Phone No Amri...
 
Call Girls Begur Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Begur Just Call 👗 7737669865 👗 Top Class Call Girl Service BangaloreCall Girls Begur Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Begur Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
 
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
 
Mg Road Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Banga...
Mg Road Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Banga...Mg Road Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Banga...
Mg Road Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Banga...
 
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
 
Abortion pills in Jeddah | +966572737505 | Get Cytotec
Abortion pills in Jeddah | +966572737505 | Get CytotecAbortion pills in Jeddah | +966572737505 | Get Cytotec
Abortion pills in Jeddah | +966572737505 | Get Cytotec
 
DATA SUMMIT 24 Building Real-Time Pipelines With FLaNK
DATA SUMMIT 24  Building Real-Time Pipelines With FLaNKDATA SUMMIT 24  Building Real-Time Pipelines With FLaNK
DATA SUMMIT 24 Building Real-Time Pipelines With FLaNK
 
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...
 
➥🔝 7737669865 🔝▻ Thrissur Call-girls in Women Seeking Men 🔝Thrissur🔝 Escor...
➥🔝 7737669865 🔝▻ Thrissur Call-girls in Women Seeking Men  🔝Thrissur🔝   Escor...➥🔝 7737669865 🔝▻ Thrissur Call-girls in Women Seeking Men  🔝Thrissur🔝   Escor...
➥🔝 7737669865 🔝▻ Thrissur Call-girls in Women Seeking Men 🔝Thrissur🔝 Escor...
 
➥🔝 7737669865 🔝▻ Mathura Call-girls in Women Seeking Men 🔝Mathura🔝 Escorts...
➥🔝 7737669865 🔝▻ Mathura Call-girls in Women Seeking Men  🔝Mathura🔝   Escorts...➥🔝 7737669865 🔝▻ Mathura Call-girls in Women Seeking Men  🔝Mathura🔝   Escorts...
➥🔝 7737669865 🔝▻ Mathura Call-girls in Women Seeking Men 🔝Mathura🔝 Escorts...
 
Anomaly detection and data imputation within time series
Anomaly detection and data imputation within time seriesAnomaly detection and data imputation within time series
Anomaly detection and data imputation within time series
 
➥🔝 7737669865 🔝▻ mahisagar Call-girls in Women Seeking Men 🔝mahisagar🔝 Esc...
➥🔝 7737669865 🔝▻ mahisagar Call-girls in Women Seeking Men  🔝mahisagar🔝   Esc...➥🔝 7737669865 🔝▻ mahisagar Call-girls in Women Seeking Men  🔝mahisagar🔝   Esc...
➥🔝 7737669865 🔝▻ mahisagar Call-girls in Women Seeking Men 🔝mahisagar🔝 Esc...
 

Microsoft kafka load imbalance

  • 1. Siphon Data Bus Shared Data Soumyajit Sahu Engineer @ Microsoft
  • 2. Siphon Usage 3.9 million EVENTS PER SECOND INGRESS (AVG) 800 TB Ingestion PER DAY 1,700 PRODUCTION KAFKA BROKERS 10 Sec 99th PERCENTILE LATENCY KEY CUSTOMER SCENARIOS Ads Monetization (Fast BI) O365 Customer Fabric NRT – Tenant & User insights BingNRT Operational Intelligence Presto (Fast SML) interactive analysis Delve Analytics 0 10 20 30 40 50 60 Throughput(inGBps) Siphon Data Volume (Ingress and Egress) Volume published (GBps) Volume subscribed (GBps) Total Volume (GBps) 0 5 10 15 20 25 Throughput(eventspersec)Millions Siphon Events per second (Ingress and Egress) EPS In Eps Out Total EPS
  • 3. Siphon Architecture Asia DC Zookeeper Canary Kafka Collector Agent Services Data Pull (Agent) Services Data Push Device Proxy Services Consumer API (Push/ Pull) Europe DC Zookeeper Canary Kafka US DC Zookeeper Canary Kafka Streaming Batch Audit Trail Open Source Microsoft Internal Siphon
  • 4. On Autopilot! Kafka Cluster Storage Management A nightmare today!
  • 5. The Problem - Unbalanced Disk and Machine usage Machine 1 Machine 3Machine 2 Disk 1 Disk 1Disk 1 Disk 2 Disk 2Disk 2 Partitions with intense IO New disk added to the machine New machine added to the cluster
  • 6. Disk 1 Disk 2 Disk 3 T1-P1 T2-P2 T2-P3 T1-P2 T2-P1 * Disk-3 is a newly added disk and we could move some partitions there. * If Topic T1 is a higher IO demanding topic, then prefer to put T1-P1 and T1-P2 on separate drives. Closer look: Imbalance inside a Broker
  • 7. Assuming: 1) All disks are similar 2) All partitions of a topic are equally IO demanding Solution Just before broker start { Get alphabetically sorted list of all local kafka directories Put them on the list of disks in a round robin fashion } Ensures: 1) Partitions of the same Topic go to different drives 2) All disks get equal share of directories * This method doesn’t cover all scenarios, but does a decent job. Two heavy throughput partitions could still end up on the same disk. Closer look: Imbalance inside a Broker
  • 8. Disk 1 Disk 2 Disk 3 T1-P1 T2-P2 T2-P3T1-P2 T2-P1 * Disk-3 is a newly added disk and we could move some partitions there. * If Topic T1 is a higher IO demanding topic, then prefer to put T1-P1 and T1-P2 on separate drives. Closer look: Imbalance inside a Broker solved
  • 9. Broker-1 Broker-3 T1-P1 T2-P1 T3-P1 T3-P2 Broker-2 T1-P2 T2-P2 * Broker-3 is a newly added broker to the cluster. * T3 was created when Broker-2 was down. Closer look: Imbalance across machines
  • 10. • The static approach (usually has the following wrong assumptions): Assuming heterogeneous topics’ partitions will show homogenous throughput characteristics. Number of partitions for a topic is in the control of the Cluster manager (Operations team). All machines in the cluster are of the same configuration Closer look: Imbalance across machines
  • 11. Broker-1 Broker-3 T1-P1 Broker-2 T1-P2 T2-P2T2-P1 * Equal partitions across machines isn’t enough to achieve fair load * Perhaps T3-P1 is very IO intensive * Perhaps Broker-1 is of low hardware configuration Closer look: Imbalance across machines T3-P1 Broker-2 Broker-1 T1-P1 T1-P2 T2-P2 T2-P1 T3-P1 Broker-2
  • 12. • The dynamic approach: Since a statically defined approach didn’t work, we need a dynamic approach… Next, we will discuss the dynamic approach (which I call the “Adoption Marketplace”) Closer look: Imbalance across machines
  • 14. An Adoption Marketplace Broker-1 Broker-3 Adoption Ads (First come first serve) Item: Topic1- Partition1 Requires: 2 MBPS at peak Broker-2
  • 15. An Adoption Marketplace • The (POC) logic/tool runs on each broker independently • The logic is completely distributed, but needs co-ordination. Zookeeper is leveraged here.
  • 16. An Adoption Marketplace • Advertisement format: { Version: 1.0 Item: TopicA-PartitionB, ResourcesRequired: [ {ResourceName:”X”, ResourceQty: X1}, {ResourceName:”Y”, ResourceQty: Y1}, … ] } Example (Advertise to give away Topic1’s partition 1): { Version: 1.0 Item: “Topic1-1”, ResourcesRequired: [ {ResourceName:”PeakMBPS”, ResourceQty: 2} ] } Versioning allows future enhancements to take place seamlessly
  • 17. An Adoption Marketplace • The Interface public interface IAdoptionLogic { // Individual Developers need to implement/perfect this based on their need Partition findLocalPartitionToGiveOut() throws Exception; // Individual Developers need to implement/perfect this based on their need Partition findRemotePartitionToTakeIn()throws Exception; // This method will be a zookeeper backed implementation out of the box void advertisePartitionForAdoption(Partition partitionToGiveOut)throws Exception; // This method will be a zookeeper backed implementation out of the box void adoptRemotePartition(Partition partitionToTakeIn)throws Exception; }
  • 18. An Adoption Marketplace • LOOP START: Find any local partition to be given away Post the Ad and wait for its adoption Find any Ads from others for adoption and check your eligibility Lock on an Ad and adopt it if you are eligible GOTO LOOP START
  • 19. Proof of Concept Experiment – The logic The logic to put/take partitions for adoption was kept straight forward: 1) findLocalPartitionToGiveOut() If a broker sees that it has more partitions for a topic than the Ceil((Partitions * Replication-factor) / total brokers in cluster), then it puts a partition of that topic for adoption 2) adoptRemotePartition() If a broker has less partitions for a topic than the Ceil((Partitions * Replication-factor) / total brokers in cluster), and it sees an advertisement for such a partition, then it tries to adopt it.
  • 20. Proof of Concept Experiment – Result Cluster with 3 brokers Before case (completely skewed topic with all partitions on one broker): Topic:topic1 PartitionCount:10 ReplicationFactor:1 Configs: Topic: topic1 Partition: 0 Leader: 169595708 Replicas: 169595708 Isr: 169595708 Topic: topic1 Partition: 1 Leader: 169595708 Replicas: 169595708 Isr: 169595708 Topic: topic1 Partition: 2 Leader: 169595708 Replicas: 169595708 Isr: 169595708 Topic: topic1 Partition: 3 Leader: 169595708 Replicas: 169595708 Isr: 169595708 Topic: topic1 Partition: 4 Leader: 169595708 Replicas: 169595708 Isr: 169595708 Topic: topic1 Partition: 5 Leader: 169595708 Replicas: 169595708 Isr: 169595708 Topic: topic1 Partition: 6 Leader: 169595708 Replicas: 169595708 Isr: 169595708 Topic: topic1 Partition: 7 Leader: 169595708 Replicas: 169595708 Isr: 169595708 Topic: topic1 Partition: 8 Leader: 169595708 Replicas: 169595708 Isr: 169595708 Topic: topic1 Partition: 9 Leader: 169595708 Replicas: 169595708 Isr: 169595708
  • 21. Proof of Concept Experiment – Result After case (running the tool in background yielded an uniform distribution eventually): Topic:topic1 PartitionCount:10 ReplicationFactor:1 Configs: Topic: topic1 Partition: 0 Leader: 169595708 Replicas: 169595708 Isr: 169595708 Topic: topic1 Partition: 1 Leader: 169595708 Replicas: 169595708 Isr: 169595708 Topic: topic1 Partition: 2 Leader: 177775588 Replicas: 177775588 Isr: 177775588 Topic: topic1 Partition: 3 Leader: 169595708 Replicas: 169595708 Isr: 169595708 Topic: topic1 Partition: 4 Leader: 169595679 Replicas: 169595679 Isr: 169595679 Topic: topic1 Partition: 5 Leader: 177775588 Replicas: 177775588 Isr: 177775588 Topic: topic1 Partition: 6 Leader: 177775588 Replicas: 177775588 Isr: 177775588 Topic: topic1 Partition: 7 Leader: 169595708 Replicas: 169595708 Isr: 169595708 Topic: topic1 Partition: 8 Leader: 169595679 Replicas: 169595679 Isr: 169595679 Topic: topic1 Partition: 9 Leader: 169595679 Replicas: 169595679 Isr: 169595679
  • 22. An Adoption Marketplace Benefits: 1) Kafka Reassignment command runs continuously throughout the cluster. 2) Older partitions can spread to the new machines without any manual operations. 3) The advertisements can be monitored. If there are no adopters, then it is time to add more machines. 4) The logic to determine which partitions to put for/take in for adoptions could be constantly improved, and will be dependent on ones environment and use case.
  • 23. Proof of Concept Experiment – Code Github: https://github.com/Microsoft/Cluster-Partition-Rebalancer-For-Kafka