Chill, Distill, No Overkill: Best Practices to Stress Test Kafka with Siva Kunapuli

Chill, Distill, No Overkill: Best Practices to Stress Test Kafka
Siva Kunapuli
About me
2
Teacher, Programmer, Engineer, Architect
• Started early, still at it
• 15+ years
• Services, Product, Consulting, Technical Account Management
Customers
• Financial services, strategic
• “Customer with a problem”
Kafkaesque
• Fail often, and learn
• Challenging to operationalize, but useful
• Around the world
3
Stress testing Kafka:
The challenge
Paradigm driven
Protocol interactions a.k.a. real-time vs. batch
Data storage vs. distribution
Distributed system - components, scale, changing
conditions
Resources
Simple, commodity, cloud
Provisioning demands vs. reality
Structure
Parameters – test design
Recordability, repeatability
Costs and SLAs
4
Stress testing Kafka:
The challenge
Paradigm driven
Protocol interactions a.k.a. real-time vs. batch
Data storage vs. distribution
Distributed system - components, scale, changing
conditions
Resources
Simple, commodity, cloud
Provisioning demands vs. reality
Structure
Parameters – test design
Recordability, repeatability
Costs and SLAs
5
Stress testing Kafka:
The challenge
Paradigm driven
Protocol interactions a.k.a. real-time vs. batch
Data storage vs. distribution
Distributed system - components, scale, changing
conditions
Resources
Simple, commodity, cloud
Provisioning demands vs. reality
Structure
Parameters – test design
Recordability, repeatability
Costs and SLAs
6
Stress testing Kafka:
The challenge
Paradigm driven
Protocol interactions a.k.a. real-time vs. batch
Data storage vs. distribution
Distributed system - components, scale, changing
conditions
Resources
Simple, commodity, cloud
Provisioning demands vs. reality
Structure
Parameters – test design
Recordability, repeatability
Costs and SLAs
01
Chill
02
Distill
03
No Overkill
04
= Stress free
stress testing
Stress testing primer
8
Robustness of setup
• Can your system handle stress gracefully?
• Does it fail where and when you’re not looking?
• What is usual, and what is unusual?
Spanning stress (i.e., not selective)
• Component/framework models – Connect, Streams, Core
• Resources rather than use case(s) – storage, IO throughput, memory, CPU
• Concurrency, data access – many clients, simulated network conditions
Mission critical
• No part is open to failure
• Use case is the driver
Stress testing primer
9
Robustness of setup
• Can your system handle stress gracefully?
• Does it fail where and when you’re not looking?
• What is usual, and what is unusual?
Spanning stress (i.e., not selective)
• Component/framework models – Connect, Streams, Core
• Resources rather than use case(s) – storage, IO throughput, memory, CPU
• Concurrency, data access – many clients, simulated network conditions
Mission critical
• No part is open to failure
• Use case is the driver
Stress testing primer
10
Robustness of setup
• Can your system handle stress gracefully?
• Does it fail where and when you’re not looking?
• What is usual, and what is unusual?
Spanning stress (i.e., not selective)
• Component/framework models – Connect, Streams, Core
• Resources rather than use case(s) – storage, IO throughput, memory, CPU
• Concurrency, data access – many clients, simulated network conditions
Mission critical
• No part is open to failure
• Use case is the driver
Stress testing primer
11
Robustness of setup
• Can your system handle stress gracefully?
• Does it fail where and when you’re not looking?
• What is usual, and what is unusual?
Spanning stress (i.e., not selective)
• Component/framework models – Connect, Streams, Core
• Resources rather than use case(s) – storage, IO throughput, memory, CPU
• Concurrency, data access – many clients, simulated network conditions
Mission critical
• No part is open to failure
• Use case is the driver
Kafka – an introduction
12
Pre-requisites
13
Concern Ready Bonus points
Environment Identified scaling procedures – adding brokers, storage Automation for scaling
Identified components – connect, streams, core Good component diagram
At least at production scale Tear down after done
Identified network setup Ping, and packet roundtrip
Benchmarks Active (normal) benchmarks published Repeating at regular intervals
Identified SLA Negotiated, and signed off
Multi-tenancy Quotas set
Observability Full cluster metrics captured, and visualized Application metrics
Pre-requisites
14
Concern Ready Bonus points
Environment Identified scaling procedures – adding brokers, storage Automation for scaling
Identified components – connect, streams, core Good component diagram
At least at production scale Tear down after done
Identified network setup Ping, and packet roundtrip
Benchmarks Active (normal) benchmarks published Repeating at regular intervals
Identified SLA Negotiated, and signed off
Multi-tenancy Quotas set
Observability Full cluster metrics captured, and visualized Application metrics
Pre-requisites
15
Concern Ready Bonus points
Environment Identified scaling procedures – adding brokers, storage Automation for scaling
Identified components – connect, streams, core Good component diagram
At least at production scale Tear down after done
Identified network setup Ping, and packet roundtrip
Benchmarks Active (normal) benchmarks published Repeating at regular intervals
Identified SLA Negotiated, and signed off
Multi-tenancy Quotas set
Observability Full cluster metrics captured, and visualized Application metrics
Pre-requisites
16
Concern Ready Bonus points
Environment Identified scaling procedures – adding brokers, storage Automation for scaling
Identified components – connect, streams, core Good component diagram
At least at production scale Tear down after done
Identified network setup Ping, and packet roundtrip
Benchmarks Active (normal) benchmarks published Repeating at regular intervals
Identified SLA Negotiated, and signed off
Multi-tenancy Quotas set
Observability Full cluster metrics captured, and visualized Application metrics
Pre-requisites continued
17
Benchmarking
• Other sessions, lightning talks
• OpenMessaging benchmark framework
• Simulate production load – multiple applications, clients, connectors, change data (CDC) etc.
Clean container environments
• No massively parallel multi-function, single purpose, all encompassing clusters
Observability
• APM tools, or DIY
• Must have – production, consumption, topic level, throughput metrics
Multi-tenancy
• Stop, and do not move forward without quotas
• Can pose challenges in separation even with quotas – cluster downtime
18
A good stress test for
Kafka
Stick to the paradigm
Request/response, topic semantics
Push data, and consume
Application is less important
Include all parameters
Component tests
High concurrency tests – race conditions
Resource tests – network, IO, CPU
Specific use cases
Break something, and recover
Change conditions
Memory leaks
19
A good stress test for
Kafka
Stick to the paradigm
Request/response, topic semantics
Push data, and consume
Application is less important
Include all parameters
Component tests
High concurrency tests – race conditions
Resource tests – network, IO, CPU
Specific use cases
Break something, and recover
Change conditions
Memory leaks
20
A good stress test for
Kafka
Stick to the paradigm
Request/response, topic semantics
Push data, and consume
Application is less important
Include all parameters
Component tests
High concurrency tests – race conditions
Resource tests – network, IO, CPU
Specific use cases
Break something, and recover
Change conditions
Memory leaks
21
A good stress test for
Kafka
Stick to the paradigm
Request/response, topic semantics
Push data, and consume
Application is less important
Include all parameters
Component tests
High concurrency tests – race conditions
Resource tests – network, IO, CPU
Specific use cases
Break something, and recover
Change conditions
Memory leaks
22
Kafka internals
23
Kafka internals continued
24
Consumer Group protocol
• Partition assignment, and subscription
• Group coordinator
• Rebalance triggers
• Offset management
Control plane
• Controller with and without KRAFT
• Topic metadata
• Replication
Topics
• Compaction
• Message keys, and partitions
Connect
• Change Data Capture
(CDC) has row, timestamp
dependency
• Database/data store
reads/writes
• Protocol shifts – Kafka to
HTTP and back.
Component tests
Streams
• Stateless vs. stateful
• Test against real topology
• Focus on changelog topics,
and state stores
• Streams application reset
tool
25
Others
• Non-Java clients may have
different concurrency
• Zookeeper/KRAFT
• Avoid Admin API tests
especially for topic
metadata, and partition
changes
• Geo-replication
• Multi-tenancy
Connect
• Change Data Capture
(CDC) has row, timestamp
dependency
• Database/data store
reads/writes
• Protocol shifts – Kafka to
HTTP and back.
Component tests
Streams
• Stateless vs. stateful
• Test against real topology
• Focus on changelog topics,
and state stores
• Streams application reset
tool
26
Others
• Non-Java clients may have
different concurrency
• Zookeeper/KRAFT
• Avoid Admin API tests
especially for topic
metadata, and partition
changes
• Geo-replication
• Multi-tenancy
Connect
• Change Data Capture
(CDC) has row, timestamp
dependency
• Database/data store
reads/writes
• Protocol shifts – Kafka to
HTTP and back.
Component tests
Streams
• Stateless vs. stateful
• Test against real topology
• Focus on changelog topics,
and state stores
• Streams application reset
tool
27
Others
• Non-Java clients may have
different concurrency
• Zookeeper/KRAFT
• Avoid Admin API tests
especially for topic
metadata, and partition
changes
• Geo-replication
• Multi-tenancy
Connect
• Change Data Capture
(CDC) has row, timestamp
dependency
• Database/data store
reads/writes
• Protocol shifts – Kafka to
HTTP and back.
Component tests
Streams
• Stateless vs. stateful
• Test against real topology
• Focus on changelog topics,
and state stores
• Streams application reset
tool
28
Others
• Non-Java clients may have
different concurrency
• Zookeeper/KRAFT
• Avoid Admin API tests
especially for topic
metadata, and partition
changes
• Geo-replication
• Multi-tenancy
High concurrency
29
Multiple producer, consumer application instances are better
• Can help establish keying/partitioning issues
• Containerization can help, but don’t go overboard
• Different network fragments i.e., different data centers, or availability zones are better
Small, numerous messages are better
• Large messages break concurrency tests and are not normal for Kafka
• Increasing, and decreasing number of messages could be part of test
Transactions/EOS
• If using Transactions API, several additional considerations including Transaction Coordinator are in play
• Exactly Once Semantics (EOS) influences stress
Race conditions
• Not enough partitions on consumer group topic(s)
• Rebalances
High concurrency
30
Multiple producer, consumer application instances are better
• Can help establish keying/partitioning issues
• Containerization can help, but don’t go overboard
• Different network fragments i.e., different data centers, or availability zones are better
Small, numerous messages are better
• Large messages break concurrency tests and are not normal for Kafka
• Increasing, and decreasing number of messages could be part of test
Transactions/EOS
• If using Transactions API, several additional considerations including Transaction Coordinator are in play
• Exactly Once Semantics (EOS) influences stress
Race conditions
• Not enough partitions on consumer group topic(s)
• Rebalances
High concurrency
31
Multiple producer, consumer application instances are better
• Can help establish keying/partitioning issues
• Containerization can help, but don’t go overboard
• Different network fragments i.e., different data centers, or availability zones are better
Small, numerous messages are better
• Large messages break concurrency tests and are not normal for Kafka
• Increasing, and decreasing number of messages could be part of test
Transactions/EOS
• If using Transactions API, several additional considerations including Transaction Coordinator are in play
• Exactly Once Semantics (EOS) influences stress
Race conditions
• Not enough partitions on consumer group topic(s)
• Rebalances
High concurrency
32
Multiple producer, consumer application instances are better
• Can help establish keying/partitioning issues
• Containerization can help, but don’t go overboard
• Different network fragments i.e., different data centers, or availability zones are better
Small, numerous messages are better
• Large messages break concurrency tests and are not normal for Kafka
• Increasing, and decreasing number of messages could be part of test
Transactions/EOS
• If using Transactions API, several additional considerations including Transaction Coordinator are in play
• Exactly Once Semantics (EOS) influences stress
Race conditions
• Not enough partitions on consumer group topic(s)
• Rebalances
High concurrency
33
Multiple producer, consumer application instances are better
• Can help establish keying/partitioning issues
• Containerization can help, but don’t go overboard
• Different network fragments i.e., different data centers, or availability zones are better
Small, numerous messages are better
• Large messages break concurrency tests and are not normal for Kafka
• Increasing, and decreasing number of messages could be part of test
Transactions/EOS
• If using Transactions API, several additional considerations including Transaction Coordinator are in play
• Exactly Once Semantics (EOS) influences stress
Race conditions
• Not enough partitions on consumer group topic(s)
• Rebalances
Resource tests
34
Resource Before test Observe
IO throughput Identify limits of storage class – device
hardware, or virtualization
Throughput should hit or exceed limit
Stage multiple devices, storage
directories
Usage of all log dirs, should increase
Allow for ongoing snapshots/backups Effects of snapshots/backups, and their failure
Network Identify provisioned capacity, ping, and
packet roundtrip
Message bytes for replication + produce/consume should
match
Network partitions known Hit all possible network fragments, and observe differences
CPU Benchmarks for various compression
types known
CPU utilization should continue to be low
If security protocol is MTLS Test with real certificates and right algorithms
Memory Must include if using streams, or
connect
JVM, and RocksDB metrics
Resource tests
35
Resource Before test Observe
IO throughput Identify limits of storage class – device
hardware, or virtualization
Throughput should hit or exceed limit
Stage multiple devices, storage
directories
Usage of all log dirs, should increase
Allow for ongoing snapshots/backups Effects of snapshots/backups, and their failure
Network Identify provisioned capacity, ping, and
packet roundtrip
Message bytes for replication + produce/consume should
match
Network partitions known Hit all possible network fragments, and observe differences
CPU Benchmarks for various compression
types known
CPU utilization should continue to be low
If security protocol is MTLS Test with real certificates and right algorithms
Memory Must include if using streams, or
connect
JVM, and RocksDB metrics
Resource tests
36
Resource Before test Observe
IO throughput Identify limits of storage class – device
hardware, or virtualization
Throughput should hit or exceed limit
Stage multiple devices, storage
directories
Usage of all log dirs, should increase
Allow for ongoing snapshots/backups Effects of snapshots/backups, and their failure
Network Identify provisioned capacity, ping, and
packet roundtrip
Message bytes for replication + produce/consume should
match
Network partitions known Hit all possible network fragments, and observe differences
CPU Benchmarks for various compression
types known
CPU utilization should continue to be low
If security protocol is MTLS Test with real certificates and right algorithms
Memory Must include if using streams, or
connect
JVM, and RocksDB metrics
Resource tests
37
Resource Before test Observe
IO throughput Identify limits of storage class – device
hardware, or virtualization
Throughput should hit or exceed limit
Stage multiple devices, storage
directories
Usage of all log dirs, should increase
Allow for ongoing snapshots/backups Effects of snapshots/backups, and their failure
Network Identify provisioned capacity, ping, and
packet roundtrip
Message bytes for replication + produce/consume should
match
Network partitions known Hit all possible network fragments, and observe differences
CPU Benchmarks for various compression
types known
CPU utilization should continue to be low
If security protocol is MTLS Test with real certificates and right algorithms
Memory Must include if using streams, or
connect
JVM, and RocksDB metrics
Resource tests
38
Resource Before test Observe
IO throughput Identify limits of storage class – device
hardware, or virtualization
Throughput should hit or exceed limit
Stage multiple devices, storage
directories
Usage of all log dirs, should increase
Allow for ongoing snapshots/backups Effects of snapshots/backups, and their failure
Network Identify provisioned capacity, ping, and
packet roundtrip
Message bytes for replication + produce/consume should
match
Network partitions known Hit all possible network fragments, and observe differences
CPU Benchmarks for various compression
types known
CPU utilization should continue to be low
If security protocol is MTLS Test with real certificates and right algorithms
Memory Must include if using streams, or
connect
JVM, and RocksDB metrics
Use case driven
39
Not every use case can cause stress
• Use case needs to be able to push structural boundaries of Kafka i.e., paradigms, components, or resources
• Criticality <> Latency <> Throughput <> Cost
Run full use case with end-to-end latency metrics
• Introduce application specific metrics, simple JMX will do
• End to end latency for critical use cases must be designed upfront, and included in SLA
• Data availability, and system boundaries must be accounted for
Production critical use cases with low latency need good infrastructure
• Purpose of stress testing is to establish system limits, not necessarily to provide insights outside of resilience
• Repeated test cycles are not substitutes for good infrastructure
• Network is usually the bottleneck
Substantial parallelism requires specific tuning
• Thousands of parallel connections while supported may create unknown system states
• Port/socket level limits, TCP and other buffers
Chaos can be fun
• Stop brokers, network
devices, and storage
devices
• Pull the plug, cord, or
anything that can be pulled
• Remove certs, change
firewall rules, and
necessary software
components
Staying calm, and breaking Kafka
Increase number of
client instances,
number of messages
• Continuous increase will
start to hit message level
latency, and throughput
• Topic level metrics like
bytes in will start to dip
• Focus on 95th percentile for
stress tests
40
For critical use cases,
identify and introduce
breaking points
• Increase number of
database rows, or remove
Hadoop partitions
• Delete state stores, backup
state stores and observe
• Where load balancers are in
play, test them for real
scenarios
Chaos can be fun
• Stop brokers, network
devices, and storage
devices
• Pull the plug, cord, or
anything that can be pulled
• Remove certs, change
firewall rules, and
necessary software
components
Staying calm, and breaking Kafka
Increase number of
client instances,
number of messages
• Continuous increase will
start to hit message level
latency, and throughput
• Topic level metrics like
bytes in will start to dip
• Focus on 95th percentile for
stress tests
41
For critical use cases,
identify and introduce
breaking points
• Increase number of
database rows, or remove
Hadoop partitions
• Delete state stores, backup
state stores and observe
• Where load balancers are in
play, test them for real
scenarios
Chaos can be fun
• Stop brokers, network
devices, and storage
devices
• Pull the plug, cord, or
anything that can be pulled
• Remove certs, change
firewall rules, and
necessary software
components
Staying calm, and breaking Kafka
Increase number of
client instances,
number of messages
• Continuous increase will
start to hit message level
latency, and throughput
• Topic level metrics like
bytes in will start to dip
• Focus on 95th percentile for
stress tests
42
For critical use cases,
identify and introduce
breaking points
• Increase number of
database rows, or remove
Hadoop partitions
• Delete state stores, backup
state stores and observe
• Where load balancers are in
play, test them for real
scenarios
Chaos can be fun
• Stop brokers, network
devices, and storage
devices
• Pull the plug, cord, or
anything that can be pulled
• Remove certs, change
firewall rules, and
necessary software
components
Staying calm, and breaking Kafka
Increase number of
client instances,
number of messages
• Continuous increase will
start to hit message level
latency, and throughput
• Topic level metrics like
bytes in will start to dip
• Focus on 95th percentile for
stress tests
43
For critical use cases,
identify and introduce
breaking points
• Increase number of
database rows, or remove
Hadoop partitions
• Delete state stores, backup
state stores and observe
• Where load balancers are in
play, test them for real
scenarios
Memory and leaks
44
Cannot say where
• Memory leaks can occur in all components
• JVM tuning is not generally required unless setting up for specific environment or use case
• Tuning likely to go overboard – think GC
Use profiler, and have runbook
• Get familiar with the usage of JVM profiler, and have ability to attach to Kafka components
• Can help with application debugging also
May be more likely for REST, and other interactions
• Kafka protocol itself doesn’t rely too much on memory
• Therefore, understand and test with the angle of where data is moving and why
45
Recording results, and
recovering
Results should be metrics
Drop or change in metrics under specific
conditions should be captured
Functional testing i.e., application changes are
interesting observations but not necessarily tied
to stress testing (except critical use cases)
Brokers should be up, retention is your
friend
Bring up any lost brokers, and recovery should be
straightforward
Topic retention will help remove any large volumes
of messages, set it to low when stress testing
Break glass
Procedures should be in place for any stress
testing. For Kafka, this may include ability to drop
and create new cluster.
46
Recording results, and
recovering
Results should be metrics
Drop or change in metrics under specific
conditions should be captured
Functional testing i.e., application changes are
interesting observations but not necessarily tied
to stress testing (except critical use cases)
Brokers should be up, retention is your
friend
Bring up any lost brokers, and recovery should be
straightforward
Topic retention will help remove any large volumes
of messages, set it to low when stress testing
Break glass
Procedures should be in place for any stress
testing. For Kafka, this may include ability to drop
and create new cluster.
47
Recording results, and
recovering
Results should be metrics
Drop or change in metrics under specific
conditions should be captured
Functional testing i.e., application changes are
interesting observations but not necessarily tied
to stress testing (except critical use cases)
Brokers should be up, retention is your
friend
Bring up any lost brokers, and recovery should be
straightforward
Topic retention will help remove any large volumes
of messages, set it to low when stress testing
Break glass
Procedures should be in place for any stress
testing. For Kafka, this may include ability to drop
and create new cluster.
48
Recording results, and
recovering
Results should be metrics
Drop or change in metrics under specific
conditions should be captured
Functional testing i.e., application changes are
interesting observations but not necessarily tied
to stress testing (except critical use cases)
Brokers should be up, retention is your
friend
Bring up any lost brokers, and recovery should be
straightforward
Topic retention will help remove any large volumes
of messages, set it to low when stress testing
Break glass
Procedures should be in place for any stress
testing. For Kafka, this may include ability to drop
and create new cluster.
Repeatability
49
Use scripts, and chaos testing
• All tests including for deploying multiple instances can be scripted
• Tie into any popular testing framework
• Think and get ready with automation, and continuous deployment during cluster build
Inheritance framework for Kafka clusters
• Top secret project which no one (including me) works on J
• Start with metrics, benchmarking, and move to stress testing
• Critical use cases cannot be built on poorly understood systems
Cloud vs. on-prem
• On-prem systems are excellent candidates to do stress testing because expansion, and bug fixing takes longer
• Patching of cloud instances is also a good opportunity to repeat
• Automation will help in both cases
50
Scenario illustrations, and exercise
Sensor data from
multiple devices
• Thousands of devices
sending data to cluster
• Some are real-time
requiring immediate
response, others send large
batches
• Messages need to be
analyzed almost
instantaneously
Some real(ish) scenarios – design a good stress test
CDC from Oracle,
streams, high volume
• Continuously increasing
transaction volume
• Streams processing with
joins/other aggregates
• High volume (>5000
messages/sec)
51
Geo-distributed, ultra
low latency
• Cluster serves multiple
geographies
• Requires ultra-low latency
for messages (<10
milliseconds)
• Volume is low, but will
increase as cluster adoption
increases
52
Questions
Thank you!
Siva Kunapuli
1 sur 53

Recommandé

Adding Value in the Cloud with Performance Test par
Adding Value in the Cloud with Performance TestAdding Value in the Cloud with Performance Test
Adding Value in the Cloud with Performance TestRodolfo Kohn
1.1K vues41 diapositives
Benchmarking NGINX for Accuracy and Results par
Benchmarking NGINX for Accuracy and ResultsBenchmarking NGINX for Accuracy and Results
Benchmarking NGINX for Accuracy and ResultsNGINX, Inc.
2.8K vues28 diapositives
Performance Testing Overview par
Performance Testing OverviewPerformance Testing Overview
Performance Testing OverviewJames Venetsanakos
1.1K vues26 diapositives
DrupalCamp LA 2014 - A Perfect Launch, Every Time par
DrupalCamp LA 2014 - A Perfect Launch, Every TimeDrupalCamp LA 2014 - A Perfect Launch, Every Time
DrupalCamp LA 2014 - A Perfect Launch, Every TimeSuzanne Aldrich
579 vues43 diapositives
Performance tuning Grails applications SpringOne 2GX 2014 par
Performance tuning Grails applications SpringOne 2GX 2014Performance tuning Grails applications SpringOne 2GX 2014
Performance tuning Grails applications SpringOne 2GX 2014Lari Hotari
3.7K vues49 diapositives
Integration strategies best practices- Mulesoft meetup April 2018 par
Integration strategies   best practices- Mulesoft meetup April 2018Integration strategies   best practices- Mulesoft meetup April 2018
Integration strategies best practices- Mulesoft meetup April 2018Rohan Rasane
186 vues28 diapositives

Contenu connexe

Similaire à Chill, Distill, No Overkill: Best Practices to Stress Test Kafka with Siva Kunapuli

Multiple Dimensions of Load Testing par
Multiple Dimensions of Load TestingMultiple Dimensions of Load Testing
Multiple Dimensions of Load TestingAlexander Podelko
354 vues48 diapositives
Load Testing Best Practices par
Load Testing Best PracticesLoad Testing Best Practices
Load Testing Best PracticesApica
1.7K vues28 diapositives
July webinar l How to Handle the Holiday Retail Rush with Agile Performance T... par
July webinar l How to Handle the Holiday Retail Rush with Agile Performance T...July webinar l How to Handle the Holiday Retail Rush with Agile Performance T...
July webinar l How to Handle the Holiday Retail Rush with Agile Performance T...Apica
162 vues37 diapositives
SCALE 16x on-prem container orchestrator deployment par
SCALE 16x on-prem container orchestrator deploymentSCALE 16x on-prem container orchestrator deployment
SCALE 16x on-prem container orchestrator deploymentSteve Wong
154 vues38 diapositives
Holiday Readiness: Best Practices for Successful Holiday Readiness Testing par
Holiday Readiness: Best Practices for Successful Holiday Readiness TestingHoliday Readiness: Best Practices for Successful Holiday Readiness Testing
Holiday Readiness: Best Practices for Successful Holiday Readiness TestingApica
506 vues34 diapositives
Expect the unexpected: Prepare for failures in microservices par
Expect the unexpected: Prepare for failures in microservicesExpect the unexpected: Prepare for failures in microservices
Expect the unexpected: Prepare for failures in microservicesBhakti Mehta
9.8K vues67 diapositives

Similaire à Chill, Distill, No Overkill: Best Practices to Stress Test Kafka with Siva Kunapuli(20)

Load Testing Best Practices par Apica
Load Testing Best PracticesLoad Testing Best Practices
Load Testing Best Practices
Apica1.7K vues
July webinar l How to Handle the Holiday Retail Rush with Agile Performance T... par Apica
July webinar l How to Handle the Holiday Retail Rush with Agile Performance T...July webinar l How to Handle the Holiday Retail Rush with Agile Performance T...
July webinar l How to Handle the Holiday Retail Rush with Agile Performance T...
Apica162 vues
SCALE 16x on-prem container orchestrator deployment par Steve Wong
SCALE 16x on-prem container orchestrator deploymentSCALE 16x on-prem container orchestrator deployment
SCALE 16x on-prem container orchestrator deployment
Steve Wong154 vues
Holiday Readiness: Best Practices for Successful Holiday Readiness Testing par Apica
Holiday Readiness: Best Practices for Successful Holiday Readiness TestingHoliday Readiness: Best Practices for Successful Holiday Readiness Testing
Holiday Readiness: Best Practices for Successful Holiday Readiness Testing
Apica506 vues
Expect the unexpected: Prepare for failures in microservices par Bhakti Mehta
Expect the unexpected: Prepare for failures in microservicesExpect the unexpected: Prepare for failures in microservices
Expect the unexpected: Prepare for failures in microservices
Bhakti Mehta9.8K vues
Architecting with power vm par Charlie Cler
Architecting with power vmArchitecting with power vm
Architecting with power vm
Charlie Cler132 vues
071410 sun a_1515_feldman_stephen par Steve Feldman
071410 sun a_1515_feldman_stephen071410 sun a_1515_feldman_stephen
071410 sun a_1515_feldman_stephen
Steve Feldman431 vues
Mtc learnings from isv & enterprise interaction par Govind Kanshi
Mtc learnings from isv & enterprise  interactionMtc learnings from isv & enterprise  interaction
Mtc learnings from isv & enterprise interaction
Govind Kanshi289 vues
Mtc learnings from isv & enterprise (dated - Dec -2014) par Govind Kanshi
Mtc learnings from isv & enterprise (dated - Dec -2014)Mtc learnings from isv & enterprise (dated - Dec -2014)
Mtc learnings from isv & enterprise (dated - Dec -2014)
Govind Kanshi389 vues
Hadoop for the Data Scientist: Spark in Cloudera 5.5 par Cloudera, Inc.
Hadoop for the Data Scientist: Spark in Cloudera 5.5Hadoop for the Data Scientist: Spark in Cloudera 5.5
Hadoop for the Data Scientist: Spark in Cloudera 5.5
Cloudera, Inc.3.8K vues
Comprehensive Performance Testing: From Early Dev to Live Production par TechWell
Comprehensive Performance Testing: From Early Dev to Live ProductionComprehensive Performance Testing: From Early Dev to Live Production
Comprehensive Performance Testing: From Early Dev to Live Production
TechWell140 vues
Performance Testing par Anu Shaji
Performance TestingPerformance Testing
Performance Testing
Anu Shaji67 vues
Tokyo AK Meetup Speedtest - Share.pdf par ssuser2ae721
Tokyo AK Meetup Speedtest - Share.pdfTokyo AK Meetup Speedtest - Share.pdf
Tokyo AK Meetup Speedtest - Share.pdf
ssuser2ae721112 vues
Tools of the Trade: Load Testing - Ignite session at WebPerfDays NY 14 par Alexander Podelko
Tools of the Trade: Load Testing -  Ignite session at WebPerfDays NY 14Tools of the Trade: Load Testing -  Ignite session at WebPerfDays NY 14
Tools of the Trade: Load Testing - Ignite session at WebPerfDays NY 14
Alexander Podelko1.8K vues
Resilience planning and how the empire strikes back par Bhakti Mehta
Resilience planning and how the empire strikes backResilience planning and how the empire strikes back
Resilience planning and how the empire strikes back
Bhakti Mehta382 vues
Performance tuning Grails applications par Lari Hotari
Performance tuning Grails applicationsPerformance tuning Grails applications
Performance tuning Grails applications
Lari Hotari3.9K vues
Performance testing in agile par OdessaQA
Performance testing in agilePerformance testing in agile
Performance testing in agile
OdessaQA549 vues

Plus de HostedbyConfluent

Build Real-time Machine Learning Apps on Generative AI with Kafka Streams par
Build Real-time Machine Learning Apps on Generative AI with Kafka StreamsBuild Real-time Machine Learning Apps on Generative AI with Kafka Streams
Build Real-time Machine Learning Apps on Generative AI with Kafka StreamsHostedbyConfluent
62 vues26 diapositives
When Only the Last Writer Wins We All Lose: Active-Active Geo-Replication in ... par
When Only the Last Writer Wins We All Lose: Active-Active Geo-Replication in ...When Only the Last Writer Wins We All Lose: Active-Active Geo-Replication in ...
When Only the Last Writer Wins We All Lose: Active-Active Geo-Replication in ...HostedbyConfluent
26 vues84 diapositives
Apache Kafka's Next-Gen Rebalance Protocol: Towards More Stable and Scalable ... par
Apache Kafka's Next-Gen Rebalance Protocol: Towards More Stable and Scalable ...Apache Kafka's Next-Gen Rebalance Protocol: Towards More Stable and Scalable ...
Apache Kafka's Next-Gen Rebalance Protocol: Towards More Stable and Scalable ...HostedbyConfluent
55 vues97 diapositives
Using Kafka at Scale - A Case Study of Micro Services Data Pipelines at Evern... par
Using Kafka at Scale - A Case Study of Micro Services Data Pipelines at Evern...Using Kafka at Scale - A Case Study of Micro Services Data Pipelines at Evern...
Using Kafka at Scale - A Case Study of Micro Services Data Pipelines at Evern...HostedbyConfluent
50 vues15 diapositives
Rule Based Asset Management Workflow Automation at Netflix par
Rule Based Asset Management Workflow Automation at NetflixRule Based Asset Management Workflow Automation at Netflix
Rule Based Asset Management Workflow Automation at NetflixHostedbyConfluent
31 vues56 diapositives
Scalable E-Commerce Data Pipelines with Kafka: Real-Time Analytics, Batch, ML... par
Scalable E-Commerce Data Pipelines with Kafka: Real-Time Analytics, Batch, ML...Scalable E-Commerce Data Pipelines with Kafka: Real-Time Analytics, Batch, ML...
Scalable E-Commerce Data Pipelines with Kafka: Real-Time Analytics, Batch, ML...HostedbyConfluent
56 vues32 diapositives

Plus de HostedbyConfluent(20)

Build Real-time Machine Learning Apps on Generative AI with Kafka Streams par HostedbyConfluent
Build Real-time Machine Learning Apps on Generative AI with Kafka StreamsBuild Real-time Machine Learning Apps on Generative AI with Kafka Streams
Build Real-time Machine Learning Apps on Generative AI with Kafka Streams
When Only the Last Writer Wins We All Lose: Active-Active Geo-Replication in ... par HostedbyConfluent
When Only the Last Writer Wins We All Lose: Active-Active Geo-Replication in ...When Only the Last Writer Wins We All Lose: Active-Active Geo-Replication in ...
When Only the Last Writer Wins We All Lose: Active-Active Geo-Replication in ...
Apache Kafka's Next-Gen Rebalance Protocol: Towards More Stable and Scalable ... par HostedbyConfluent
Apache Kafka's Next-Gen Rebalance Protocol: Towards More Stable and Scalable ...Apache Kafka's Next-Gen Rebalance Protocol: Towards More Stable and Scalable ...
Apache Kafka's Next-Gen Rebalance Protocol: Towards More Stable and Scalable ...
Using Kafka at Scale - A Case Study of Micro Services Data Pipelines at Evern... par HostedbyConfluent
Using Kafka at Scale - A Case Study of Micro Services Data Pipelines at Evern...Using Kafka at Scale - A Case Study of Micro Services Data Pipelines at Evern...
Using Kafka at Scale - A Case Study of Micro Services Data Pipelines at Evern...
Rule Based Asset Management Workflow Automation at Netflix par HostedbyConfluent
Rule Based Asset Management Workflow Automation at NetflixRule Based Asset Management Workflow Automation at Netflix
Rule Based Asset Management Workflow Automation at Netflix
Scalable E-Commerce Data Pipelines with Kafka: Real-Time Analytics, Batch, ML... par HostedbyConfluent
Scalable E-Commerce Data Pipelines with Kafka: Real-Time Analytics, Batch, ML...Scalable E-Commerce Data Pipelines with Kafka: Real-Time Analytics, Batch, ML...
Scalable E-Commerce Data Pipelines with Kafka: Real-Time Analytics, Batch, ML...
Indeed Flex: The Story of a Revolutionary Recruitment Platform par HostedbyConfluent
Indeed Flex: The Story of a Revolutionary Recruitment PlatformIndeed Flex: The Story of a Revolutionary Recruitment Platform
Indeed Flex: The Story of a Revolutionary Recruitment Platform
Forecasting Kafka Lag Issues with Machine Learning par HostedbyConfluent
Forecasting Kafka Lag Issues with Machine LearningForecasting Kafka Lag Issues with Machine Learning
Forecasting Kafka Lag Issues with Machine Learning
Getting Under the Hood of Kafka Streams: Optimizing Storage Engines to Tune U... par HostedbyConfluent
Getting Under the Hood of Kafka Streams: Optimizing Storage Engines to Tune U...Getting Under the Hood of Kafka Streams: Optimizing Storage Engines to Tune U...
Getting Under the Hood of Kafka Streams: Optimizing Storage Engines to Tune U...
Maximizing Real-Time Data Processing with Apache Kafka and InfluxDB: A Compre... par HostedbyConfluent
Maximizing Real-Time Data Processing with Apache Kafka and InfluxDB: A Compre...Maximizing Real-Time Data Processing with Apache Kafka and InfluxDB: A Compre...
Maximizing Real-Time Data Processing with Apache Kafka and InfluxDB: A Compre...
Accelerating Path to Production for Generative AI-powered Applications par HostedbyConfluent
Accelerating Path to Production for Generative AI-powered ApplicationsAccelerating Path to Production for Generative AI-powered Applications
Accelerating Path to Production for Generative AI-powered Applications
Optimize Costs and Scale Your Streaming Applications with Virtually Unlimited... par HostedbyConfluent
Optimize Costs and Scale Your Streaming Applications with Virtually Unlimited...Optimize Costs and Scale Your Streaming Applications with Virtually Unlimited...
Optimize Costs and Scale Your Streaming Applications with Virtually Unlimited...
Don’t Let Degradation Bring You Down: Automatically Detect & Remediate Degrad... par HostedbyConfluent
Don’t Let Degradation Bring You Down: Automatically Detect & Remediate Degrad...Don’t Let Degradation Bring You Down: Automatically Detect & Remediate Degrad...
Don’t Let Degradation Bring You Down: Automatically Detect & Remediate Degrad...
Go Big or Go Home: Approaching Kafka Replication at Scale par HostedbyConfluent
Go Big or Go Home: Approaching Kafka Replication at ScaleGo Big or Go Home: Approaching Kafka Replication at Scale
Go Big or Go Home: Approaching Kafka Replication at Scale
What's in store? Part Deux; Creating Custom Queries with Kafka Streams IQv2 par HostedbyConfluent
What's in store? Part Deux; Creating Custom Queries with Kafka Streams IQv2What's in store? Part Deux; Creating Custom Queries with Kafka Streams IQv2
What's in store? Part Deux; Creating Custom Queries with Kafka Streams IQv2
A Trifecta of Real-Time Applications: Apache Kafka, Flink, and Druid par HostedbyConfluent
A Trifecta of Real-Time Applications: Apache Kafka, Flink, and DruidA Trifecta of Real-Time Applications: Apache Kafka, Flink, and Druid
A Trifecta of Real-Time Applications: Apache Kafka, Flink, and Druid
From Raw Data to an Interactive Data App in an Hour: Powered by Snowpark Python par HostedbyConfluent
From Raw Data to an Interactive Data App in an Hour: Powered by Snowpark PythonFrom Raw Data to an Interactive Data App in an Hour: Powered by Snowpark Python
From Raw Data to an Interactive Data App in an Hour: Powered by Snowpark Python
Beyond Monoliths: Thrivent’s Lessons in Building a Modern Integration Archite... par HostedbyConfluent
Beyond Monoliths: Thrivent’s Lessons in Building a Modern Integration Archite...Beyond Monoliths: Thrivent’s Lessons in Building a Modern Integration Archite...
Beyond Monoliths: Thrivent’s Lessons in Building a Modern Integration Archite...
Exactly-Once Semantics Revisited: Distributed Transactions across Flink and K... par HostedbyConfluent
Exactly-Once Semantics Revisited: Distributed Transactions across Flink and K...Exactly-Once Semantics Revisited: Distributed Transactions across Flink and K...
Exactly-Once Semantics Revisited: Distributed Transactions across Flink and K...

Dernier

Vertical User Stories par
Vertical User StoriesVertical User Stories
Vertical User StoriesMoisés Armani Ramírez
12 vues16 diapositives
The Research Portal of Catalonia: Growing more (information) & more (services) par
The Research Portal of Catalonia: Growing more (information) & more (services)The Research Portal of Catalonia: Growing more (information) & more (services)
The Research Portal of Catalonia: Growing more (information) & more (services)CSUC - Consorci de Serveis Universitaris de Catalunya
79 vues25 diapositives
Lilypad @ Labweek, Istanbul, 2023.pdf par
Lilypad @ Labweek, Istanbul, 2023.pdfLilypad @ Labweek, Istanbul, 2023.pdf
Lilypad @ Labweek, Istanbul, 2023.pdfAlly339821
9 vues45 diapositives
【USB韌體設計課程】精選講義節錄-USB的列舉過程_艾鍗學院 par
【USB韌體設計課程】精選講義節錄-USB的列舉過程_艾鍗學院【USB韌體設計課程】精選講義節錄-USB的列舉過程_艾鍗學院
【USB韌體設計課程】精選講義節錄-USB的列舉過程_艾鍗學院IttrainingIttraining
41 vues8 diapositives
ChatGPT and AI for Web Developers par
ChatGPT and AI for Web DevelopersChatGPT and AI for Web Developers
ChatGPT and AI for Web DevelopersMaximiliano Firtman
187 vues82 diapositives
Voice Logger - Telephony Integration Solution at Aegis par
Voice Logger - Telephony Integration Solution at AegisVoice Logger - Telephony Integration Solution at Aegis
Voice Logger - Telephony Integration Solution at AegisNirmal Sharma
31 vues1 diapositive

Dernier(20)

Lilypad @ Labweek, Istanbul, 2023.pdf par Ally339821
Lilypad @ Labweek, Istanbul, 2023.pdfLilypad @ Labweek, Istanbul, 2023.pdf
Lilypad @ Labweek, Istanbul, 2023.pdf
Ally3398219 vues
【USB韌體設計課程】精選講義節錄-USB的列舉過程_艾鍗學院 par IttrainingIttraining
【USB韌體設計課程】精選講義節錄-USB的列舉過程_艾鍗學院【USB韌體設計課程】精選講義節錄-USB的列舉過程_艾鍗學院
【USB韌體設計課程】精選講義節錄-USB的列舉過程_艾鍗學院
Voice Logger - Telephony Integration Solution at Aegis par Nirmal Sharma
Voice Logger - Telephony Integration Solution at AegisVoice Logger - Telephony Integration Solution at Aegis
Voice Logger - Telephony Integration Solution at Aegis
Nirmal Sharma31 vues
From chaos to control: Managing migrations and Microsoft 365 with ShareGate! par sammart93
From chaos to control: Managing migrations and Microsoft 365 with ShareGate!From chaos to control: Managing migrations and Microsoft 365 with ShareGate!
From chaos to control: Managing migrations and Microsoft 365 with ShareGate!
sammart939 vues
handbook for web 3 adoption.pdf par Liveplex
handbook for web 3 adoption.pdfhandbook for web 3 adoption.pdf
handbook for web 3 adoption.pdf
Liveplex22 vues
6g - REPORT.pdf par Liveplex
6g - REPORT.pdf6g - REPORT.pdf
6g - REPORT.pdf
Liveplex10 vues
STPI OctaNE CoE Brochure.pdf par madhurjyapb
STPI OctaNE CoE Brochure.pdfSTPI OctaNE CoE Brochure.pdf
STPI OctaNE CoE Brochure.pdf
madhurjyapb13 vues
GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N... par James Anderson
GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...
GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...
James Anderson66 vues
Transcript: The Details of Description Techniques tips and tangents on altern... par BookNet Canada
Transcript: The Details of Description Techniques tips and tangents on altern...Transcript: The Details of Description Techniques tips and tangents on altern...
Transcript: The Details of Description Techniques tips and tangents on altern...
BookNet Canada135 vues
1st parposal presentation.pptx par i238212
1st parposal presentation.pptx1st parposal presentation.pptx
1st parposal presentation.pptx
i2382129 vues

Chill, Distill, No Overkill: Best Practices to Stress Test Kafka with Siva Kunapuli

  • 1. Chill, Distill, No Overkill: Best Practices to Stress Test Kafka Siva Kunapuli
  • 2. About me 2 Teacher, Programmer, Engineer, Architect • Started early, still at it • 15+ years • Services, Product, Consulting, Technical Account Management Customers • Financial services, strategic • “Customer with a problem” Kafkaesque • Fail often, and learn • Challenging to operationalize, but useful • Around the world
  • 3. 3 Stress testing Kafka: The challenge Paradigm driven Protocol interactions a.k.a. real-time vs. batch Data storage vs. distribution Distributed system - components, scale, changing conditions Resources Simple, commodity, cloud Provisioning demands vs. reality Structure Parameters – test design Recordability, repeatability Costs and SLAs
  • 4. 4 Stress testing Kafka: The challenge Paradigm driven Protocol interactions a.k.a. real-time vs. batch Data storage vs. distribution Distributed system - components, scale, changing conditions Resources Simple, commodity, cloud Provisioning demands vs. reality Structure Parameters – test design Recordability, repeatability Costs and SLAs
  • 5. 5 Stress testing Kafka: The challenge Paradigm driven Protocol interactions a.k.a. real-time vs. batch Data storage vs. distribution Distributed system - components, scale, changing conditions Resources Simple, commodity, cloud Provisioning demands vs. reality Structure Parameters – test design Recordability, repeatability Costs and SLAs
  • 6. 6 Stress testing Kafka: The challenge Paradigm driven Protocol interactions a.k.a. real-time vs. batch Data storage vs. distribution Distributed system - components, scale, changing conditions Resources Simple, commodity, cloud Provisioning demands vs. reality Structure Parameters – test design Recordability, repeatability Costs and SLAs
  • 8. Stress testing primer 8 Robustness of setup • Can your system handle stress gracefully? • Does it fail where and when you’re not looking? • What is usual, and what is unusual? Spanning stress (i.e., not selective) • Component/framework models – Connect, Streams, Core • Resources rather than use case(s) – storage, IO throughput, memory, CPU • Concurrency, data access – many clients, simulated network conditions Mission critical • No part is open to failure • Use case is the driver
  • 9. Stress testing primer 9 Robustness of setup • Can your system handle stress gracefully? • Does it fail where and when you’re not looking? • What is usual, and what is unusual? Spanning stress (i.e., not selective) • Component/framework models – Connect, Streams, Core • Resources rather than use case(s) – storage, IO throughput, memory, CPU • Concurrency, data access – many clients, simulated network conditions Mission critical • No part is open to failure • Use case is the driver
  • 10. Stress testing primer 10 Robustness of setup • Can your system handle stress gracefully? • Does it fail where and when you’re not looking? • What is usual, and what is unusual? Spanning stress (i.e., not selective) • Component/framework models – Connect, Streams, Core • Resources rather than use case(s) – storage, IO throughput, memory, CPU • Concurrency, data access – many clients, simulated network conditions Mission critical • No part is open to failure • Use case is the driver
  • 11. Stress testing primer 11 Robustness of setup • Can your system handle stress gracefully? • Does it fail where and when you’re not looking? • What is usual, and what is unusual? Spanning stress (i.e., not selective) • Component/framework models – Connect, Streams, Core • Resources rather than use case(s) – storage, IO throughput, memory, CPU • Concurrency, data access – many clients, simulated network conditions Mission critical • No part is open to failure • Use case is the driver
  • 12. Kafka – an introduction 12
  • 13. Pre-requisites 13 Concern Ready Bonus points Environment Identified scaling procedures – adding brokers, storage Automation for scaling Identified components – connect, streams, core Good component diagram At least at production scale Tear down after done Identified network setup Ping, and packet roundtrip Benchmarks Active (normal) benchmarks published Repeating at regular intervals Identified SLA Negotiated, and signed off Multi-tenancy Quotas set Observability Full cluster metrics captured, and visualized Application metrics
  • 14. Pre-requisites 14 Concern Ready Bonus points Environment Identified scaling procedures – adding brokers, storage Automation for scaling Identified components – connect, streams, core Good component diagram At least at production scale Tear down after done Identified network setup Ping, and packet roundtrip Benchmarks Active (normal) benchmarks published Repeating at regular intervals Identified SLA Negotiated, and signed off Multi-tenancy Quotas set Observability Full cluster metrics captured, and visualized Application metrics
  • 15. Pre-requisites 15 Concern Ready Bonus points Environment Identified scaling procedures – adding brokers, storage Automation for scaling Identified components – connect, streams, core Good component diagram At least at production scale Tear down after done Identified network setup Ping, and packet roundtrip Benchmarks Active (normal) benchmarks published Repeating at regular intervals Identified SLA Negotiated, and signed off Multi-tenancy Quotas set Observability Full cluster metrics captured, and visualized Application metrics
  • 16. Pre-requisites 16 Concern Ready Bonus points Environment Identified scaling procedures – adding brokers, storage Automation for scaling Identified components – connect, streams, core Good component diagram At least at production scale Tear down after done Identified network setup Ping, and packet roundtrip Benchmarks Active (normal) benchmarks published Repeating at regular intervals Identified SLA Negotiated, and signed off Multi-tenancy Quotas set Observability Full cluster metrics captured, and visualized Application metrics
  • 17. Pre-requisites continued 17 Benchmarking • Other sessions, lightning talks • OpenMessaging benchmark framework • Simulate production load – multiple applications, clients, connectors, change data (CDC) etc. Clean container environments • No massively parallel multi-function, single purpose, all encompassing clusters Observability • APM tools, or DIY • Must have – production, consumption, topic level, throughput metrics Multi-tenancy • Stop, and do not move forward without quotas • Can pose challenges in separation even with quotas – cluster downtime
  • 18. 18 A good stress test for Kafka Stick to the paradigm Request/response, topic semantics Push data, and consume Application is less important Include all parameters Component tests High concurrency tests – race conditions Resource tests – network, IO, CPU Specific use cases Break something, and recover Change conditions Memory leaks
  • 19. 19 A good stress test for Kafka Stick to the paradigm Request/response, topic semantics Push data, and consume Application is less important Include all parameters Component tests High concurrency tests – race conditions Resource tests – network, IO, CPU Specific use cases Break something, and recover Change conditions Memory leaks
  • 20. 20 A good stress test for Kafka Stick to the paradigm Request/response, topic semantics Push data, and consume Application is less important Include all parameters Component tests High concurrency tests – race conditions Resource tests – network, IO, CPU Specific use cases Break something, and recover Change conditions Memory leaks
  • 21. 21 A good stress test for Kafka Stick to the paradigm Request/response, topic semantics Push data, and consume Application is less important Include all parameters Component tests High concurrency tests – race conditions Resource tests – network, IO, CPU Specific use cases Break something, and recover Change conditions Memory leaks
  • 22. 22
  • 24. Kafka internals continued 24 Consumer Group protocol • Partition assignment, and subscription • Group coordinator • Rebalance triggers • Offset management Control plane • Controller with and without KRAFT • Topic metadata • Replication Topics • Compaction • Message keys, and partitions
  • 25. Connect • Change Data Capture (CDC) has row, timestamp dependency • Database/data store reads/writes • Protocol shifts – Kafka to HTTP and back. Component tests Streams • Stateless vs. stateful • Test against real topology • Focus on changelog topics, and state stores • Streams application reset tool 25 Others • Non-Java clients may have different concurrency • Zookeeper/KRAFT • Avoid Admin API tests especially for topic metadata, and partition changes • Geo-replication • Multi-tenancy
  • 26. Connect • Change Data Capture (CDC) has row, timestamp dependency • Database/data store reads/writes • Protocol shifts – Kafka to HTTP and back. Component tests Streams • Stateless vs. stateful • Test against real topology • Focus on changelog topics, and state stores • Streams application reset tool 26 Others • Non-Java clients may have different concurrency • Zookeeper/KRAFT • Avoid Admin API tests especially for topic metadata, and partition changes • Geo-replication • Multi-tenancy
  • 27. Connect • Change Data Capture (CDC) has row, timestamp dependency • Database/data store reads/writes • Protocol shifts – Kafka to HTTP and back. Component tests Streams • Stateless vs. stateful • Test against real topology • Focus on changelog topics, and state stores • Streams application reset tool 27 Others • Non-Java clients may have different concurrency • Zookeeper/KRAFT • Avoid Admin API tests especially for topic metadata, and partition changes • Geo-replication • Multi-tenancy
  • 28. Connect • Change Data Capture (CDC) has row, timestamp dependency • Database/data store reads/writes • Protocol shifts – Kafka to HTTP and back. Component tests Streams • Stateless vs. stateful • Test against real topology • Focus on changelog topics, and state stores • Streams application reset tool 28 Others • Non-Java clients may have different concurrency • Zookeeper/KRAFT • Avoid Admin API tests especially for topic metadata, and partition changes • Geo-replication • Multi-tenancy
  • 29. High concurrency 29 Multiple producer, consumer application instances are better • Can help establish keying/partitioning issues • Containerization can help, but don’t go overboard • Different network fragments i.e., different data centers, or availability zones are better Small, numerous messages are better • Large messages break concurrency tests and are not normal for Kafka • Increasing, and decreasing number of messages could be part of test Transactions/EOS • If using Transactions API, several additional considerations including Transaction Coordinator are in play • Exactly Once Semantics (EOS) influences stress Race conditions • Not enough partitions on consumer group topic(s) • Rebalances
  • 30. High concurrency 30 Multiple producer, consumer application instances are better • Can help establish keying/partitioning issues • Containerization can help, but don’t go overboard • Different network fragments i.e., different data centers, or availability zones are better Small, numerous messages are better • Large messages break concurrency tests and are not normal for Kafka • Increasing, and decreasing number of messages could be part of test Transactions/EOS • If using Transactions API, several additional considerations including Transaction Coordinator are in play • Exactly Once Semantics (EOS) influences stress Race conditions • Not enough partitions on consumer group topic(s) • Rebalances
  • 31. High concurrency 31 Multiple producer, consumer application instances are better • Can help establish keying/partitioning issues • Containerization can help, but don’t go overboard • Different network fragments i.e., different data centers, or availability zones are better Small, numerous messages are better • Large messages break concurrency tests and are not normal for Kafka • Increasing, and decreasing number of messages could be part of test Transactions/EOS • If using Transactions API, several additional considerations including Transaction Coordinator are in play • Exactly Once Semantics (EOS) influences stress Race conditions • Not enough partitions on consumer group topic(s) • Rebalances
  • 32. High concurrency 32 Multiple producer, consumer application instances are better • Can help establish keying/partitioning issues • Containerization can help, but don’t go overboard • Different network fragments i.e., different data centers, or availability zones are better Small, numerous messages are better • Large messages break concurrency tests and are not normal for Kafka • Increasing, and decreasing number of messages could be part of test Transactions/EOS • If using Transactions API, several additional considerations including Transaction Coordinator are in play • Exactly Once Semantics (EOS) influences stress Race conditions • Not enough partitions on consumer group topic(s) • Rebalances
  • 33. High concurrency 33 Multiple producer, consumer application instances are better • Can help establish keying/partitioning issues • Containerization can help, but don’t go overboard • Different network fragments i.e., different data centers, or availability zones are better Small, numerous messages are better • Large messages break concurrency tests and are not normal for Kafka • Increasing, and decreasing number of messages could be part of test Transactions/EOS • If using Transactions API, several additional considerations including Transaction Coordinator are in play • Exactly Once Semantics (EOS) influences stress Race conditions • Not enough partitions on consumer group topic(s) • Rebalances
  • 34. Resource tests 34 Resource Before test Observe IO throughput Identify limits of storage class – device hardware, or virtualization Throughput should hit or exceed limit Stage multiple devices, storage directories Usage of all log dirs, should increase Allow for ongoing snapshots/backups Effects of snapshots/backups, and their failure Network Identify provisioned capacity, ping, and packet roundtrip Message bytes for replication + produce/consume should match Network partitions known Hit all possible network fragments, and observe differences CPU Benchmarks for various compression types known CPU utilization should continue to be low If security protocol is MTLS Test with real certificates and right algorithms Memory Must include if using streams, or connect JVM, and RocksDB metrics
  • 35. Resource tests 35 Resource Before test Observe IO throughput Identify limits of storage class – device hardware, or virtualization Throughput should hit or exceed limit Stage multiple devices, storage directories Usage of all log dirs, should increase Allow for ongoing snapshots/backups Effects of snapshots/backups, and their failure Network Identify provisioned capacity, ping, and packet roundtrip Message bytes for replication + produce/consume should match Network partitions known Hit all possible network fragments, and observe differences CPU Benchmarks for various compression types known CPU utilization should continue to be low If security protocol is MTLS Test with real certificates and right algorithms Memory Must include if using streams, or connect JVM, and RocksDB metrics
  • 36. Resource tests 36 Resource Before test Observe IO throughput Identify limits of storage class – device hardware, or virtualization Throughput should hit or exceed limit Stage multiple devices, storage directories Usage of all log dirs, should increase Allow for ongoing snapshots/backups Effects of snapshots/backups, and their failure Network Identify provisioned capacity, ping, and packet roundtrip Message bytes for replication + produce/consume should match Network partitions known Hit all possible network fragments, and observe differences CPU Benchmarks for various compression types known CPU utilization should continue to be low If security protocol is MTLS Test with real certificates and right algorithms Memory Must include if using streams, or connect JVM, and RocksDB metrics
  • 37. Resource tests 37 Resource Before test Observe IO throughput Identify limits of storage class – device hardware, or virtualization Throughput should hit or exceed limit Stage multiple devices, storage directories Usage of all log dirs, should increase Allow for ongoing snapshots/backups Effects of snapshots/backups, and their failure Network Identify provisioned capacity, ping, and packet roundtrip Message bytes for replication + produce/consume should match Network partitions known Hit all possible network fragments, and observe differences CPU Benchmarks for various compression types known CPU utilization should continue to be low If security protocol is MTLS Test with real certificates and right algorithms Memory Must include if using streams, or connect JVM, and RocksDB metrics
  • 38. Resource tests 38 Resource Before test Observe IO throughput Identify limits of storage class – device hardware, or virtualization Throughput should hit or exceed limit Stage multiple devices, storage directories Usage of all log dirs, should increase Allow for ongoing snapshots/backups Effects of snapshots/backups, and their failure Network Identify provisioned capacity, ping, and packet roundtrip Message bytes for replication + produce/consume should match Network partitions known Hit all possible network fragments, and observe differences CPU Benchmarks for various compression types known CPU utilization should continue to be low If security protocol is MTLS Test with real certificates and right algorithms Memory Must include if using streams, or connect JVM, and RocksDB metrics
  • 39. Use case driven 39 Not every use case can cause stress • Use case needs to be able to push structural boundaries of Kafka i.e., paradigms, components, or resources • Criticality <> Latency <> Throughput <> Cost Run full use case with end-to-end latency metrics • Introduce application specific metrics, simple JMX will do • End to end latency for critical use cases must be designed upfront, and included in SLA • Data availability, and system boundaries must be accounted for Production critical use cases with low latency need good infrastructure • Purpose of stress testing is to establish system limits, not necessarily to provide insights outside of resilience • Repeated test cycles are not substitutes for good infrastructure • Network is usually the bottleneck Substantial parallelism requires specific tuning • Thousands of parallel connections while supported may create unknown system states • Port/socket level limits, TCP and other buffers
  • 40. Chaos can be fun • Stop brokers, network devices, and storage devices • Pull the plug, cord, or anything that can be pulled • Remove certs, change firewall rules, and necessary software components Staying calm, and breaking Kafka Increase number of client instances, number of messages • Continuous increase will start to hit message level latency, and throughput • Topic level metrics like bytes in will start to dip • Focus on 95th percentile for stress tests 40 For critical use cases, identify and introduce breaking points • Increase number of database rows, or remove Hadoop partitions • Delete state stores, backup state stores and observe • Where load balancers are in play, test them for real scenarios
  • 41. Chaos can be fun • Stop brokers, network devices, and storage devices • Pull the plug, cord, or anything that can be pulled • Remove certs, change firewall rules, and necessary software components Staying calm, and breaking Kafka Increase number of client instances, number of messages • Continuous increase will start to hit message level latency, and throughput • Topic level metrics like bytes in will start to dip • Focus on 95th percentile for stress tests 41 For critical use cases, identify and introduce breaking points • Increase number of database rows, or remove Hadoop partitions • Delete state stores, backup state stores and observe • Where load balancers are in play, test them for real scenarios
  • 42. Chaos can be fun • Stop brokers, network devices, and storage devices • Pull the plug, cord, or anything that can be pulled • Remove certs, change firewall rules, and necessary software components Staying calm, and breaking Kafka Increase number of client instances, number of messages • Continuous increase will start to hit message level latency, and throughput • Topic level metrics like bytes in will start to dip • Focus on 95th percentile for stress tests 42 For critical use cases, identify and introduce breaking points • Increase number of database rows, or remove Hadoop partitions • Delete state stores, backup state stores and observe • Where load balancers are in play, test them for real scenarios
  • 43. Chaos can be fun • Stop brokers, network devices, and storage devices • Pull the plug, cord, or anything that can be pulled • Remove certs, change firewall rules, and necessary software components Staying calm, and breaking Kafka Increase number of client instances, number of messages • Continuous increase will start to hit message level latency, and throughput • Topic level metrics like bytes in will start to dip • Focus on 95th percentile for stress tests 43 For critical use cases, identify and introduce breaking points • Increase number of database rows, or remove Hadoop partitions • Delete state stores, backup state stores and observe • Where load balancers are in play, test them for real scenarios
  • 44. Memory and leaks 44 Cannot say where • Memory leaks can occur in all components • JVM tuning is not generally required unless setting up for specific environment or use case • Tuning likely to go overboard – think GC Use profiler, and have runbook • Get familiar with the usage of JVM profiler, and have ability to attach to Kafka components • Can help with application debugging also May be more likely for REST, and other interactions • Kafka protocol itself doesn’t rely too much on memory • Therefore, understand and test with the angle of where data is moving and why
  • 45. 45 Recording results, and recovering Results should be metrics Drop or change in metrics under specific conditions should be captured Functional testing i.e., application changes are interesting observations but not necessarily tied to stress testing (except critical use cases) Brokers should be up, retention is your friend Bring up any lost brokers, and recovery should be straightforward Topic retention will help remove any large volumes of messages, set it to low when stress testing Break glass Procedures should be in place for any stress testing. For Kafka, this may include ability to drop and create new cluster.
  • 46. 46 Recording results, and recovering Results should be metrics Drop or change in metrics under specific conditions should be captured Functional testing i.e., application changes are interesting observations but not necessarily tied to stress testing (except critical use cases) Brokers should be up, retention is your friend Bring up any lost brokers, and recovery should be straightforward Topic retention will help remove any large volumes of messages, set it to low when stress testing Break glass Procedures should be in place for any stress testing. For Kafka, this may include ability to drop and create new cluster.
  • 47. 47 Recording results, and recovering Results should be metrics Drop or change in metrics under specific conditions should be captured Functional testing i.e., application changes are interesting observations but not necessarily tied to stress testing (except critical use cases) Brokers should be up, retention is your friend Bring up any lost brokers, and recovery should be straightforward Topic retention will help remove any large volumes of messages, set it to low when stress testing Break glass Procedures should be in place for any stress testing. For Kafka, this may include ability to drop and create new cluster.
  • 48. 48 Recording results, and recovering Results should be metrics Drop or change in metrics under specific conditions should be captured Functional testing i.e., application changes are interesting observations but not necessarily tied to stress testing (except critical use cases) Brokers should be up, retention is your friend Bring up any lost brokers, and recovery should be straightforward Topic retention will help remove any large volumes of messages, set it to low when stress testing Break glass Procedures should be in place for any stress testing. For Kafka, this may include ability to drop and create new cluster.
  • 49. Repeatability 49 Use scripts, and chaos testing • All tests including for deploying multiple instances can be scripted • Tie into any popular testing framework • Think and get ready with automation, and continuous deployment during cluster build Inheritance framework for Kafka clusters • Top secret project which no one (including me) works on J • Start with metrics, benchmarking, and move to stress testing • Critical use cases cannot be built on poorly understood systems Cloud vs. on-prem • On-prem systems are excellent candidates to do stress testing because expansion, and bug fixing takes longer • Patching of cloud instances is also a good opportunity to repeat • Automation will help in both cases
  • 51. Sensor data from multiple devices • Thousands of devices sending data to cluster • Some are real-time requiring immediate response, others send large batches • Messages need to be analyzed almost instantaneously Some real(ish) scenarios – design a good stress test CDC from Oracle, streams, high volume • Continuously increasing transaction volume • Streams processing with joins/other aggregates • High volume (>5000 messages/sec) 51 Geo-distributed, ultra low latency • Cluster serves multiple geographies • Requires ultra-low latency for messages (<10 milliseconds) • Volume is low, but will increase as cluster adoption increases