Performance & Scalability Flashcards

(4 cards)

1
Q

Why is Kafka so fast?

A

Kafka achieves high throughput through: Sequential I/O on disk, zero-copy data transfer, batching of messages, efficient data format, and partitioning for parallel processing.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is the role of batching in Kafka performance?

A

Producers batch multiple messages together before sending, reducing the number of network round trips. This significantly increases throughput at the cost of slight latency increase.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How does Kafka handle backpressure?

A

Kafka handles backpressure naturally through its pull-based consumer model. Consumers process at their own pace, so fast producers don’t overwhelm slow consumers (within retention limits).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is the relationship between partitions and consumers?

A

In a consumer group, each partition is consumed by exactly one consumer. The maximum parallelism for a topic is equal to the number of partitions. More partitions = more potential consumers.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly