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 de 53

Recomendados

Adding Value in the Cloud with Performance Test por
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 vistas41 diapositivas
Benchmarking NGINX for Accuracy and Results por
Benchmarking NGINX for Accuracy and ResultsBenchmarking NGINX for Accuracy and Results
Benchmarking NGINX for Accuracy and ResultsNGINX, Inc.
2.8K vistas28 diapositivas
Performance Testing Overview por
Performance Testing OverviewPerformance Testing Overview
Performance Testing OverviewJames Venetsanakos
1.1K vistas26 diapositivas
DrupalCamp LA 2014 - A Perfect Launch, Every Time por
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 vistas43 diapositivas
Performance tuning Grails applications SpringOne 2GX 2014 por
Performance tuning Grails applications SpringOne 2GX 2014Performance tuning Grails applications SpringOne 2GX 2014
Performance tuning Grails applications SpringOne 2GX 2014Lari Hotari
3.7K vistas49 diapositivas
Integration strategies best practices- Mulesoft meetup April 2018 por
Integration strategies   best practices- Mulesoft meetup April 2018Integration strategies   best practices- Mulesoft meetup April 2018
Integration strategies best practices- Mulesoft meetup April 2018Rohan Rasane
187 vistas28 diapositivas

Más contenido relacionado

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

Multiple Dimensions of Load Testing por
Multiple Dimensions of Load TestingMultiple Dimensions of Load Testing
Multiple Dimensions of Load TestingAlexander Podelko
354 vistas48 diapositivas
Load Testing Best Practices por
Load Testing Best PracticesLoad Testing Best Practices
Load Testing Best PracticesApica
1.7K vistas28 diapositivas
July webinar l How to Handle the Holiday Retail Rush with Agile Performance T... por
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 vistas37 diapositivas
SCALE 16x on-prem container orchestrator deployment por
SCALE 16x on-prem container orchestrator deploymentSCALE 16x on-prem container orchestrator deployment
SCALE 16x on-prem container orchestrator deploymentSteve Wong
154 vistas38 diapositivas
Holiday Readiness: Best Practices for Successful Holiday Readiness Testing por
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 vistas34 diapositivas
Expect the unexpected: Prepare for failures in microservices por
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 vistas67 diapositivas

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

Load Testing Best Practices por Apica
Load Testing Best PracticesLoad Testing Best Practices
Load Testing Best Practices
Apica1.7K vistas
July webinar l How to Handle the Holiday Retail Rush with Agile Performance T... por 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 vistas
SCALE 16x on-prem container orchestrator deployment por Steve Wong
SCALE 16x on-prem container orchestrator deploymentSCALE 16x on-prem container orchestrator deployment
SCALE 16x on-prem container orchestrator deployment
Steve Wong154 vistas
Holiday Readiness: Best Practices for Successful Holiday Readiness Testing por 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 vistas
Expect the unexpected: Prepare for failures in microservices por 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 vistas
Architecting with power vm por Charlie Cler
Architecting with power vmArchitecting with power vm
Architecting with power vm
Charlie Cler132 vistas
071410 sun a_1515_feldman_stephen por Steve Feldman
071410 sun a_1515_feldman_stephen071410 sun a_1515_feldman_stephen
071410 sun a_1515_feldman_stephen
Steve Feldman431 vistas
Mtc learnings from isv & enterprise interaction por Govind Kanshi
Mtc learnings from isv & enterprise  interactionMtc learnings from isv & enterprise  interaction
Mtc learnings from isv & enterprise interaction
Govind Kanshi289 vistas
Mtc learnings from isv & enterprise (dated - Dec -2014) por 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 vistas
Hadoop for the Data Scientist: Spark in Cloudera 5.5 por 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 vistas
Comprehensive Performance Testing: From Early Dev to Live Production por 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 vistas
Performance Testing por Anu Shaji
Performance TestingPerformance Testing
Performance Testing
Anu Shaji69 vistas
Tokyo AK Meetup Speedtest - Share.pdf por ssuser2ae721
Tokyo AK Meetup Speedtest - Share.pdfTokyo AK Meetup Speedtest - Share.pdf
Tokyo AK Meetup Speedtest - Share.pdf
ssuser2ae721112 vistas
Data Warehouse Optimization por Cloudera, Inc.
Data Warehouse OptimizationData Warehouse Optimization
Data Warehouse Optimization
Cloudera, Inc.5.6K vistas
Tools of the Trade: Load Testing - Ignite session at WebPerfDays NY 14 por 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 vistas
Resilience planning and how the empire strikes back por 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 vistas
Performance tuning Grails applications por Lari Hotari
Performance tuning Grails applicationsPerformance tuning Grails applications
Performance tuning Grails applications
Lari Hotari3.9K vistas
Performance testing in agile por OdessaQA
Performance testing in agilePerformance testing in agile
Performance testing in agile
OdessaQA549 vistas

Más de HostedbyConfluent

Build Real-time Machine Learning Apps on Generative AI with Kafka Streams por
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
88 vistas26 diapositivas
When Only the Last Writer Wins We All Lose: Active-Active Geo-Replication in ... por
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
52 vistas84 diapositivas
Apache Kafka's Next-Gen Rebalance Protocol: Towards More Stable and Scalable ... por
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
82 vistas97 diapositivas
Using Kafka at Scale - A Case Study of Micro Services Data Pipelines at Evern... por
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
64 vistas15 diapositivas
Rule Based Asset Management Workflow Automation at Netflix por
Rule Based Asset Management Workflow Automation at NetflixRule Based Asset Management Workflow Automation at Netflix
Rule Based Asset Management Workflow Automation at NetflixHostedbyConfluent
41 vistas56 diapositivas
Scalable E-Commerce Data Pipelines with Kafka: Real-Time Analytics, Batch, ML... por
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
71 vistas32 diapositivas

Más de HostedbyConfluent(20)

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

Último

What is Authentication Active Directory_.pptx por
What is Authentication Active Directory_.pptxWhat is Authentication Active Directory_.pptx
What is Authentication Active Directory_.pptxHeenaMehta35
15 vistas7 diapositivas
NTGapps NTG LowCode Platform por
NTGapps NTG LowCode Platform NTGapps NTG LowCode Platform
NTGapps NTG LowCode Platform Mustafa Kuğu
437 vistas30 diapositivas
"Package management in monorepos", Zoltan Kochan por
"Package management in monorepos", Zoltan Kochan"Package management in monorepos", Zoltan Kochan
"Package management in monorepos", Zoltan KochanFwdays
34 vistas18 diapositivas
Mobile Core Solutions & Successful Cases.pdf por
Mobile Core Solutions & Successful Cases.pdfMobile Core Solutions & Successful Cases.pdf
Mobile Core Solutions & Successful Cases.pdfIPLOOK Networks
14 vistas7 diapositivas
This talk was not generated with ChatGPT: how AI is changing science por
This talk was not generated with ChatGPT: how AI is changing scienceThis talk was not generated with ChatGPT: how AI is changing science
This talk was not generated with ChatGPT: how AI is changing scienceElena Simperl
32 vistas13 diapositivas
Webinar : Desperately Seeking Transformation - Part 2: Insights from leading... por
Webinar : Desperately Seeking Transformation - Part 2:  Insights from leading...Webinar : Desperately Seeking Transformation - Part 2:  Insights from leading...
Webinar : Desperately Seeking Transformation - Part 2: Insights from leading...The Digital Insurer
91 vistas52 diapositivas

Último(20)

What is Authentication Active Directory_.pptx por HeenaMehta35
What is Authentication Active Directory_.pptxWhat is Authentication Active Directory_.pptx
What is Authentication Active Directory_.pptx
HeenaMehta3515 vistas
NTGapps NTG LowCode Platform por Mustafa Kuğu
NTGapps NTG LowCode Platform NTGapps NTG LowCode Platform
NTGapps NTG LowCode Platform
Mustafa Kuğu437 vistas
"Package management in monorepos", Zoltan Kochan por Fwdays
"Package management in monorepos", Zoltan Kochan"Package management in monorepos", Zoltan Kochan
"Package management in monorepos", Zoltan Kochan
Fwdays34 vistas
Mobile Core Solutions & Successful Cases.pdf por IPLOOK Networks
Mobile Core Solutions & Successful Cases.pdfMobile Core Solutions & Successful Cases.pdf
Mobile Core Solutions & Successful Cases.pdf
IPLOOK Networks14 vistas
This talk was not generated with ChatGPT: how AI is changing science por Elena Simperl
This talk was not generated with ChatGPT: how AI is changing scienceThis talk was not generated with ChatGPT: how AI is changing science
This talk was not generated with ChatGPT: how AI is changing science
Elena Simperl32 vistas
Webinar : Desperately Seeking Transformation - Part 2: Insights from leading... por The Digital Insurer
Webinar : Desperately Seeking Transformation - Part 2:  Insights from leading...Webinar : Desperately Seeking Transformation - Part 2:  Insights from leading...
Webinar : Desperately Seeking Transformation - Part 2: Insights from leading...
"Node.js vs workers — A comparison of two JavaScript runtimes", James M Snell por Fwdays
"Node.js vs workers — A comparison of two JavaScript runtimes", James M Snell"Node.js vs workers — A comparison of two JavaScript runtimes", James M Snell
"Node.js vs workers — A comparison of two JavaScript runtimes", James M Snell
Fwdays14 vistas
PCCC23:日本AMD株式会社 テーマ2「AMD EPYC™ プロセッサーを用いたAIソリューション」 por PC Cluster Consortium
PCCC23:日本AMD株式会社 テーマ2「AMD EPYC™ プロセッサーを用いたAIソリューション」PCCC23:日本AMD株式会社 テーマ2「AMD EPYC™ プロセッサーを用いたAIソリューション」
PCCC23:日本AMD株式会社 テーマ2「AMD EPYC™ プロセッサーを用いたAIソリューション」
Redefining the book supply chain: A glimpse into the future - Tech Forum 2023 por BookNet Canada
Redefining the book supply chain: A glimpse into the future - Tech Forum 2023Redefining the book supply chain: A glimpse into the future - Tech Forum 2023
Redefining the book supply chain: A glimpse into the future - Tech Forum 2023
BookNet Canada44 vistas
Future of AR - Facebook Presentation por Rob McCarty
Future of AR - Facebook PresentationFuture of AR - Facebook Presentation
Future of AR - Facebook Presentation
Rob McCarty65 vistas
Bronack Skills - Risk Management and SRE v1.0 12-3-2023.pdf por ThomasBronack
Bronack Skills - Risk Management and SRE v1.0 12-3-2023.pdfBronack Skills - Risk Management and SRE v1.0 12-3-2023.pdf
Bronack Skills - Risk Management and SRE v1.0 12-3-2023.pdf
ThomasBronack31 vistas
The Power of Generative AI in Accelerating No Code Adoption.pdf por Saeed Al Dhaheri
The Power of Generative AI in Accelerating No Code Adoption.pdfThe Power of Generative AI in Accelerating No Code Adoption.pdf
The Power of Generative AI in Accelerating No Code Adoption.pdf
Saeed Al Dhaheri39 vistas
Discover Aura Workshop (12.5.23).pdf por Neo4j
Discover Aura Workshop (12.5.23).pdfDiscover Aura Workshop (12.5.23).pdf
Discover Aura Workshop (12.5.23).pdf
Neo4j15 vistas
The Role of Patterns in the Era of Large Language Models por Yunyao Li
The Role of Patterns in the Era of Large Language ModelsThe Role of Patterns in the Era of Large Language Models
The Role of Patterns in the Era of Large Language Models
Yunyao Li91 vistas
Transcript: Redefining the book supply chain: A glimpse into the future - Tec... por BookNet Canada
Transcript: Redefining the book supply chain: A glimpse into the future - Tec...Transcript: Redefining the book supply chain: A glimpse into the future - Tec...
Transcript: Redefining the book supply chain: A glimpse into the future - Tec...
BookNet Canada41 vistas

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