Kafka tips for
the Devops Trenches
StevenLeRoux
@StevenLeRoux
@FinistDevs
$ whoami
To change the footer
@FinistDevs
Streaming
Platform
To add an image:
@FinistDevs
To add an image:
Who needs streaming?
@FinistDevs
To add an image:
@FinistDevs
To add an image:
What is Kafka?
Kafka is a Commit Log
@FinistDevs
To add an image:
What’s a Commit Log
@FinistDevs
To add an image:
What’s a commit log?
user
@FinistDevs
To add an image:
What’s a commit log?
user
txn
@FinistDevs
To add an image:
What’s a commit log?
user
txn
WAL
@FinistDevs
To add an image:
What’s a commit log?
user
txn
WAL
...
@FinistDevs
To add an image:
What’s a commit log?
user
txn
WAL
...
@FinistDevs
To add an image:
What’s a commit log?
@FinistDevs
To add an image:
What’s a commit log?
@FinistDevs
To add an image:
What is Kafka?
Kafka is a Distributed Commit Log
@FinistDevs
To add an image:
What is Kafka?
@FinistDevs
/ kafka / topic
To add an image:
@FinistDevs
/ kafka / topic / replicas
To add an image:
@FinistDevs
/ kafka / topic / replicas / factor / 3
To add an image:
@FinistDevs
/ kafka / topic
To add an image:
@FinistDevs
To add an image:
Kafka Partitions
@FinistDevs
To add an image:
Kafka Scaling
#partitions
#consumers
@FinistDevs
/ kafka / customer
To add an image:
@FinistDevs
/ kafka / cluster
To add an image:
@FinistDevs
/ kafka
To add an image:
@FinistDevs
To add an image:
What’s your use case ?
@FinistDevs
To add an image:
Customer driven
Generics vs Purpose built
@FinistDevs
To add an image:
Customer driven
It Starts with
Hardware consideration
@FinistDevs
To add an image:
Why?
@FinistDevs
To add an image:
my use cases with Apache Kafka
Stream Processing………………………....OK
Messaging / PubSub…………………..….OK
Asynchronous process……….….........OK
Whatsoever……….…..................................OK
@FinistDevs
To add an image:
Do you need to replay your data?
@FinistDevs
To add an image:
my use cases with Apache Kafka
Whatsoever………...….…..................................OK
With replay.…..................................DEPENDS
@FinistDevs
Metrics Data Platform - @OvhMetrics
To add an image:
@FinistDevs
To add an image:
Seek Time
@FinistDevs
To add an image:
HDD vs SSD vs BS
@FinistDevs
To add an image:
Data Transfer Rates
Mbps 100 1000 10000
MB/s 12.5 125 1250
1 Mo 80ms 8ms 0.8ms
1 CD (700 Mo) 56s 5.6s 0.56s
1 Go (1000 Mo) 1m20 8s 0.8s
1 DVD (4700 Mo) 6m16 37.6s 3.76s
1 To (1000 Go) 22h13 2h13m 13m
@FinistDevs
To add an image:
Data Transfer Rates
Mbps 100 1000 10000
MB/s 12.5 125 1250
1 min 750 MB 7.5 GB 75 GB
15 min 11 GB 112 GB 1 TB
1 hour 45 GB 450 GB 4.5 TB
1 day 1TB 10.8 TB 108 TB
@FinistDevs
Metrics Data Platform - @OvhMetrics
To add an image:
@FinistDevs
To add an image:
You need an OS
for your hardware
@FinistDevs
To add an image:
OS Considerations
@FinistDevs
To add an image:
Now we can focus on
Apache Kafka
itself
@FinistDevs
To add an image:
Availability
Consistency
Partitioning
CA
AP
CP
@FinistDevs
To add an image:
Consistency : Producer side
Setting | Desc | Consistency | Performance |
Acks = 0 | “Fire and forget” | - | ++ |
Acks = 1 | Wait for leader acknowlegement | + | + |
Acks = all | Wait for followers acknowlegements | ++ | - |
@FinistDevs
To add an image:
Clients (producers) may have
no consideration for
your cluster topology
@FinistDevs
To add an image:
Consistency : Cluster side
Remember : Purpose Built
@FinistDevs
To add an image:
Consistency : Cluster side
@FinistDevs
To add an image:
Consistency : Cluster side
ISR : In Sync Replicas
@FinistDevs
To add an image:
Global Consistency : The Three Axis Rule
#Consistency
#Availability
#Performance
Acks = 0
unclean.leader.election.enable=true
min.insync.replicas
acks = all
unclean.leader.election.enable=false
min.insync.replicas=2
acks = 0/1
unclean.leader.election.enable=true
min.insync.replicas
@FinistDevs
To add an image:
Store Streams
@FinistDevs
To add an image:
Storing Considerations
=> log.retention.(bytes|time)
@FinistDevs
To add an image:
Performance considerations
@FinistDevs
To add an image:
Performance Considerations
batch.size
linger.ms
Buffer memory
@FinistDevs
To add an image:
Performance Considerations
batch.size
linger.ms
latency
thoughput
@FinistDevs
To add an image:
Performance Considerations
batch.size
linger.ms
latency
thoughput
@FinistDevs
To add an image:
And More….
@FinistDevs
To add an image:
Performance
Scale out infrastructure
@FinistDevs
Wrap up
To change the footer
@FinistDevs
Thank you!
?
@StevenLeRoux
@FinistDevs
Metrics Data Platform - @OvhMetrics
To add an image:
@FinistDevs
ICONS
How to change the size of the icons:
How to change the color of the icons:
@FinistDevs
ICONS
How to change the size of the icons:
How to change the color of the icons:
@FinistDevs
ICONS
How to change the size of the icons:
How to change the color of the icons:
@FinistDevs
ICONS
How to change the size of the icons:
How to change the color of the icons:
@FinistDevs
ICONS
How to change the size of the icons:
How to change the color of the icons:
@FinistDevs