SlideShare a Scribd company logo
Using Modular Topologies in Kafka Streams
to scale KSQL’s persistent queries
A. Sophie Blee-Goldman
Walker Carlson
@ableegoldman | sophie@confluent.io
wcarlson@confluent.io
1
Overview
• Confluent Cloud limits to 20 persistent queries per cluster.
• We re-architectured KSQL, improving the scalability
2
Road map
1. What we improved in KSQL
a. Current World
b. Old World
c. Issues
d. New World
2. How we made it possible
a. Why it’s hard
b. Why it’s possible
c. Why it’s worth it
d. What is next?
3
Terminology
• KSQL - A structured language that uses Kafka Streams to execute
• Streams Runtime - single streams client that executes a topology. A group
of these with the same applicationID makes a streams application
• Topology - A Kafka Streams program graph that is a collection of tasks
• Tasks - A unit of work in the topology. Each topic partition has a task.
4
Persistent query
Create Stream foo As Select * From bar;
* Limit of 20 on the number of these per-cluster in Confluent Cloud.
Input topic Output topic
Persistent query
~ Topology
Current World
5
Streams
Kafka Streams
Metadata
Stream Thread 1
Stream Thread 2
Stream Thread 3
Current World
6
Runtime == One Node in an Streams Application
Old architecture
KSQL
Query 1 Query 2 Query 3
Streams Streams
Streams
Persistent Query == Topology
Old World
7
Issues of scale
• Threads scale with number of Queries
• Each Threads has its own Consumer
• Assignment logic only accounts for each query
• Long start up times for Streams Runtimes
• Other various overhead
Results in a limited number of persistent queries.
8
New Architecture
Query 2 Query 3
Streams Runtime
KSQL
Persistent Query == Topology
Threads, Consumers, ect…
Query 1
New World
9
Scaling Improvements
• Queries can share Streams Runtimes
Threads
Metadata
Consumer Group
• Assignment Logic is shared
• Runtimes are already started
• Possibility for topology or state optimizations across queries
10
KSQL
Not all topologies can fit into a single runtime yet!
Pre Execution - Runtime Assignment
Runtime
Topology - A
Topology - B
New Runtime
A and B both use the
same source topic
Topology == Persistent Query
New World
11
Pre Execution - Query Validation
KSQL
Runtime 1
Runtime 2
Runtime 3
Runtime 4
Validation Runtime 3
New World
Copy of
Potential
Query’s
Topology
Sandbox
copy
Runtime == Kafka Streams Client 12
Pre Execution - Multi Cluster Assignment
Needs to go into the same runtime
New Query
Assignment:
Runtime 1
KSQL Server 1
Runtime 1
KSQL Server 2
Runtime 1
Runtime == Kafka Streams Client
Command Topic -
internal topic to keep all
KSQL servers in sync
New World
13
Why it’s hard
14
15
Otter monitoring shells == persistent query
Stream processing with Ottla
16
Otter monitoring shells == persistent query
Stream processing
+1 green
1 green shell
17
Otter monitoring shells == persistent query
Stream processing
+1 orange
1 green shell
1 orange shell
Persistent Queries
Why it’s hard
Ksql persistent query == Kafka Streams topology
What are they really?
Create Stream foo As Select * From bar;
Input topic Output topic
Persistent query
~ Topology
18
Topologies
Why it’s hard
terms_and_ conditions_events
Processor Topology
19
Input Topic
things_you_care_about
Output Topic
source
sink
filter
Topologies
Why it’s hard
20
source
sink
filter
Ksql persistent query == Kafka Streams topology
source
sink
count
shell_
count
state store
source
B
sink
join
source
A
Why it’s hard
21
Subtopology: subset of processor nodes connected by repartition topics
A
B
to sink…
Repartition topic
subtopology 1
subtopology 2
Why it’s hard
22
Kafka Streams runtime == Java application executing a processor topology
X
count
fish
Disjoint Topologies
Streams Runtime
info
X
my_store
shells
Why it’s hard
23
Disjoint topologies == subset of nodes with no edges =/= isolation
X
count
fish
Disjoint Topologies
Streams Runtime
info
OUT
my_store
shells
X
count
crabs
Why it’s hard
24
Runtimes are static & topologies are not always forwards/backwards compatible
X
count
fish
Static runtime
Streams Runtime
X
count2
crabs
?
+
Query C
info
OUT
my_store
shells
Subtopology 1 Subtopology 2
Query B
Query A
Why it’s hard
25
Runtimes are static & topologies are not always forwards/backwards compatible
X
count
fish
Static topology
Streams Runtime
X
count2
crabs
info
OUT
my_store
shells
Subtopology 1 Subtopology 3
Subtopology 2
Query A
Query C Query B
Why it’s possible
26
Modular topologies == disjoint topologies that can be dynamically added & removed
X
count
fish
Modular Topologies
Streams Runtime
info
OUT
my_store
shells
X
count
crabs
Topology C
Topology B
Topology A
Why it’s possible
27
Remember: modular topologies can’t share any source topics within a runtime!
Modular Topologies
Streams Runtime
Topic A
Topic B
Topic C
Topic D
Topic E
Why it’s possible
28
Remember: modular topologies can’t share any source topics within a runtime!
Modular Topologies
Streams Runtime
Topic A
Topic B
Topic C
Topic D
Topic E
0
1 A
A B
?
29
Stream processing
Each otter monitoring shells == 1 persistent query
NOT COOL
30
Stream processing
Each otter monitoring shells == 1 persistent query
Stream processing
Each otter monitoring shells == 1 persistent query
Why it’s worth it
Performance
Recap: old engine
● Serious issues past 20 query cliff
● Endless rebalancing*
● Throughput scales poorly
Results: New engine
● No degradation in throughput past 20 & beyond!
● No rebalancing loops
31
*Dropping out of the group – cooperative rebalancing won’t help here!
Why it’s worth it
Performance
Stateless query benchmarks (records consumed/s)
32
avg: 80474.66
min: 80438.10
max: 80511.21
(2 runs)
20 queries 100 queries
20 input topics 1 input topic 100 input topics
Non-shared
(old engine) avg: 68,025.3
min: 66741.96
max: 68977.11
(4 runs)
avg: 72,557.94
min: 66,940.67
max: 78,349.66
(4 runs)
avg: 48,553.75
min: 47,992.30
max: 49,005.56
(4 runs)
Shared
(new engine)
avg: 80,474.66
min: 80,438.10
max: 80,511.21
(2 runs)
avg: 62,037.23
min: 61,254.18
max: 62,820.27
(2 runs)
avg: 65,867.26
min: 65,654.27
max: 66,080.25
(2 run)
Why it’s worth it
Performance
Stateful query benchmarks (records consumed/s)
33
avg: 80474.66
min: 80438.10
max: 80511.21
(2 runs)
20 queries 100 queries
20 input topics 1 input topic 100 input topics
Non-shared
(old engine) avg: 13,938.41
min: 13,933.81
max: 13,943.01
(2 runs)
avg: 13,754.95
min: 13,519.31
max: 13,990.58
(2 runs)
avg: 12,669.4
min: 12660.73
max: 12678.06
(2 runs)
Shared
(new engine)
avg: 12,897.32
min: 12,419.81
max: 13,374.84
(2 runs)
avg: 10,337.91
min: 10,207.7
max: 10,468.11
(2 runs)
avg: 15,411.09
min: 14,827.35
max: 15,994.83
(2 runs)
Why it’s still going
34
Worst case: number of runtimes == number of queries!
Where next?
34
Runtime #1
Topic A
Topic B
Topic C
Topic D
Topic E
Runtime #2
35
Actual processing of shell == persistent query
More natural engine Why it’s worth it
Coming to an application near you
36
Kafka Streams users:
Want to participate in the KIP discussion?
Join the kafka dev mailing list by sending an email to
dev-subscribe@kafka.apache.org
Look out for the subject line [DISCUSS] KIP-809 in the next few days!
Coming to an application near you
37
KSQL users:
This feature is currently in EA
Contact us if you’re interested in trialing the early product
The feature will become generally available in Cloud
coming soon!
Your Apache Kafka
journey begins here
developer.confluent.io

More Related Content

What's hot

Introduction to Apache Kafka and Confluent... and why they matter
Introduction to Apache Kafka and Confluent... and why they matterIntroduction to Apache Kafka and Confluent... and why they matter
Introduction to Apache Kafka and Confluent... and why they matter
confluent
 
Kafka 101 and Developer Best Practices
Kafka 101 and Developer Best PracticesKafka 101 and Developer Best Practices
Kafka 101 and Developer Best Practices
confluent
 
Performance Tuning RocksDB for Kafka Streams' State Stores (Dhruba Borthakur,...
Performance Tuning RocksDB for Kafka Streams' State Stores (Dhruba Borthakur,...Performance Tuning RocksDB for Kafka Streams' State Stores (Dhruba Borthakur,...
Performance Tuning RocksDB for Kafka Streams' State Stores (Dhruba Borthakur,...
confluent
 
Kafka Tutorial - Introduction to Apache Kafka (Part 1)
Kafka Tutorial - Introduction to Apache Kafka (Part 1)Kafka Tutorial - Introduction to Apache Kafka (Part 1)
Kafka Tutorial - Introduction to Apache Kafka (Part 1)
Jean-Paul Azar
 
Securing Kafka
Securing Kafka Securing Kafka
Securing Kafka
confluent
 
Introduction to Apache Kafka
Introduction to Apache KafkaIntroduction to Apache Kafka
Introduction to Apache Kafka
Jeff Holoman
 
Kafka 101
Kafka 101Kafka 101
Kafka 101
Aparna Pillai
 
ksqlDB: A Stream-Relational Database System
ksqlDB: A Stream-Relational Database SystemksqlDB: A Stream-Relational Database System
ksqlDB: A Stream-Relational Database System
confluent
 
Serverless Kafka and Spark in a Multi-Cloud Lakehouse Architecture
Serverless Kafka and Spark in a Multi-Cloud Lakehouse ArchitectureServerless Kafka and Spark in a Multi-Cloud Lakehouse Architecture
Serverless Kafka and Spark in a Multi-Cloud Lakehouse Architecture
Kai Wähner
 
Apache Kafka - Martin Podval
Apache Kafka - Martin PodvalApache Kafka - Martin Podval
Apache Kafka - Martin Podval
Martin Podval
 
Kafka Streams vs. KSQL for Stream Processing on top of Apache Kafka
Kafka Streams vs. KSQL for Stream Processing on top of Apache KafkaKafka Streams vs. KSQL for Stream Processing on top of Apache Kafka
Kafka Streams vs. KSQL for Stream Processing on top of Apache Kafka
Kai Wähner
 
From Message to Cluster: A Realworld Introduction to Kafka Capacity Planning
From Message to Cluster: A Realworld Introduction to Kafka Capacity PlanningFrom Message to Cluster: A Realworld Introduction to Kafka Capacity Planning
From Message to Cluster: A Realworld Introduction to Kafka Capacity Planning
confluent
 
Introduction to apache kafka, confluent and why they matter
Introduction to apache kafka, confluent and why they matterIntroduction to apache kafka, confluent and why they matter
Introduction to apache kafka, confluent and why they matter
Paolo Castagna
 
Kafka presentation
Kafka presentationKafka presentation
Kafka presentation
Mohammed Fazuluddin
 
An Introduction to Apache Kafka
An Introduction to Apache KafkaAn Introduction to Apache Kafka
An Introduction to Apache Kafka
Amir Sedighi
 
Fundamentals of Apache Kafka
Fundamentals of Apache KafkaFundamentals of Apache Kafka
Fundamentals of Apache Kafka
Chhavi Parasher
 
Introduction To Streaming Data and Stream Processing with Apache Kafka
Introduction To Streaming Data and Stream Processing with Apache KafkaIntroduction To Streaming Data and Stream Processing with Apache Kafka
Introduction To Streaming Data and Stream Processing with Apache Kafka
confluent
 
Introduction to Apache Kafka
Introduction to Apache KafkaIntroduction to Apache Kafka
Introduction to Apache Kafka
AIMDek Technologies
 
Integrating Apache Kafka Into Your Environment
Integrating Apache Kafka Into Your EnvironmentIntegrating Apache Kafka Into Your Environment
Integrating Apache Kafka Into Your Environment
confluent
 
Kafka Security 101 and Real-World Tips
Kafka Security 101 and Real-World Tips Kafka Security 101 and Real-World Tips
Kafka Security 101 and Real-World Tips
confluent
 

What's hot (20)

Introduction to Apache Kafka and Confluent... and why they matter
Introduction to Apache Kafka and Confluent... and why they matterIntroduction to Apache Kafka and Confluent... and why they matter
Introduction to Apache Kafka and Confluent... and why they matter
 
Kafka 101 and Developer Best Practices
Kafka 101 and Developer Best PracticesKafka 101 and Developer Best Practices
Kafka 101 and Developer Best Practices
 
Performance Tuning RocksDB for Kafka Streams' State Stores (Dhruba Borthakur,...
Performance Tuning RocksDB for Kafka Streams' State Stores (Dhruba Borthakur,...Performance Tuning RocksDB for Kafka Streams' State Stores (Dhruba Borthakur,...
Performance Tuning RocksDB for Kafka Streams' State Stores (Dhruba Borthakur,...
 
Kafka Tutorial - Introduction to Apache Kafka (Part 1)
Kafka Tutorial - Introduction to Apache Kafka (Part 1)Kafka Tutorial - Introduction to Apache Kafka (Part 1)
Kafka Tutorial - Introduction to Apache Kafka (Part 1)
 
Securing Kafka
Securing Kafka Securing Kafka
Securing Kafka
 
Introduction to Apache Kafka
Introduction to Apache KafkaIntroduction to Apache Kafka
Introduction to Apache Kafka
 
Kafka 101
Kafka 101Kafka 101
Kafka 101
 
ksqlDB: A Stream-Relational Database System
ksqlDB: A Stream-Relational Database SystemksqlDB: A Stream-Relational Database System
ksqlDB: A Stream-Relational Database System
 
Serverless Kafka and Spark in a Multi-Cloud Lakehouse Architecture
Serverless Kafka and Spark in a Multi-Cloud Lakehouse ArchitectureServerless Kafka and Spark in a Multi-Cloud Lakehouse Architecture
Serverless Kafka and Spark in a Multi-Cloud Lakehouse Architecture
 
Apache Kafka - Martin Podval
Apache Kafka - Martin PodvalApache Kafka - Martin Podval
Apache Kafka - Martin Podval
 
Kafka Streams vs. KSQL for Stream Processing on top of Apache Kafka
Kafka Streams vs. KSQL for Stream Processing on top of Apache KafkaKafka Streams vs. KSQL for Stream Processing on top of Apache Kafka
Kafka Streams vs. KSQL for Stream Processing on top of Apache Kafka
 
From Message to Cluster: A Realworld Introduction to Kafka Capacity Planning
From Message to Cluster: A Realworld Introduction to Kafka Capacity PlanningFrom Message to Cluster: A Realworld Introduction to Kafka Capacity Planning
From Message to Cluster: A Realworld Introduction to Kafka Capacity Planning
 
Introduction to apache kafka, confluent and why they matter
Introduction to apache kafka, confluent and why they matterIntroduction to apache kafka, confluent and why they matter
Introduction to apache kafka, confluent and why they matter
 
Kafka presentation
Kafka presentationKafka presentation
Kafka presentation
 
An Introduction to Apache Kafka
An Introduction to Apache KafkaAn Introduction to Apache Kafka
An Introduction to Apache Kafka
 
Fundamentals of Apache Kafka
Fundamentals of Apache KafkaFundamentals of Apache Kafka
Fundamentals of Apache Kafka
 
Introduction To Streaming Data and Stream Processing with Apache Kafka
Introduction To Streaming Data and Stream Processing with Apache KafkaIntroduction To Streaming Data and Stream Processing with Apache Kafka
Introduction To Streaming Data and Stream Processing with Apache Kafka
 
Introduction to Apache Kafka
Introduction to Apache KafkaIntroduction to Apache Kafka
Introduction to Apache Kafka
 
Integrating Apache Kafka Into Your Environment
Integrating Apache Kafka Into Your EnvironmentIntegrating Apache Kafka Into Your Environment
Integrating Apache Kafka Into Your Environment
 
Kafka Security 101 and Real-World Tips
Kafka Security 101 and Real-World Tips Kafka Security 101 and Real-World Tips
Kafka Security 101 and Real-World Tips
 

Similar to Using Modular Topologies in Kafka Streams to scale ksqlDB’s persistent queries with A. Sophie Blee-Goldman and Walker Carlson | Kafka Summit London 2022

Benchmarking Solr Performance at Scale
Benchmarking Solr Performance at ScaleBenchmarking Solr Performance at Scale
Benchmarking Solr Performance at Scale
thelabdude
 
Exactly-once Data Processing with Kafka Streams - July 27, 2017
Exactly-once Data Processing with Kafka Streams - July 27, 2017Exactly-once Data Processing with Kafka Streams - July 27, 2017
Exactly-once Data Processing with Kafka Streams - July 27, 2017
confluent
 
Inside LoLA - Experiences from building a state space tool for place transiti...
Inside LoLA - Experiences from building a state space tool for place transiti...Inside LoLA - Experiences from building a state space tool for place transiti...
Inside LoLA - Experiences from building a state space tool for place transiti...
Universität Rostock
 
Consistency and Completeness: Rethinking Distributed Stream Processing in Apa...
Consistency and Completeness: Rethinking Distributed Stream Processing in Apa...Consistency and Completeness: Rethinking Distributed Stream Processing in Apa...
Consistency and Completeness: Rethinking Distributed Stream Processing in Apa...
Guozhang Wang
 
Ceilosca
CeiloscaCeilosca
Ceilosca
Fabio Giannetti
 
Training Slides: Intermediate 202: Performing Cluster Maintenance with Zero-D...
Training Slides: Intermediate 202: Performing Cluster Maintenance with Zero-D...Training Slides: Intermediate 202: Performing Cluster Maintenance with Zero-D...
Training Slides: Intermediate 202: Performing Cluster Maintenance with Zero-D...
Continuent
 
Solr Compute Cloud – An Elastic Solr Infrastructure: Presented by Nitin Sharm...
Solr Compute Cloud – An Elastic Solr Infrastructure: Presented by Nitin Sharm...Solr Compute Cloud – An Elastic Solr Infrastructure: Presented by Nitin Sharm...
Solr Compute Cloud – An Elastic Solr Infrastructure: Presented by Nitin Sharm...
Lucidworks
 
Alex Smola, Professor in the Machine Learning Department, Carnegie Mellon Uni...
Alex Smola, Professor in the Machine Learning Department, Carnegie Mellon Uni...Alex Smola, Professor in the Machine Learning Department, Carnegie Mellon Uni...
Alex Smola, Professor in the Machine Learning Department, Carnegie Mellon Uni...
MLconf
 
Solr Compute Cloud - An Elastic SolrCloud Infrastructure
Solr Compute Cloud - An Elastic SolrCloud Infrastructure Solr Compute Cloud - An Elastic SolrCloud Infrastructure
Solr Compute Cloud - An Elastic SolrCloud Infrastructure
Nitin S
 
Solr Lucene Conference 2014 - Nitin Presentation
Solr Lucene Conference 2014 - Nitin PresentationSolr Lucene Conference 2014 - Nitin Presentation
Solr Lucene Conference 2014 - Nitin Presentation
Nitin Sharma
 
Lessons learned from scaling YARN to 40K machines in a multi tenancy environment
Lessons learned from scaling YARN to 40K machines in a multi tenancy environmentLessons learned from scaling YARN to 40K machines in a multi tenancy environment
Lessons learned from scaling YARN to 40K machines in a multi tenancy environment
DataWorks Summit
 
Faceting optimizations for Solr
Faceting optimizations for SolrFaceting optimizations for Solr
Faceting optimizations for Solr
Toke Eskildsen
 
Streams Don't Fail Me Now - Robustness Features in Kafka Streams
Streams Don't Fail Me Now - Robustness Features in Kafka StreamsStreams Don't Fail Me Now - Robustness Features in Kafka Streams
Streams Don't Fail Me Now - Robustness Features in Kafka Streams
HostedbyConfluent
 
The State of Lightweight Threads for the JVM
The State of Lightweight Threads for the JVMThe State of Lightweight Threads for the JVM
The State of Lightweight Threads for the JVM
Volkan Yazıcı
 
Adaptive Linear Solvers and Eigensolvers
Adaptive Linear Solvers and EigensolversAdaptive Linear Solvers and Eigensolvers
Adaptive Linear Solvers and Eigensolvers
inside-BigData.com
 
New hope is comming? Project Loom.pdf
New hope is comming? Project Loom.pdfNew hope is comming? Project Loom.pdf
New hope is comming? Project Loom.pdf
Krystian Zybała
 
Java Thread and Process Performance for Parallel Machine Learning on Multicor...
Java Thread and Process Performance for Parallel Machine Learning on Multicor...Java Thread and Process Performance for Parallel Machine Learning on Multicor...
Java Thread and Process Performance for Parallel Machine Learning on Multicor...
Saliya Ekanayake
 
Automating the Point-to-Point Testing of Hundreds of Substations
Automating the Point-to-Point Testing of Hundreds of Substations Automating the Point-to-Point Testing of Hundreds of Substations
Automating the Point-to-Point Testing of Hundreds of Substations
Nathan Wallace, PhD, PE
 
UKOUG Tech15 - Overheads of RAC?
UKOUG Tech15 - Overheads of RAC?UKOUG Tech15 - Overheads of RAC?
UKOUG Tech15 - Overheads of RAC?
Zahid Anwar (OCM)
 

Similar to Using Modular Topologies in Kafka Streams to scale ksqlDB’s persistent queries with A. Sophie Blee-Goldman and Walker Carlson | Kafka Summit London 2022 (20)

Benchmarking Solr Performance at Scale
Benchmarking Solr Performance at ScaleBenchmarking Solr Performance at Scale
Benchmarking Solr Performance at Scale
 
Exactly-once Data Processing with Kafka Streams - July 27, 2017
Exactly-once Data Processing with Kafka Streams - July 27, 2017Exactly-once Data Processing with Kafka Streams - July 27, 2017
Exactly-once Data Processing with Kafka Streams - July 27, 2017
 
Inside LoLA - Experiences from building a state space tool for place transiti...
Inside LoLA - Experiences from building a state space tool for place transiti...Inside LoLA - Experiences from building a state space tool for place transiti...
Inside LoLA - Experiences from building a state space tool for place transiti...
 
Consistency and Completeness: Rethinking Distributed Stream Processing in Apa...
Consistency and Completeness: Rethinking Distributed Stream Processing in Apa...Consistency and Completeness: Rethinking Distributed Stream Processing in Apa...
Consistency and Completeness: Rethinking Distributed Stream Processing in Apa...
 
Ceilosca
CeiloscaCeilosca
Ceilosca
 
Training Slides: Intermediate 202: Performing Cluster Maintenance with Zero-D...
Training Slides: Intermediate 202: Performing Cluster Maintenance with Zero-D...Training Slides: Intermediate 202: Performing Cluster Maintenance with Zero-D...
Training Slides: Intermediate 202: Performing Cluster Maintenance with Zero-D...
 
Solr Compute Cloud – An Elastic Solr Infrastructure: Presented by Nitin Sharm...
Solr Compute Cloud – An Elastic Solr Infrastructure: Presented by Nitin Sharm...Solr Compute Cloud – An Elastic Solr Infrastructure: Presented by Nitin Sharm...
Solr Compute Cloud – An Elastic Solr Infrastructure: Presented by Nitin Sharm...
 
Alex Smola, Professor in the Machine Learning Department, Carnegie Mellon Uni...
Alex Smola, Professor in the Machine Learning Department, Carnegie Mellon Uni...Alex Smola, Professor in the Machine Learning Department, Carnegie Mellon Uni...
Alex Smola, Professor in the Machine Learning Department, Carnegie Mellon Uni...
 
Solr Compute Cloud - An Elastic SolrCloud Infrastructure
Solr Compute Cloud - An Elastic SolrCloud Infrastructure Solr Compute Cloud - An Elastic SolrCloud Infrastructure
Solr Compute Cloud - An Elastic SolrCloud Infrastructure
 
Solr Lucene Conference 2014 - Nitin Presentation
Solr Lucene Conference 2014 - Nitin PresentationSolr Lucene Conference 2014 - Nitin Presentation
Solr Lucene Conference 2014 - Nitin Presentation
 
Lessons learned from scaling YARN to 40K machines in a multi tenancy environment
Lessons learned from scaling YARN to 40K machines in a multi tenancy environmentLessons learned from scaling YARN to 40K machines in a multi tenancy environment
Lessons learned from scaling YARN to 40K machines in a multi tenancy environment
 
Faceting optimizations for Solr
Faceting optimizations for SolrFaceting optimizations for Solr
Faceting optimizations for Solr
 
Streams Don't Fail Me Now - Robustness Features in Kafka Streams
Streams Don't Fail Me Now - Robustness Features in Kafka StreamsStreams Don't Fail Me Now - Robustness Features in Kafka Streams
Streams Don't Fail Me Now - Robustness Features in Kafka Streams
 
The State of Lightweight Threads for the JVM
The State of Lightweight Threads for the JVMThe State of Lightweight Threads for the JVM
The State of Lightweight Threads for the JVM
 
Adaptive Linear Solvers and Eigensolvers
Adaptive Linear Solvers and EigensolversAdaptive Linear Solvers and Eigensolvers
Adaptive Linear Solvers and Eigensolvers
 
New hope is comming? Project Loom.pdf
New hope is comming? Project Loom.pdfNew hope is comming? Project Loom.pdf
New hope is comming? Project Loom.pdf
 
Java Thread and Process Performance for Parallel Machine Learning on Multicor...
Java Thread and Process Performance for Parallel Machine Learning on Multicor...Java Thread and Process Performance for Parallel Machine Learning on Multicor...
Java Thread and Process Performance for Parallel Machine Learning on Multicor...
 
Automating the Point-to-Point Testing of Hundreds of Substations
Automating the Point-to-Point Testing of Hundreds of Substations Automating the Point-to-Point Testing of Hundreds of Substations
Automating the Point-to-Point Testing of Hundreds of Substations
 
UKOUG Tech15 - Overheads of RAC?
UKOUG Tech15 - Overheads of RAC?UKOUG Tech15 - Overheads of RAC?
UKOUG Tech15 - Overheads of RAC?
 
Kai hwang solution
Kai hwang solutionKai hwang solution
Kai hwang solution
 

More from HostedbyConfluent

Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
HostedbyConfluent
 
Renaming a Kafka Topic | Kafka Summit London
Renaming a Kafka Topic | Kafka Summit LondonRenaming a Kafka Topic | Kafka Summit London
Renaming a Kafka Topic | Kafka Summit London
HostedbyConfluent
 
Evolution of NRT Data Ingestion Pipeline at Trendyol
Evolution of NRT Data Ingestion Pipeline at TrendyolEvolution of NRT Data Ingestion Pipeline at Trendyol
Evolution of NRT Data Ingestion Pipeline at Trendyol
HostedbyConfluent
 
Ensuring Kafka Service Resilience: A Dive into Health-Checking Techniques
Ensuring Kafka Service Resilience: A Dive into Health-Checking TechniquesEnsuring Kafka Service Resilience: A Dive into Health-Checking Techniques
Ensuring Kafka Service Resilience: A Dive into Health-Checking Techniques
HostedbyConfluent
 
Exactly-once Stream Processing with Arroyo and Kafka
Exactly-once Stream Processing with Arroyo and KafkaExactly-once Stream Processing with Arroyo and Kafka
Exactly-once Stream Processing with Arroyo and Kafka
HostedbyConfluent
 
Fish Plays Pokemon | Kafka Summit London
Fish Plays Pokemon | Kafka Summit LondonFish Plays Pokemon | Kafka Summit London
Fish Plays Pokemon | Kafka Summit London
HostedbyConfluent
 
Tiered Storage 101 | Kafla Summit London
Tiered Storage 101 | Kafla Summit LondonTiered Storage 101 | Kafla Summit London
Tiered Storage 101 | Kafla Summit London
HostedbyConfluent
 
Building a Self-Service Stream Processing Portal: How And Why
Building a Self-Service Stream Processing Portal: How And WhyBuilding a Self-Service Stream Processing Portal: How And Why
Building a Self-Service Stream Processing Portal: How And Why
HostedbyConfluent
 
From the Trenches: Improving Kafka Connect Source Connector Ingestion from 7 ...
From the Trenches: Improving Kafka Connect Source Connector Ingestion from 7 ...From the Trenches: Improving Kafka Connect Source Connector Ingestion from 7 ...
From the Trenches: Improving Kafka Connect Source Connector Ingestion from 7 ...
HostedbyConfluent
 
Future with Zero Down-Time: End-to-end Resiliency with Chaos Engineering and ...
Future with Zero Down-Time: End-to-end Resiliency with Chaos Engineering and ...Future with Zero Down-Time: End-to-end Resiliency with Chaos Engineering and ...
Future with Zero Down-Time: End-to-end Resiliency with Chaos Engineering and ...
HostedbyConfluent
 
Navigating Private Network Connectivity Options for Kafka Clusters
Navigating Private Network Connectivity Options for Kafka ClustersNavigating Private Network Connectivity Options for Kafka Clusters
Navigating Private Network Connectivity Options for Kafka Clusters
HostedbyConfluent
 
Apache Flink: Building a Company-wide Self-service Streaming Data Platform
Apache Flink: Building a Company-wide Self-service Streaming Data PlatformApache Flink: Building a Company-wide Self-service Streaming Data Platform
Apache Flink: Building a Company-wide Self-service Streaming Data Platform
HostedbyConfluent
 
Explaining How Real-Time GenAI Works in a Noisy Pub
Explaining How Real-Time GenAI Works in a Noisy PubExplaining How Real-Time GenAI Works in a Noisy Pub
Explaining How Real-Time GenAI Works in a Noisy Pub
HostedbyConfluent
 
TL;DR Kafka Metrics | Kafka Summit London
TL;DR Kafka Metrics | Kafka Summit LondonTL;DR Kafka Metrics | Kafka Summit London
TL;DR Kafka Metrics | Kafka Summit London
HostedbyConfluent
 
A Window Into Your Kafka Streams Tasks | KSL
A Window Into Your Kafka Streams Tasks | KSLA Window Into Your Kafka Streams Tasks | KSL
A Window Into Your Kafka Streams Tasks | KSL
HostedbyConfluent
 
Mastering Kafka Producer Configs: A Guide to Optimizing Performance
Mastering Kafka Producer Configs: A Guide to Optimizing PerformanceMastering Kafka Producer Configs: A Guide to Optimizing Performance
Mastering Kafka Producer Configs: A Guide to Optimizing Performance
HostedbyConfluent
 
Data Contracts Management: Schema Registry and Beyond
Data Contracts Management: Schema Registry and BeyondData Contracts Management: Schema Registry and Beyond
Data Contracts Management: Schema Registry and Beyond
HostedbyConfluent
 
Code-First Approach: Crafting Efficient Flink Apps
Code-First Approach: Crafting Efficient Flink AppsCode-First Approach: Crafting Efficient Flink Apps
Code-First Approach: Crafting Efficient Flink Apps
HostedbyConfluent
 
Debezium vs. the World: An Overview of the CDC Ecosystem
Debezium vs. the World: An Overview of the CDC EcosystemDebezium vs. the World: An Overview of the CDC Ecosystem
Debezium vs. the World: An Overview of the CDC Ecosystem
HostedbyConfluent
 
Beyond Tiered Storage: Serverless Kafka with No Local Disks
Beyond Tiered Storage: Serverless Kafka with No Local DisksBeyond Tiered Storage: Serverless Kafka with No Local Disks
Beyond Tiered Storage: Serverless Kafka with No Local Disks
HostedbyConfluent
 

More from HostedbyConfluent (20)

Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Renaming a Kafka Topic | Kafka Summit London
Renaming a Kafka Topic | Kafka Summit LondonRenaming a Kafka Topic | Kafka Summit London
Renaming a Kafka Topic | Kafka Summit London
 
Evolution of NRT Data Ingestion Pipeline at Trendyol
Evolution of NRT Data Ingestion Pipeline at TrendyolEvolution of NRT Data Ingestion Pipeline at Trendyol
Evolution of NRT Data Ingestion Pipeline at Trendyol
 
Ensuring Kafka Service Resilience: A Dive into Health-Checking Techniques
Ensuring Kafka Service Resilience: A Dive into Health-Checking TechniquesEnsuring Kafka Service Resilience: A Dive into Health-Checking Techniques
Ensuring Kafka Service Resilience: A Dive into Health-Checking Techniques
 
Exactly-once Stream Processing with Arroyo and Kafka
Exactly-once Stream Processing with Arroyo and KafkaExactly-once Stream Processing with Arroyo and Kafka
Exactly-once Stream Processing with Arroyo and Kafka
 
Fish Plays Pokemon | Kafka Summit London
Fish Plays Pokemon | Kafka Summit LondonFish Plays Pokemon | Kafka Summit London
Fish Plays Pokemon | Kafka Summit London
 
Tiered Storage 101 | Kafla Summit London
Tiered Storage 101 | Kafla Summit LondonTiered Storage 101 | Kafla Summit London
Tiered Storage 101 | Kafla Summit London
 
Building a Self-Service Stream Processing Portal: How And Why
Building a Self-Service Stream Processing Portal: How And WhyBuilding a Self-Service Stream Processing Portal: How And Why
Building a Self-Service Stream Processing Portal: How And Why
 
From the Trenches: Improving Kafka Connect Source Connector Ingestion from 7 ...
From the Trenches: Improving Kafka Connect Source Connector Ingestion from 7 ...From the Trenches: Improving Kafka Connect Source Connector Ingestion from 7 ...
From the Trenches: Improving Kafka Connect Source Connector Ingestion from 7 ...
 
Future with Zero Down-Time: End-to-end Resiliency with Chaos Engineering and ...
Future with Zero Down-Time: End-to-end Resiliency with Chaos Engineering and ...Future with Zero Down-Time: End-to-end Resiliency with Chaos Engineering and ...
Future with Zero Down-Time: End-to-end Resiliency with Chaos Engineering and ...
 
Navigating Private Network Connectivity Options for Kafka Clusters
Navigating Private Network Connectivity Options for Kafka ClustersNavigating Private Network Connectivity Options for Kafka Clusters
Navigating Private Network Connectivity Options for Kafka Clusters
 
Apache Flink: Building a Company-wide Self-service Streaming Data Platform
Apache Flink: Building a Company-wide Self-service Streaming Data PlatformApache Flink: Building a Company-wide Self-service Streaming Data Platform
Apache Flink: Building a Company-wide Self-service Streaming Data Platform
 
Explaining How Real-Time GenAI Works in a Noisy Pub
Explaining How Real-Time GenAI Works in a Noisy PubExplaining How Real-Time GenAI Works in a Noisy Pub
Explaining How Real-Time GenAI Works in a Noisy Pub
 
TL;DR Kafka Metrics | Kafka Summit London
TL;DR Kafka Metrics | Kafka Summit LondonTL;DR Kafka Metrics | Kafka Summit London
TL;DR Kafka Metrics | Kafka Summit London
 
A Window Into Your Kafka Streams Tasks | KSL
A Window Into Your Kafka Streams Tasks | KSLA Window Into Your Kafka Streams Tasks | KSL
A Window Into Your Kafka Streams Tasks | KSL
 
Mastering Kafka Producer Configs: A Guide to Optimizing Performance
Mastering Kafka Producer Configs: A Guide to Optimizing PerformanceMastering Kafka Producer Configs: A Guide to Optimizing Performance
Mastering Kafka Producer Configs: A Guide to Optimizing Performance
 
Data Contracts Management: Schema Registry and Beyond
Data Contracts Management: Schema Registry and BeyondData Contracts Management: Schema Registry and Beyond
Data Contracts Management: Schema Registry and Beyond
 
Code-First Approach: Crafting Efficient Flink Apps
Code-First Approach: Crafting Efficient Flink AppsCode-First Approach: Crafting Efficient Flink Apps
Code-First Approach: Crafting Efficient Flink Apps
 
Debezium vs. the World: An Overview of the CDC Ecosystem
Debezium vs. the World: An Overview of the CDC EcosystemDebezium vs. the World: An Overview of the CDC Ecosystem
Debezium vs. the World: An Overview of the CDC Ecosystem
 
Beyond Tiered Storage: Serverless Kafka with No Local Disks
Beyond Tiered Storage: Serverless Kafka with No Local DisksBeyond Tiered Storage: Serverless Kafka with No Local Disks
Beyond Tiered Storage: Serverless Kafka with No Local Disks
 

Recently uploaded

SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfSAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
Peter Spielvogel
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
Adtran
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
RinaMondal9
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
Neo4j
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Nexer Digital
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Aggregage
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
Ralf Eggert
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 

Recently uploaded (20)

SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfSAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 

Using Modular Topologies in Kafka Streams to scale ksqlDB’s persistent queries with A. Sophie Blee-Goldman and Walker Carlson | Kafka Summit London 2022

  • 1. Using Modular Topologies in Kafka Streams to scale KSQL’s persistent queries A. Sophie Blee-Goldman Walker Carlson @ableegoldman | sophie@confluent.io wcarlson@confluent.io 1
  • 2. Overview • Confluent Cloud limits to 20 persistent queries per cluster. • We re-architectured KSQL, improving the scalability 2
  • 3. Road map 1. What we improved in KSQL a. Current World b. Old World c. Issues d. New World 2. How we made it possible a. Why it’s hard b. Why it’s possible c. Why it’s worth it d. What is next? 3
  • 4. Terminology • KSQL - A structured language that uses Kafka Streams to execute • Streams Runtime - single streams client that executes a topology. A group of these with the same applicationID makes a streams application • Topology - A Kafka Streams program graph that is a collection of tasks • Tasks - A unit of work in the topology. Each topic partition has a task. 4
  • 5. Persistent query Create Stream foo As Select * From bar; * Limit of 20 on the number of these per-cluster in Confluent Cloud. Input topic Output topic Persistent query ~ Topology Current World 5
  • 6. Streams Kafka Streams Metadata Stream Thread 1 Stream Thread 2 Stream Thread 3 Current World 6 Runtime == One Node in an Streams Application
  • 7. Old architecture KSQL Query 1 Query 2 Query 3 Streams Streams Streams Persistent Query == Topology Old World 7
  • 8. Issues of scale • Threads scale with number of Queries • Each Threads has its own Consumer • Assignment logic only accounts for each query • Long start up times for Streams Runtimes • Other various overhead Results in a limited number of persistent queries. 8
  • 9. New Architecture Query 2 Query 3 Streams Runtime KSQL Persistent Query == Topology Threads, Consumers, ect… Query 1 New World 9
  • 10. Scaling Improvements • Queries can share Streams Runtimes Threads Metadata Consumer Group • Assignment Logic is shared • Runtimes are already started • Possibility for topology or state optimizations across queries 10
  • 11. KSQL Not all topologies can fit into a single runtime yet! Pre Execution - Runtime Assignment Runtime Topology - A Topology - B New Runtime A and B both use the same source topic Topology == Persistent Query New World 11
  • 12. Pre Execution - Query Validation KSQL Runtime 1 Runtime 2 Runtime 3 Runtime 4 Validation Runtime 3 New World Copy of Potential Query’s Topology Sandbox copy Runtime == Kafka Streams Client 12
  • 13. Pre Execution - Multi Cluster Assignment Needs to go into the same runtime New Query Assignment: Runtime 1 KSQL Server 1 Runtime 1 KSQL Server 2 Runtime 1 Runtime == Kafka Streams Client Command Topic - internal topic to keep all KSQL servers in sync New World 13
  • 15. 15 Otter monitoring shells == persistent query Stream processing with Ottla
  • 16. 16 Otter monitoring shells == persistent query Stream processing +1 green 1 green shell
  • 17. 17 Otter monitoring shells == persistent query Stream processing +1 orange 1 green shell 1 orange shell
  • 18. Persistent Queries Why it’s hard Ksql persistent query == Kafka Streams topology What are they really? Create Stream foo As Select * From bar; Input topic Output topic Persistent query ~ Topology 18
  • 19. Topologies Why it’s hard terms_and_ conditions_events Processor Topology 19 Input Topic things_you_care_about Output Topic source sink filter
  • 20. Topologies Why it’s hard 20 source sink filter Ksql persistent query == Kafka Streams topology source sink count shell_ count state store source B sink join source A
  • 21. Why it’s hard 21 Subtopology: subset of processor nodes connected by repartition topics A B to sink… Repartition topic subtopology 1 subtopology 2
  • 22. Why it’s hard 22 Kafka Streams runtime == Java application executing a processor topology X count fish Disjoint Topologies Streams Runtime info X my_store shells
  • 23. Why it’s hard 23 Disjoint topologies == subset of nodes with no edges =/= isolation X count fish Disjoint Topologies Streams Runtime info OUT my_store shells X count crabs
  • 24. Why it’s hard 24 Runtimes are static & topologies are not always forwards/backwards compatible X count fish Static runtime Streams Runtime X count2 crabs ? + Query C info OUT my_store shells Subtopology 1 Subtopology 2 Query B Query A
  • 25. Why it’s hard 25 Runtimes are static & topologies are not always forwards/backwards compatible X count fish Static topology Streams Runtime X count2 crabs info OUT my_store shells Subtopology 1 Subtopology 3 Subtopology 2 Query A Query C Query B
  • 26. Why it’s possible 26 Modular topologies == disjoint topologies that can be dynamically added & removed X count fish Modular Topologies Streams Runtime info OUT my_store shells X count crabs Topology C Topology B Topology A
  • 27. Why it’s possible 27 Remember: modular topologies can’t share any source topics within a runtime! Modular Topologies Streams Runtime Topic A Topic B Topic C Topic D Topic E
  • 28. Why it’s possible 28 Remember: modular topologies can’t share any source topics within a runtime! Modular Topologies Streams Runtime Topic A Topic B Topic C Topic D Topic E 0 1 A A B ?
  • 29. 29 Stream processing Each otter monitoring shells == 1 persistent query NOT COOL
  • 30. 30 Stream processing Each otter monitoring shells == 1 persistent query Stream processing Each otter monitoring shells == 1 persistent query
  • 31. Why it’s worth it Performance Recap: old engine ● Serious issues past 20 query cliff ● Endless rebalancing* ● Throughput scales poorly Results: New engine ● No degradation in throughput past 20 & beyond! ● No rebalancing loops 31 *Dropping out of the group – cooperative rebalancing won’t help here!
  • 32. Why it’s worth it Performance Stateless query benchmarks (records consumed/s) 32 avg: 80474.66 min: 80438.10 max: 80511.21 (2 runs) 20 queries 100 queries 20 input topics 1 input topic 100 input topics Non-shared (old engine) avg: 68,025.3 min: 66741.96 max: 68977.11 (4 runs) avg: 72,557.94 min: 66,940.67 max: 78,349.66 (4 runs) avg: 48,553.75 min: 47,992.30 max: 49,005.56 (4 runs) Shared (new engine) avg: 80,474.66 min: 80,438.10 max: 80,511.21 (2 runs) avg: 62,037.23 min: 61,254.18 max: 62,820.27 (2 runs) avg: 65,867.26 min: 65,654.27 max: 66,080.25 (2 run)
  • 33. Why it’s worth it Performance Stateful query benchmarks (records consumed/s) 33 avg: 80474.66 min: 80438.10 max: 80511.21 (2 runs) 20 queries 100 queries 20 input topics 1 input topic 100 input topics Non-shared (old engine) avg: 13,938.41 min: 13,933.81 max: 13,943.01 (2 runs) avg: 13,754.95 min: 13,519.31 max: 13,990.58 (2 runs) avg: 12,669.4 min: 12660.73 max: 12678.06 (2 runs) Shared (new engine) avg: 12,897.32 min: 12,419.81 max: 13,374.84 (2 runs) avg: 10,337.91 min: 10,207.7 max: 10,468.11 (2 runs) avg: 15,411.09 min: 14,827.35 max: 15,994.83 (2 runs)
  • 34. Why it’s still going 34 Worst case: number of runtimes == number of queries! Where next? 34 Runtime #1 Topic A Topic B Topic C Topic D Topic E Runtime #2
  • 35. 35 Actual processing of shell == persistent query More natural engine Why it’s worth it
  • 36. Coming to an application near you 36 Kafka Streams users: Want to participate in the KIP discussion? Join the kafka dev mailing list by sending an email to dev-subscribe@kafka.apache.org Look out for the subject line [DISCUSS] KIP-809 in the next few days!
  • 37. Coming to an application near you 37 KSQL users: This feature is currently in EA Contact us if you’re interested in trialing the early product The feature will become generally available in Cloud coming soon!
  • 38. Your Apache Kafka journey begins here developer.confluent.io