SlideShare a Scribd company logo
1 of 62
Download to read offline
Highly available Kafka Consumers and
Streams on Kubernetes
Adrian McCague, Zopa Bank
0.10.0 → 3.X
3
• In Production since 2017
• Nearly 700 consumer groups
• Realtime, stream-processing applications
• Kafka Streams ‘early adopters’
• Kubernetes hosted
• … not been without pain …
Kafka Consumer
4
Consumer steady-state
Kafka Consumer
5
Consumer death
? session timeout
Kafka Consumer
6
Consumer join group
rebalance time
Kafka Consumer
7
Consumer partitions assigned
Kafka Consumer
8
recovery time = session timeout + rebalance time
Kafka Consumer
9
Consumer group steady-state
Kafka Consumer
10
Consumer group rebalance
rebalance time
Kafka Consumer
11
Consumer group (possible) transient steady-state
Kafka Consumer
12
Consumer group rebalance 2
rebalance time
Kafka Consumer
13
Consumer group new steady-state
High
availability
goals
14
• Minimise ‘stop-the-world’ situations
• Max availability in planned events
• Max availability in un-planned events
Planned
events
15
• Cluster maintenance
• Worker node maintenance
• New application deployment
• Application horizontal scaling
Un-planned
events
16
• Cluster auto-scaling
• Worker node termination
• Container termination
• Application horizontal scaling
• Transient network issues
• Pod pre-emption
Intermediate
goals
17
• Maximise replica redundancy
• Keep as many replicas up as possible
• Do not impede cluster operations
Kubernetes
18
Typical high-availability setup
Kubernetes
19
Schedule consumers (pods) evenly
Kubernetes
20
Schedule consumers (pods) evenly
Kubernetes
21
Schedule consumers (pods) evenly
kind: Deployment
apiVersion: apps/v1
metadata:
name: consumer-app
...
spec:
...
template:
metadata:
labels:
app.kubernetes.io/name: consumer-app
spec:
...
containers:
- ...
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 1
podAffinityTerm:
labelSelector:
matchExpressions:
- key: app.kubernetes.io/name
operator: In
values:
- consumer-app
topologyKey: topology.kubernetes.io/zone
- weight: 1
podAffinityTerm:
labelSelector:
matchExpressions:
- key: app.kubernetes.io/name
operator: In
values:
- consumer-app
topologyKey: kubernetes.io/hostname
Kubernetes
22
Schedule consumers (pods) evenly
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 1
podAffinityTerm:
labelSelector:
matchExpressions:
- key: app.kubernetes.io/name
operator: In
values:
- consumer-app
topologyKey: topology.kubernetes.io/zone
- weight: 1
podAffinityTerm:
labelSelector:
matchExpressions:
- key: app.kubernetes.io/name
operator: In
values:
- consumer-app
topologyKey: kubernetes.io/hostname
kind: Deployment
apiVersion: apps/v1
metadata:
name: consumer-app
...
spec:
...
template:
metadata:
labels:
app.kubernetes.io/name: consumer-app
spec:
...
containers:
- ...
topologySpreadConstraints:
- maxSkew: 1
topologyKey: topology.kubernetes.io/zone
whenUnsatisfiable: ScheduleAnyway / DoNotSchedule
labelSelector:
matchLabels:
app.kubernetes.io/name: consumer-app
- maxSkew: 1
topologyKey: kubernetes.io/hostname
whenUnsatisfiable: ScheduleAnyway / DoNotSchedule
labelSelector:
matchLabels:
app.kubernetes.io/name: consumer-app
Kubernetes
23
Schedule consumers (pods) evenly - in Kubernetes 1.24
topologySpreadConstraints:
- maxSkew: 1
topologyKey: topology.kubernetes.io/zone
whenUnsatisfiable: ScheduleAnyway
labelSelector:
matchLabels:
app.kubernetes.io/name: consumer-app
- maxSkew: 1
topologyKey: kubernetes.io/hostname
whenUnsatisfiable: ScheduleAnyway
labelSelector:
matchLabels:
app.kubernetes.io/name: consumer-app
Kubernetes
24
Ideal outcome
Intermediate
goals
25
• Maximise replica redundancy
• Keep as many replicas up as possible
• Do not impede cluster operations
kind: Deployment
apiVersion: apps/v1
metadata:
name: consumer-app
...
spec:
...
template:
metadata:
labels:
app.kubernetes.io/name: consumer-app
spec:
...
containers:
- ...
readinessProbe:
httpGet:
path: /healthz/ready
port: 8080
scheme: HTTP
timeoutSeconds: 20
periodSeconds: 15
successThreshold: 1
failureThreshold: 2
----------
kind: PodDisruptionBudget
apiVersion: policy/v1
metadata:
name: consumer-app
spec:
maxUnavailable: 1
selector:
matchLabels:
app.kubernetes.io/name: consumer-app
Make Kubernetes aware of consumer state
26
Configure readiness probes & Pod Disruption Budgets
containers:
- ...
readinessProbe:
httpGet:
path: /healthz/ready
port: 8080
scheme: HTTP
timeoutSeconds: 20
periodSeconds: 15
successThreshold: 1
failureThreshold: 2
maxUnavailable: 1
selector:
matchLabels:
app.kubernetes.io/name: consumer-app
Make Kubernetes aware of consumer state
27
Tie-in readiness to rebalancing state
Kafka Consumer
class org.apache.kafka.clients.consumer.KafkaConsumer<K,V>
void subscribe(Collection<String> topics, ConsumerRebalanceListener callback)
public interface org.apache.kafka.clients.consumer.ConsumerRebalanceListener
void onPartitionsRevoked(Collection<TopicPartition> partitions)
void onPartitionsAssigned(Collection<TopicPartition> partitions)
Make Kubernetes aware of consumer state
28
Tie-in readiness to rebalancing state
Kafka Streams
class org.apache.kafka.streams.KafkaStreams
public void setStateListener(KafkaStreams.StateListener listener)
interface org.apache.kafka.streams.KafkaStreams.StateListener
void onChange(KafkaStreams.State newState, KafkaStreams.State
oldState)
Ready: oldState == State.REBALANCING && newState == State.RUNNING
Unready: newState != State.RUNNING
29
https://github.com/apache/kafka/blob/trunk/streams/src/main/java/org/apache/kafka/streams/KafkaStreams.java
Kubernetes good citizens
30
Factor out your applications carefully
• Try to stick to a single API type per application
• Kafka Streams: Interactive Queries can be an exception
• Keep your microservices ‘micro’
• Probes should be efficient and not depend on external services
Kubernetes will respect the disruption budget
31
Multiple scenarios supported
• Cluster maintenance
• Cluster autoscaling
• Rolling deployment*
• Involuntary disruptions*
* Counts towards the budget only
kind: Deployment
apiVersion: apps/v1
metadata:
name: consumer-app
...
spec:
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 0
maxUnavailable: 1
...
template:
metadata:
labels:
app.kubernetes.io/name: consumer-app
spec:
...
containers:
- ...
Kubernetes rolling deployment
32
Minimise the fallout from a rollout
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 0
maxUnavailable: 1
The default strategy is generally unfriendly for consumers
Kubernetes rolling deployment
33
Steady state
Kubernetes rolling deployment
34
First Pod
Kubernetes rolling deployment
35
First Pod Complete
Kubernetes rolling deployment
36
Second Pod
Kubernetes rolling deployment
37
Last Pod
Kubernetes rolling deployment
38
Rolling update complete
Intermediate
goals
39
• Maximise replica redundancy
• Keep as many replicas up as possible
• Do not impede cluster operations
High
availability
goals
40
• Minimise ‘stop-the-world’ situations
• Max availability in planned events
• Max availability in un-planned events
Cooperative incremental rebalancing
41
Eager rebalancing (default)
Cooperative incremental rebalancing
42
Localise the rebalance to where it’s required
Cooperative incremental rebalancing
43
Read the documentation!
Kafka Consumer
partition.assignment.strategy =
[org.apache.kafka.clients.consumer.CooperativeStickyAssignor]
Before 3.0 default: [RangeAssignor]
After 3.0 default: [RangeAssignor, CooperativeStickyAssignor]
Opting in
Cooperative incremental rebalancing
44
Opting in
Read the documentation!
Kafka Streams
Built into the StreamPartitionAssignor, for
free™
Available from Kafka clients 2.4
https://kafka.apache.org/34/documentation/streams/upgrade-guide
Almost there..
45
Minimise the rebalance time, but still wait for session timeout
recovery time = session timeout + rebalance time
Static consumer group membership
46
Making static membership work with well with Kubernetes
“group.instance.id”
CommonClientConfigs.GROUP_INSTANCE_ID_C
ONFIG
Works together session.timeout.ms
Increased to 45s in 3.0 (from 10s)
KIP-345: Introduce static membership protocol to reduce consumer rebalances (2.4)
Use the Kubernetes ‘downward API’
47
Making the pod name available to the application
kind: Deployment
apiVersion: apps/v1
metadata:
name: consumer-app
...
spec:
...
template:
...
spec:
...
containers:
- ...
env:
- name: K8S_POD_NAME
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: metadata.name
...
env:
- name: K8S_POD_NAME
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: metadata.name
Static consumer group membership
48
Making static membership work with well with Kubernetes
Get a static name with StatefulSets
49
Constant set of pod names
* Bonus: no surges, pod by pod rolling deployments
Autoscaling?
50
Watch out for static membership
• Static membership prevents consumers from sending leave group requests
• session.timeout.ms could be set low, at the risk of more rebalances
• Dynamic membership?
• Could use an operator to scale down
interface org.apache.kafka.clients.admin.Admin
RemoveMembersFromConsumerGroupResult
removeMembersFromConsumerGroup(
String groupId, RemoveMembersFromConsumerGroupOptions options);
In review
51
Optimised pod layout
• Topology spread constraints
Made Kubernetes aware of replica state
• Health checks + Pod Disruption Budgets
Minimised rebalances + stop-the-world
• Incremental Co-operative Rebalancing
Minimised session timeout impact
• Static membership
recovery time = session timeout + rebalance time
Bonus:
Kafka Streams
52
recovery time = session timeout + rebalance time
+ task assignment time + state restore time
Kafka Streams State Stores
53
Stores are typically written to Kafka for durability
Kafka Streams State Stores
54
Allows for restoration to another replica
* Only stopping the world with streams client Kafka < 2.4
Kafka Streams State Stores
55
Service can resume
Kafka Streams State Stores
56
Standby replicas
“num.standby.replicas” =
1
Kafka Streams State Stores
57
Standby replicas – faster restoration of the delta
“num.standby.replicas” =
1
--
Kafka Streams State Stores
58
Standby replicas – after restoration
“num.standby.replicas” =
1
Consider persistent volumes
59
Making the pod name available to the application
kind: StatefulSet
apiVersion: apps/v1
metadata:
name: consumer-app
...
spec:
...
template:
...
spec:
...
containers:
- ...
volumeMounts:
- name: statefulstorage
mountPath: /data
volumeClaimTemplates:
- metadata:
name: statefulstorage
spec:
accessModes:
- ReadWriteOnce
storageClassName: gp2-retain
resources:
requests:
storage: 2Gi
containers:
- ...
volumeMounts:
- name: statefulstorage
mountPath: /data
volumeClaimTemplates:
- metadata:
name: statefulstorage
spec:
accessModes:
- ReadWriteOnce
storageClassName: gp2-retain
resources:
requests:
storage: 2Gi
state.dir = “/data”
Kafka Streams:
to be aware of
60
• KIP-441: Smooth scaling out of Kafka Streams (2.6)
• KIP-535: Allow IQ reads during rebalance (2.5)
• KAFKA-13439: Eager rebalancing of Kafka Streams
deprecated (3.1)
• KIP-708: Rack aware Kafka Streams apps (3.2)
Future
developments
61
• KIP-848: The Next Generation of the Consumer
Rebalance Protocol
• KAFKA-10199: Separate state restoration into separate
threads (3.5?)
Questions
Strictly Private & Confidential

More Related Content

What's hot

Autoscaling Flink with Reactive Mode
Autoscaling Flink with Reactive ModeAutoscaling Flink with Reactive Mode
Autoscaling Flink with Reactive ModeFlink Forward
 
Introduction to KSQL: Streaming SQL for Apache Kafka®
Introduction to KSQL: Streaming SQL for Apache Kafka®Introduction to KSQL: Streaming SQL for Apache Kafka®
Introduction to KSQL: Streaming SQL for Apache Kafka®confluent
 
Securing Kafka
Securing Kafka Securing Kafka
Securing Kafka confluent
 
How Uber scaled its Real Time Infrastructure to Trillion events per day
How Uber scaled its Real Time Infrastructure to Trillion events per dayHow Uber scaled its Real Time Infrastructure to Trillion events per day
How Uber scaled its Real Time Infrastructure to Trillion events per dayDataWorks Summit
 
Kafka Streams Rebalances and Assignments: The Whole Story with Alieh Saeedi &...
Kafka Streams Rebalances and Assignments: The Whole Story with Alieh Saeedi &...Kafka Streams Rebalances and Assignments: The Whole Story with Alieh Saeedi &...
Kafka Streams Rebalances and Assignments: The Whole Story with Alieh Saeedi &...HostedbyConfluent
 
“Alexa, be quiet!”: End-to-end near-real time model building and evaluation i...
“Alexa, be quiet!”: End-to-end near-real time model building and evaluation i...“Alexa, be quiet!”: End-to-end near-real time model building and evaluation i...
“Alexa, be quiet!”: End-to-end near-real time model building and evaluation i...Flink Forward
 
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
 
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
 
ksqlDB: A Stream-Relational Database System
ksqlDB: A Stream-Relational Database SystemksqlDB: A Stream-Relational Database System
ksqlDB: A Stream-Relational Database Systemconfluent
 
Hardening Kafka Replication
Hardening Kafka Replication Hardening Kafka Replication
Hardening Kafka Replication confluent
 
Deploying Kafka Streams Applications with Docker and Kubernetes
Deploying Kafka Streams Applications with Docker and KubernetesDeploying Kafka Streams Applications with Docker and Kubernetes
Deploying Kafka Streams Applications with Docker and Kubernetesconfluent
 
Introducing the Apache Flink Kubernetes Operator
Introducing the Apache Flink Kubernetes OperatorIntroducing the Apache Flink Kubernetes Operator
Introducing the Apache Flink Kubernetes OperatorFlink Forward
 
What is the State of my Kafka Streams Application? Unleashing Metrics. | Neil...
What is the State of my Kafka Streams Application? Unleashing Metrics. | Neil...What is the State of my Kafka Streams Application? Unleashing Metrics. | Neil...
What is the State of my Kafka Streams Application? Unleashing Metrics. | Neil...HostedbyConfluent
 
Apache kafka 모니터링을 위한 Metrics 이해 및 최적화 방안
Apache kafka 모니터링을 위한 Metrics 이해 및 최적화 방안Apache kafka 모니터링을 위한 Metrics 이해 및 최적화 방안
Apache kafka 모니터링을 위한 Metrics 이해 및 최적화 방안SANG WON PARK
 
Deploying Flink on Kubernetes - David Anderson
 Deploying Flink on Kubernetes - David Anderson Deploying Flink on Kubernetes - David Anderson
Deploying Flink on Kubernetes - David AndersonVerverica
 
Kafka streams windowing behind the curtain
Kafka streams windowing behind the curtain Kafka streams windowing behind the curtain
Kafka streams windowing behind the curtain confluent
 
MySQL GTID 시작하기
MySQL GTID 시작하기MySQL GTID 시작하기
MySQL GTID 시작하기I Goo Lee
 
CDC Stream Processing With Apache Flink With Timo Walther | Current 2022
CDC Stream Processing With Apache Flink With Timo Walther | Current 2022CDC Stream Processing With Apache Flink With Timo Walther | Current 2022
CDC Stream Processing With Apache Flink With Timo Walther | Current 2022HostedbyConfluent
 
Exactly-Once Financial Data Processing at Scale with Flink and Pinot
Exactly-Once Financial Data Processing at Scale with Flink and PinotExactly-Once Financial Data Processing at Scale with Flink and Pinot
Exactly-Once Financial Data Processing at Scale with Flink and PinotFlink Forward
 
Kafka High Availability in multi data center setup with floating Observers wi...
Kafka High Availability in multi data center setup with floating Observers wi...Kafka High Availability in multi data center setup with floating Observers wi...
Kafka High Availability in multi data center setup with floating Observers wi...HostedbyConfluent
 

What's hot (20)

Autoscaling Flink with Reactive Mode
Autoscaling Flink with Reactive ModeAutoscaling Flink with Reactive Mode
Autoscaling Flink with Reactive Mode
 
Introduction to KSQL: Streaming SQL for Apache Kafka®
Introduction to KSQL: Streaming SQL for Apache Kafka®Introduction to KSQL: Streaming SQL for Apache Kafka®
Introduction to KSQL: Streaming SQL for Apache Kafka®
 
Securing Kafka
Securing Kafka Securing Kafka
Securing Kafka
 
How Uber scaled its Real Time Infrastructure to Trillion events per day
How Uber scaled its Real Time Infrastructure to Trillion events per dayHow Uber scaled its Real Time Infrastructure to Trillion events per day
How Uber scaled its Real Time Infrastructure to Trillion events per day
 
Kafka Streams Rebalances and Assignments: The Whole Story with Alieh Saeedi &...
Kafka Streams Rebalances and Assignments: The Whole Story with Alieh Saeedi &...Kafka Streams Rebalances and Assignments: The Whole Story with Alieh Saeedi &...
Kafka Streams Rebalances and Assignments: The Whole Story with Alieh Saeedi &...
 
“Alexa, be quiet!”: End-to-end near-real time model building and evaluation i...
“Alexa, be quiet!”: End-to-end near-real time model building and evaluation i...“Alexa, be quiet!”: End-to-end near-real time model building and evaluation i...
“Alexa, be quiet!”: End-to-end near-real time model building and evaluation i...
 
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)
 
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,...
 
ksqlDB: A Stream-Relational Database System
ksqlDB: A Stream-Relational Database SystemksqlDB: A Stream-Relational Database System
ksqlDB: A Stream-Relational Database System
 
Hardening Kafka Replication
Hardening Kafka Replication Hardening Kafka Replication
Hardening Kafka Replication
 
Deploying Kafka Streams Applications with Docker and Kubernetes
Deploying Kafka Streams Applications with Docker and KubernetesDeploying Kafka Streams Applications with Docker and Kubernetes
Deploying Kafka Streams Applications with Docker and Kubernetes
 
Introducing the Apache Flink Kubernetes Operator
Introducing the Apache Flink Kubernetes OperatorIntroducing the Apache Flink Kubernetes Operator
Introducing the Apache Flink Kubernetes Operator
 
What is the State of my Kafka Streams Application? Unleashing Metrics. | Neil...
What is the State of my Kafka Streams Application? Unleashing Metrics. | Neil...What is the State of my Kafka Streams Application? Unleashing Metrics. | Neil...
What is the State of my Kafka Streams Application? Unleashing Metrics. | Neil...
 
Apache kafka 모니터링을 위한 Metrics 이해 및 최적화 방안
Apache kafka 모니터링을 위한 Metrics 이해 및 최적화 방안Apache kafka 모니터링을 위한 Metrics 이해 및 최적화 방안
Apache kafka 모니터링을 위한 Metrics 이해 및 최적화 방안
 
Deploying Flink on Kubernetes - David Anderson
 Deploying Flink on Kubernetes - David Anderson Deploying Flink on Kubernetes - David Anderson
Deploying Flink on Kubernetes - David Anderson
 
Kafka streams windowing behind the curtain
Kafka streams windowing behind the curtain Kafka streams windowing behind the curtain
Kafka streams windowing behind the curtain
 
MySQL GTID 시작하기
MySQL GTID 시작하기MySQL GTID 시작하기
MySQL GTID 시작하기
 
CDC Stream Processing With Apache Flink With Timo Walther | Current 2022
CDC Stream Processing With Apache Flink With Timo Walther | Current 2022CDC Stream Processing With Apache Flink With Timo Walther | Current 2022
CDC Stream Processing With Apache Flink With Timo Walther | Current 2022
 
Exactly-Once Financial Data Processing at Scale with Flink and Pinot
Exactly-Once Financial Data Processing at Scale with Flink and PinotExactly-Once Financial Data Processing at Scale with Flink and Pinot
Exactly-Once Financial Data Processing at Scale with Flink and Pinot
 
Kafka High Availability in multi data center setup with floating Observers wi...
Kafka High Availability in multi data center setup with floating Observers wi...Kafka High Availability in multi data center setup with floating Observers wi...
Kafka High Availability in multi data center setup with floating Observers wi...
 

Similar to Highly Available Kafka Consumers and Kafka Streams on Kubernetes with Adrian McCague

Meetup 12-12-2017 - Application Isolation on Kubernetes
Meetup 12-12-2017 - Application Isolation on KubernetesMeetup 12-12-2017 - Application Isolation on Kubernetes
Meetup 12-12-2017 - Application Isolation on Kubernetesdtoledo67
 
MongoDB World 2018: Partner Talk - Red Hat: Deploying to Enterprise Kubernetes
MongoDB World 2018: Partner Talk - Red Hat: Deploying to Enterprise KubernetesMongoDB World 2018: Partner Talk - Red Hat: Deploying to Enterprise Kubernetes
MongoDB World 2018: Partner Talk - Red Hat: Deploying to Enterprise KubernetesMongoDB
 
Using MongoDB with Kafka - Use Cases and Best Practices
Using MongoDB with Kafka -  Use Cases and Best PracticesUsing MongoDB with Kafka -  Use Cases and Best Practices
Using MongoDB with Kafka - Use Cases and Best PracticesAntonios Giannopoulos
 
CN Asturias - Stateful application for kubernetes
CN Asturias -  Stateful application for kubernetes CN Asturias -  Stateful application for kubernetes
CN Asturias - Stateful application for kubernetes Cédrick Lunven
 
Modern Cloud-Native Streaming Platforms: Event Streaming Microservices with A...
Modern Cloud-Native Streaming Platforms: Event Streaming Microservices with A...Modern Cloud-Native Streaming Platforms: Event Streaming Microservices with A...
Modern Cloud-Native Streaming Platforms: Event Streaming Microservices with A...confluent
 
Kubernetes workshop -_the_basics
Kubernetes workshop -_the_basicsKubernetes workshop -_the_basics
Kubernetes workshop -_the_basicsSjuul Janssen
 
BDW Chicago 2016 - Jayesh Thakrar, Sr. Software Engineer, Conversant - Data...
BDW Chicago 2016 -  Jayesh Thakrar, Sr. Software Engineer, Conversant -  Data...BDW Chicago 2016 -  Jayesh Thakrar, Sr. Software Engineer, Conversant -  Data...
BDW Chicago 2016 - Jayesh Thakrar, Sr. Software Engineer, Conversant - Data...Big Data Week
 
Building Stream Processing Applications with Apache Kafka's Exactly-Once Proc...
Building Stream Processing Applications with Apache Kafka's Exactly-Once Proc...Building Stream Processing Applications with Apache Kafka's Exactly-Once Proc...
Building Stream Processing Applications with Apache Kafka's Exactly-Once Proc...Matthias J. Sax
 
Apache Kafka - Event Sourcing, Monitoring, Librdkafka, Scaling & Partitioning
Apache Kafka - Event Sourcing, Monitoring, Librdkafka, Scaling & PartitioningApache Kafka - Event Sourcing, Monitoring, Librdkafka, Scaling & Partitioning
Apache Kafka - Event Sourcing, Monitoring, Librdkafka, Scaling & PartitioningGuido Schmutz
 
Architecture patterns for distributed, hybrid, edge and global Apache Kafka d...
Architecture patterns for distributed, hybrid, edge and global Apache Kafka d...Architecture patterns for distributed, hybrid, edge and global Apache Kafka d...
Architecture patterns for distributed, hybrid, edge and global Apache Kafka d...Kai Wähner
 
Building Microservices with Apache Kafka
Building Microservices with Apache KafkaBuilding Microservices with Apache Kafka
Building Microservices with Apache Kafkaconfluent
 
Devoxx Morocco 2016 - Microservices with Kafka
Devoxx Morocco 2016 - Microservices with KafkaDevoxx Morocco 2016 - Microservices with Kafka
Devoxx Morocco 2016 - Microservices with KafkaLászló-Róbert Albert
 
Learnings From Shipping 1000+ Streaming Data Pipelines To Production with Hak...
Learnings From Shipping 1000+ Streaming Data Pipelines To Production with Hak...Learnings From Shipping 1000+ Streaming Data Pipelines To Production with Hak...
Learnings From Shipping 1000+ Streaming Data Pipelines To Production with Hak...HostedbyConfluent
 
Kafka at the Edge: an IoT scenario with OpenShift Streams for Apache Kafka | ...
Kafka at the Edge: an IoT scenario with OpenShift Streams for Apache Kafka | ...Kafka at the Edge: an IoT scenario with OpenShift Streams for Apache Kafka | ...
Kafka at the Edge: an IoT scenario with OpenShift Streams for Apache Kafka | ...Red Hat Developers
 
MicroProfile, Docker, Kubernetes, Istio and Open Shift lab @dev nexus
MicroProfile, Docker, Kubernetes, Istio and Open Shift lab @dev nexusMicroProfile, Docker, Kubernetes, Istio and Open Shift lab @dev nexus
MicroProfile, Docker, Kubernetes, Istio and Open Shift lab @dev nexusEmily Jiang
 
Event Streaming Architectures with Confluent and ScyllaDB
Event Streaming Architectures with Confluent and ScyllaDBEvent Streaming Architectures with Confluent and ScyllaDB
Event Streaming Architectures with Confluent and ScyllaDBScyllaDB
 
Docker kubernetes fundamental(pod_service)_190307
Docker kubernetes fundamental(pod_service)_190307Docker kubernetes fundamental(pod_service)_190307
Docker kubernetes fundamental(pod_service)_190307Inhye Park
 
APAC ksqlDB Workshop
APAC ksqlDB WorkshopAPAC ksqlDB Workshop
APAC ksqlDB Workshopconfluent
 
Salvatore Incandela, Fabio Marinelli - Using Spinnaker to Create a Developmen...
Salvatore Incandela, Fabio Marinelli - Using Spinnaker to Create a Developmen...Salvatore Incandela, Fabio Marinelli - Using Spinnaker to Create a Developmen...
Salvatore Incandela, Fabio Marinelli - Using Spinnaker to Create a Developmen...Codemotion
 

Similar to Highly Available Kafka Consumers and Kafka Streams on Kubernetes with Adrian McCague (20)

Meetup 12-12-2017 - Application Isolation on Kubernetes
Meetup 12-12-2017 - Application Isolation on KubernetesMeetup 12-12-2017 - Application Isolation on Kubernetes
Meetup 12-12-2017 - Application Isolation on Kubernetes
 
MongoDB World 2018: Partner Talk - Red Hat: Deploying to Enterprise Kubernetes
MongoDB World 2018: Partner Talk - Red Hat: Deploying to Enterprise KubernetesMongoDB World 2018: Partner Talk - Red Hat: Deploying to Enterprise Kubernetes
MongoDB World 2018: Partner Talk - Red Hat: Deploying to Enterprise Kubernetes
 
Using MongoDB with Kafka - Use Cases and Best Practices
Using MongoDB with Kafka -  Use Cases and Best PracticesUsing MongoDB with Kafka -  Use Cases and Best Practices
Using MongoDB with Kafka - Use Cases and Best Practices
 
CN Asturias - Stateful application for kubernetes
CN Asturias -  Stateful application for kubernetes CN Asturias -  Stateful application for kubernetes
CN Asturias - Stateful application for kubernetes
 
Modern Cloud-Native Streaming Platforms: Event Streaming Microservices with A...
Modern Cloud-Native Streaming Platforms: Event Streaming Microservices with A...Modern Cloud-Native Streaming Platforms: Event Streaming Microservices with A...
Modern Cloud-Native Streaming Platforms: Event Streaming Microservices with A...
 
Kubernetes workshop -_the_basics
Kubernetes workshop -_the_basicsKubernetes workshop -_the_basics
Kubernetes workshop -_the_basics
 
BDW Chicago 2016 - Jayesh Thakrar, Sr. Software Engineer, Conversant - Data...
BDW Chicago 2016 -  Jayesh Thakrar, Sr. Software Engineer, Conversant -  Data...BDW Chicago 2016 -  Jayesh Thakrar, Sr. Software Engineer, Conversant -  Data...
BDW Chicago 2016 - Jayesh Thakrar, Sr. Software Engineer, Conversant - Data...
 
Building Stream Processing Applications with Apache Kafka's Exactly-Once Proc...
Building Stream Processing Applications with Apache Kafka's Exactly-Once Proc...Building Stream Processing Applications with Apache Kafka's Exactly-Once Proc...
Building Stream Processing Applications with Apache Kafka's Exactly-Once Proc...
 
Kafka Explainaton
Kafka ExplainatonKafka Explainaton
Kafka Explainaton
 
Apache Kafka - Event Sourcing, Monitoring, Librdkafka, Scaling & Partitioning
Apache Kafka - Event Sourcing, Monitoring, Librdkafka, Scaling & PartitioningApache Kafka - Event Sourcing, Monitoring, Librdkafka, Scaling & Partitioning
Apache Kafka - Event Sourcing, Monitoring, Librdkafka, Scaling & Partitioning
 
Architecture patterns for distributed, hybrid, edge and global Apache Kafka d...
Architecture patterns for distributed, hybrid, edge and global Apache Kafka d...Architecture patterns for distributed, hybrid, edge and global Apache Kafka d...
Architecture patterns for distributed, hybrid, edge and global Apache Kafka d...
 
Building Microservices with Apache Kafka
Building Microservices with Apache KafkaBuilding Microservices with Apache Kafka
Building Microservices with Apache Kafka
 
Devoxx Morocco 2016 - Microservices with Kafka
Devoxx Morocco 2016 - Microservices with KafkaDevoxx Morocco 2016 - Microservices with Kafka
Devoxx Morocco 2016 - Microservices with Kafka
 
Learnings From Shipping 1000+ Streaming Data Pipelines To Production with Hak...
Learnings From Shipping 1000+ Streaming Data Pipelines To Production with Hak...Learnings From Shipping 1000+ Streaming Data Pipelines To Production with Hak...
Learnings From Shipping 1000+ Streaming Data Pipelines To Production with Hak...
 
Kafka at the Edge: an IoT scenario with OpenShift Streams for Apache Kafka | ...
Kafka at the Edge: an IoT scenario with OpenShift Streams for Apache Kafka | ...Kafka at the Edge: an IoT scenario with OpenShift Streams for Apache Kafka | ...
Kafka at the Edge: an IoT scenario with OpenShift Streams for Apache Kafka | ...
 
MicroProfile, Docker, Kubernetes, Istio and Open Shift lab @dev nexus
MicroProfile, Docker, Kubernetes, Istio and Open Shift lab @dev nexusMicroProfile, Docker, Kubernetes, Istio and Open Shift lab @dev nexus
MicroProfile, Docker, Kubernetes, Istio and Open Shift lab @dev nexus
 
Event Streaming Architectures with Confluent and ScyllaDB
Event Streaming Architectures with Confluent and ScyllaDBEvent Streaming Architectures with Confluent and ScyllaDB
Event Streaming Architectures with Confluent and ScyllaDB
 
Docker kubernetes fundamental(pod_service)_190307
Docker kubernetes fundamental(pod_service)_190307Docker kubernetes fundamental(pod_service)_190307
Docker kubernetes fundamental(pod_service)_190307
 
APAC ksqlDB Workshop
APAC ksqlDB WorkshopAPAC ksqlDB Workshop
APAC ksqlDB Workshop
 
Salvatore Incandela, Fabio Marinelli - Using Spinnaker to Create a Developmen...
Salvatore Incandela, Fabio Marinelli - Using Spinnaker to Create a Developmen...Salvatore Incandela, Fabio Marinelli - Using Spinnaker to Create a Developmen...
Salvatore Incandela, Fabio Marinelli - Using Spinnaker to Create a Developmen...
 

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 LondonHostedbyConfluent
 
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 TrendyolHostedbyConfluent
 
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 TechniquesHostedbyConfluent
 
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 KafkaHostedbyConfluent
 
Fish Plays Pokemon | Kafka Summit London
Fish Plays Pokemon | Kafka Summit LondonFish Plays Pokemon | Kafka Summit London
Fish Plays Pokemon | Kafka Summit LondonHostedbyConfluent
 
Tiered Storage 101 | Kafla Summit London
Tiered Storage 101 | Kafla Summit LondonTiered Storage 101 | Kafla Summit London
Tiered Storage 101 | Kafla Summit LondonHostedbyConfluent
 
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 WhyHostedbyConfluent
 
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 ClustersHostedbyConfluent
 
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 PlatformHostedbyConfluent
 
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 PubHostedbyConfluent
 
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 LondonHostedbyConfluent
 
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 | KSLHostedbyConfluent
 
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 PerformanceHostedbyConfluent
 
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 BeyondHostedbyConfluent
 
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 AppsHostedbyConfluent
 
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 EcosystemHostedbyConfluent
 
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 DisksHostedbyConfluent
 

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

Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 

Recently uploaded (20)

Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 

Highly Available Kafka Consumers and Kafka Streams on Kubernetes with Adrian McCague

  • 1. Highly available Kafka Consumers and Streams on Kubernetes Adrian McCague, Zopa Bank
  • 2.
  • 3. 0.10.0 → 3.X 3 • In Production since 2017 • Nearly 700 consumer groups • Realtime, stream-processing applications • Kafka Streams ‘early adopters’ • Kubernetes hosted • … not been without pain …
  • 6. Kafka Consumer 6 Consumer join group rebalance time
  • 8. Kafka Consumer 8 recovery time = session timeout + rebalance time
  • 10. Kafka Consumer 10 Consumer group rebalance rebalance time
  • 11. Kafka Consumer 11 Consumer group (possible) transient steady-state
  • 12. Kafka Consumer 12 Consumer group rebalance 2 rebalance time
  • 14. High availability goals 14 • Minimise ‘stop-the-world’ situations • Max availability in planned events • Max availability in un-planned events
  • 15. Planned events 15 • Cluster maintenance • Worker node maintenance • New application deployment • Application horizontal scaling
  • 16. Un-planned events 16 • Cluster auto-scaling • Worker node termination • Container termination • Application horizontal scaling • Transient network issues • Pod pre-emption
  • 17. Intermediate goals 17 • Maximise replica redundancy • Keep as many replicas up as possible • Do not impede cluster operations
  • 22. kind: Deployment apiVersion: apps/v1 metadata: name: consumer-app ... spec: ... template: metadata: labels: app.kubernetes.io/name: consumer-app spec: ... containers: - ... affinity: podAntiAffinity: preferredDuringSchedulingIgnoredDuringExecution: - weight: 1 podAffinityTerm: labelSelector: matchExpressions: - key: app.kubernetes.io/name operator: In values: - consumer-app topologyKey: topology.kubernetes.io/zone - weight: 1 podAffinityTerm: labelSelector: matchExpressions: - key: app.kubernetes.io/name operator: In values: - consumer-app topologyKey: kubernetes.io/hostname Kubernetes 22 Schedule consumers (pods) evenly affinity: podAntiAffinity: preferredDuringSchedulingIgnoredDuringExecution: - weight: 1 podAffinityTerm: labelSelector: matchExpressions: - key: app.kubernetes.io/name operator: In values: - consumer-app topologyKey: topology.kubernetes.io/zone - weight: 1 podAffinityTerm: labelSelector: matchExpressions: - key: app.kubernetes.io/name operator: In values: - consumer-app topologyKey: kubernetes.io/hostname
  • 23. kind: Deployment apiVersion: apps/v1 metadata: name: consumer-app ... spec: ... template: metadata: labels: app.kubernetes.io/name: consumer-app spec: ... containers: - ... topologySpreadConstraints: - maxSkew: 1 topologyKey: topology.kubernetes.io/zone whenUnsatisfiable: ScheduleAnyway / DoNotSchedule labelSelector: matchLabels: app.kubernetes.io/name: consumer-app - maxSkew: 1 topologyKey: kubernetes.io/hostname whenUnsatisfiable: ScheduleAnyway / DoNotSchedule labelSelector: matchLabels: app.kubernetes.io/name: consumer-app Kubernetes 23 Schedule consumers (pods) evenly - in Kubernetes 1.24 topologySpreadConstraints: - maxSkew: 1 topologyKey: topology.kubernetes.io/zone whenUnsatisfiable: ScheduleAnyway labelSelector: matchLabels: app.kubernetes.io/name: consumer-app - maxSkew: 1 topologyKey: kubernetes.io/hostname whenUnsatisfiable: ScheduleAnyway labelSelector: matchLabels: app.kubernetes.io/name: consumer-app
  • 25. Intermediate goals 25 • Maximise replica redundancy • Keep as many replicas up as possible • Do not impede cluster operations
  • 26. kind: Deployment apiVersion: apps/v1 metadata: name: consumer-app ... spec: ... template: metadata: labels: app.kubernetes.io/name: consumer-app spec: ... containers: - ... readinessProbe: httpGet: path: /healthz/ready port: 8080 scheme: HTTP timeoutSeconds: 20 periodSeconds: 15 successThreshold: 1 failureThreshold: 2 ---------- kind: PodDisruptionBudget apiVersion: policy/v1 metadata: name: consumer-app spec: maxUnavailable: 1 selector: matchLabels: app.kubernetes.io/name: consumer-app Make Kubernetes aware of consumer state 26 Configure readiness probes & Pod Disruption Budgets containers: - ... readinessProbe: httpGet: path: /healthz/ready port: 8080 scheme: HTTP timeoutSeconds: 20 periodSeconds: 15 successThreshold: 1 failureThreshold: 2 maxUnavailable: 1 selector: matchLabels: app.kubernetes.io/name: consumer-app
  • 27. Make Kubernetes aware of consumer state 27 Tie-in readiness to rebalancing state Kafka Consumer class org.apache.kafka.clients.consumer.KafkaConsumer<K,V> void subscribe(Collection<String> topics, ConsumerRebalanceListener callback) public interface org.apache.kafka.clients.consumer.ConsumerRebalanceListener void onPartitionsRevoked(Collection<TopicPartition> partitions) void onPartitionsAssigned(Collection<TopicPartition> partitions)
  • 28. Make Kubernetes aware of consumer state 28 Tie-in readiness to rebalancing state Kafka Streams class org.apache.kafka.streams.KafkaStreams public void setStateListener(KafkaStreams.StateListener listener) interface org.apache.kafka.streams.KafkaStreams.StateListener void onChange(KafkaStreams.State newState, KafkaStreams.State oldState) Ready: oldState == State.REBALANCING && newState == State.RUNNING Unready: newState != State.RUNNING
  • 30. Kubernetes good citizens 30 Factor out your applications carefully • Try to stick to a single API type per application • Kafka Streams: Interactive Queries can be an exception • Keep your microservices ‘micro’ • Probes should be efficient and not depend on external services
  • 31. Kubernetes will respect the disruption budget 31 Multiple scenarios supported • Cluster maintenance • Cluster autoscaling • Rolling deployment* • Involuntary disruptions* * Counts towards the budget only
  • 32. kind: Deployment apiVersion: apps/v1 metadata: name: consumer-app ... spec: strategy: type: RollingUpdate rollingUpdate: maxSurge: 0 maxUnavailable: 1 ... template: metadata: labels: app.kubernetes.io/name: consumer-app spec: ... containers: - ... Kubernetes rolling deployment 32 Minimise the fallout from a rollout strategy: type: RollingUpdate rollingUpdate: maxSurge: 0 maxUnavailable: 1 The default strategy is generally unfriendly for consumers
  • 39. Intermediate goals 39 • Maximise replica redundancy • Keep as many replicas up as possible • Do not impede cluster operations
  • 40. High availability goals 40 • Minimise ‘stop-the-world’ situations • Max availability in planned events • Max availability in un-planned events
  • 42. Cooperative incremental rebalancing 42 Localise the rebalance to where it’s required
  • 43. Cooperative incremental rebalancing 43 Read the documentation! Kafka Consumer partition.assignment.strategy = [org.apache.kafka.clients.consumer.CooperativeStickyAssignor] Before 3.0 default: [RangeAssignor] After 3.0 default: [RangeAssignor, CooperativeStickyAssignor] Opting in
  • 44. Cooperative incremental rebalancing 44 Opting in Read the documentation! Kafka Streams Built into the StreamPartitionAssignor, for free™ Available from Kafka clients 2.4 https://kafka.apache.org/34/documentation/streams/upgrade-guide
  • 45. Almost there.. 45 Minimise the rebalance time, but still wait for session timeout recovery time = session timeout + rebalance time
  • 46. Static consumer group membership 46 Making static membership work with well with Kubernetes “group.instance.id” CommonClientConfigs.GROUP_INSTANCE_ID_C ONFIG Works together session.timeout.ms Increased to 45s in 3.0 (from 10s) KIP-345: Introduce static membership protocol to reduce consumer rebalances (2.4)
  • 47. Use the Kubernetes ‘downward API’ 47 Making the pod name available to the application kind: Deployment apiVersion: apps/v1 metadata: name: consumer-app ... spec: ... template: ... spec: ... containers: - ... env: - name: K8S_POD_NAME valueFrom: fieldRef: apiVersion: v1 fieldPath: metadata.name ... env: - name: K8S_POD_NAME valueFrom: fieldRef: apiVersion: v1 fieldPath: metadata.name
  • 48. Static consumer group membership 48 Making static membership work with well with Kubernetes
  • 49. Get a static name with StatefulSets 49 Constant set of pod names * Bonus: no surges, pod by pod rolling deployments
  • 50. Autoscaling? 50 Watch out for static membership • Static membership prevents consumers from sending leave group requests • session.timeout.ms could be set low, at the risk of more rebalances • Dynamic membership? • Could use an operator to scale down interface org.apache.kafka.clients.admin.Admin RemoveMembersFromConsumerGroupResult removeMembersFromConsumerGroup( String groupId, RemoveMembersFromConsumerGroupOptions options);
  • 51. In review 51 Optimised pod layout • Topology spread constraints Made Kubernetes aware of replica state • Health checks + Pod Disruption Budgets Minimised rebalances + stop-the-world • Incremental Co-operative Rebalancing Minimised session timeout impact • Static membership recovery time = session timeout + rebalance time
  • 52. Bonus: Kafka Streams 52 recovery time = session timeout + rebalance time + task assignment time + state restore time
  • 53. Kafka Streams State Stores 53 Stores are typically written to Kafka for durability
  • 54. Kafka Streams State Stores 54 Allows for restoration to another replica * Only stopping the world with streams client Kafka < 2.4
  • 55. Kafka Streams State Stores 55 Service can resume
  • 56. Kafka Streams State Stores 56 Standby replicas “num.standby.replicas” = 1
  • 57. Kafka Streams State Stores 57 Standby replicas – faster restoration of the delta “num.standby.replicas” = 1 --
  • 58. Kafka Streams State Stores 58 Standby replicas – after restoration “num.standby.replicas” = 1
  • 59. Consider persistent volumes 59 Making the pod name available to the application kind: StatefulSet apiVersion: apps/v1 metadata: name: consumer-app ... spec: ... template: ... spec: ... containers: - ... volumeMounts: - name: statefulstorage mountPath: /data volumeClaimTemplates: - metadata: name: statefulstorage spec: accessModes: - ReadWriteOnce storageClassName: gp2-retain resources: requests: storage: 2Gi containers: - ... volumeMounts: - name: statefulstorage mountPath: /data volumeClaimTemplates: - metadata: name: statefulstorage spec: accessModes: - ReadWriteOnce storageClassName: gp2-retain resources: requests: storage: 2Gi state.dir = “/data”
  • 60. Kafka Streams: to be aware of 60 • KIP-441: Smooth scaling out of Kafka Streams (2.6) • KIP-535: Allow IQ reads during rebalance (2.5) • KAFKA-13439: Eager rebalancing of Kafka Streams deprecated (3.1) • KIP-708: Rack aware Kafka Streams apps (3.2)
  • 61. Future developments 61 • KIP-848: The Next Generation of the Consumer Rebalance Protocol • KAFKA-10199: Separate state restoration into separate threads (3.5?)