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

Performance Tuning RocksDB for Kafka Streams’ State Stores
Performance Tuning RocksDB for Kafka Streams’ State StoresPerformance Tuning RocksDB for Kafka Streams’ State Stores
Performance Tuning RocksDB for Kafka Streams’ State Storesconfluent
 
Common issues with Apache Kafka® Producer
Common issues with Apache Kafka® ProducerCommon issues with Apache Kafka® Producer
Common issues with Apache Kafka® Producerconfluent
 
Introducing BinarySortedMultiMap - A new Flink state primitive to boost your ...
Introducing BinarySortedMultiMap - A new Flink state primitive to boost your ...Introducing BinarySortedMultiMap - A new Flink state primitive to boost your ...
Introducing BinarySortedMultiMap - A new Flink state primitive to boost your ...Flink Forward
 
Tame the small files problem and optimize data layout for streaming ingestion...
Tame the small files problem and optimize data layout for streaming ingestion...Tame the small files problem and optimize data layout for streaming ingestion...
Tame the small files problem and optimize data layout for streaming ingestion...Flink Forward
 
Streaming all over the world Real life use cases with Kafka Streams
Streaming all over the world  Real life use cases with Kafka StreamsStreaming all over the world  Real life use cases with Kafka Streams
Streaming all over the world Real life use cases with Kafka Streamsconfluent
 
Apache kafka 모니터링을 위한 Metrics 이해 및 최적화 방안
Apache kafka 모니터링을 위한 Metrics 이해 및 최적화 방안Apache kafka 모니터링을 위한 Metrics 이해 및 최적화 방안
Apache kafka 모니터링을 위한 Metrics 이해 및 최적화 방안SANG WON PARK
 
Introduction to Apache Kafka
Introduction to Apache KafkaIntroduction to Apache Kafka
Introduction to Apache KafkaShiao-An Yuan
 
Autoscaling Flink with Reactive Mode
Autoscaling Flink with Reactive ModeAutoscaling Flink with Reactive Mode
Autoscaling Flink with Reactive ModeFlink Forward
 
Using the New Apache Flink Kubernetes Operator in a Production Deployment
Using the New Apache Flink Kubernetes Operator in a Production DeploymentUsing the New Apache Flink Kubernetes Operator in a Production Deployment
Using the New Apache Flink Kubernetes Operator in a Production DeploymentFlink Forward
 
Apache Kafka - Martin Podval
Apache Kafka - Martin PodvalApache Kafka - Martin Podval
Apache Kafka - Martin PodvalMartin Podval
 
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 Planningconfluent
 
Improving fault tolerance and scaling out in Kafka Streams with Bill Bejeck |...
Improving fault tolerance and scaling out in Kafka Streams with Bill Bejeck |...Improving fault tolerance and scaling out in Kafka Streams with Bill Bejeck |...
Improving fault tolerance and scaling out in Kafka Streams with Bill Bejeck |...HostedbyConfluent
 
Apache kafka 확장과 응용
Apache kafka 확장과 응용Apache kafka 확장과 응용
Apache kafka 확장과 응용JANGWONSEO4
 
Apache Kafka in the Airline, Aviation and Travel Industry
Apache Kafka in the Airline, Aviation and Travel IndustryApache Kafka in the Airline, Aviation and Travel Industry
Apache Kafka in the Airline, Aviation and Travel IndustryKai Wähner
 
Fundamentals of Apache Kafka
Fundamentals of Apache KafkaFundamentals of Apache Kafka
Fundamentals of Apache KafkaChhavi Parasher
 
Getting Started with Confluent Schema Registry
Getting Started with Confluent Schema RegistryGetting Started with Confluent Schema Registry
Getting Started with Confluent Schema Registryconfluent
 
Dynamically Scaling Data Streams across Multiple Kafka Clusters with Zero Fli...
Dynamically Scaling Data Streams across Multiple Kafka Clusters with Zero Fli...Dynamically Scaling Data Streams across Multiple Kafka Clusters with Zero Fli...
Dynamically Scaling Data Streams across Multiple Kafka Clusters with Zero Fli...Flink Forward
 

What's hot (20)

Envoy and Kafka
Envoy and KafkaEnvoy and Kafka
Envoy and Kafka
 
Performance Tuning RocksDB for Kafka Streams’ State Stores
Performance Tuning RocksDB for Kafka Streams’ State StoresPerformance Tuning RocksDB for Kafka Streams’ State Stores
Performance Tuning RocksDB for Kafka Streams’ State Stores
 
Common issues with Apache Kafka® Producer
Common issues with Apache Kafka® ProducerCommon issues with Apache Kafka® Producer
Common issues with Apache Kafka® Producer
 
Introducing BinarySortedMultiMap - A new Flink state primitive to boost your ...
Introducing BinarySortedMultiMap - A new Flink state primitive to boost your ...Introducing BinarySortedMultiMap - A new Flink state primitive to boost your ...
Introducing BinarySortedMultiMap - A new Flink state primitive to boost your ...
 
Tame the small files problem and optimize data layout for streaming ingestion...
Tame the small files problem and optimize data layout for streaming ingestion...Tame the small files problem and optimize data layout for streaming ingestion...
Tame the small files problem and optimize data layout for streaming ingestion...
 
Streaming all over the world Real life use cases with Kafka Streams
Streaming all over the world  Real life use cases with Kafka StreamsStreaming all over the world  Real life use cases with Kafka Streams
Streaming all over the world Real life use cases with Kafka Streams
 
Apache kafka 모니터링을 위한 Metrics 이해 및 최적화 방안
Apache kafka 모니터링을 위한 Metrics 이해 및 최적화 방안Apache kafka 모니터링을 위한 Metrics 이해 및 최적화 방안
Apache kafka 모니터링을 위한 Metrics 이해 및 최적화 방안
 
Introduction to Apache Kafka
Introduction to Apache KafkaIntroduction to Apache Kafka
Introduction to Apache Kafka
 
Kafka basics
Kafka basicsKafka basics
Kafka basics
 
Autoscaling Flink with Reactive Mode
Autoscaling Flink with Reactive ModeAutoscaling Flink with Reactive Mode
Autoscaling Flink with Reactive Mode
 
Using the New Apache Flink Kubernetes Operator in a Production Deployment
Using the New Apache Flink Kubernetes Operator in a Production DeploymentUsing the New Apache Flink Kubernetes Operator in a Production Deployment
Using the New Apache Flink Kubernetes Operator in a Production Deployment
 
Apache Kafka - Martin Podval
Apache Kafka - Martin PodvalApache Kafka - Martin Podval
Apache Kafka - Martin Podval
 
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
 
Improving fault tolerance and scaling out in Kafka Streams with Bill Bejeck |...
Improving fault tolerance and scaling out in Kafka Streams with Bill Bejeck |...Improving fault tolerance and scaling out in Kafka Streams with Bill Bejeck |...
Improving fault tolerance and scaling out in Kafka Streams with Bill Bejeck |...
 
Apache kafka 확장과 응용
Apache kafka 확장과 응용Apache kafka 확장과 응용
Apache kafka 확장과 응용
 
Kafka 101
Kafka 101Kafka 101
Kafka 101
 
Apache Kafka in the Airline, Aviation and Travel Industry
Apache Kafka in the Airline, Aviation and Travel IndustryApache Kafka in the Airline, Aviation and Travel Industry
Apache Kafka in the Airline, Aviation and Travel Industry
 
Fundamentals of Apache Kafka
Fundamentals of Apache KafkaFundamentals of Apache Kafka
Fundamentals of Apache Kafka
 
Getting Started with Confluent Schema Registry
Getting Started with Confluent Schema RegistryGetting Started with Confluent Schema Registry
Getting Started with Confluent Schema Registry
 
Dynamically Scaling Data Streams across Multiple Kafka Clusters with Zero Fli...
Dynamically Scaling Data Streams across Multiple Kafka Clusters with Zero Fli...Dynamically Scaling Data Streams across Multiple Kafka Clusters with Zero Fli...
Dynamically Scaling Data Streams across Multiple Kafka Clusters with Zero Fli...
 

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

Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Neo4j
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentationphoebematthew05
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 

Recently uploaded (20)

Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentation
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 

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?)