Apache Kafka Flashcards

1
Q

What is Apache Kafka?

A

An open source message broker developed by LinkedIn and written mainly in Scala.

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

What is Kafka’s purpose?

A

Kafka facilitates distributed messaging between applications, reducing coupling and redundant code.

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

What is the need for Kafka?

A

In systems with multiple applications (e.g., inventory, customer care, and review checker), direct communication leads to tight coupling and redundant code.

Kafka acts as a message broker, decoupling these applications and simplifying communication.

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

What is the difference between Kafka and other message brokers?

A

Kafka uses the “dumb broker, smart consumer” model and integrates with external tools like Zookeeper for distributed management.

Kafka also supports high message throughput (100,000 messages per second) compared to others (20,000 messages per second).

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

What is a producer?

A

Sends message to Kafka.

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

What is a consumer?

A

Reads messages from Kafka.

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

What is a broker?

A

Stores and routes messages

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

What is a topic?

A

Logical grouping for messages.

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

What are partitions?

A

Kafka topics that have been divided to distribute load. Each partition can be on different nodes.

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

What is a consumer group?

A

Multiple consumers can belong to the same group, and each group reads from unique partitions for load distribution.

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

What is a producer failure?

A

If a producer fails, messages remain in Kafka until consumers fetch them.

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

What is a consumer failure?

A

If a consumer fails, partitions assigned to it can be reassigned to other consumers in the same group.

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

What is replication?

A

Kafka replicated partitions (typically a factor of 3) to ensure data availability and fault tolerance.

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

What are the indexing options for commit management and what do they do?

A

Auto Commit: offsets are committed automatically at regular intervals. Suitable for lower data integrity requirements.

Sync Commit: Offset is committed synchronously, ensuring high accuracy but lower speed.

Async Commit: Offset is committed asynchronously, balancing speed and reliability.

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

What is the leader-follower model?

A

A fault tolerance that makes it so each partition has a leader, responsible for data writes, and followers replicate data from the leader.

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

What is the In-Sync Replicas (ISR)?

A

A fault tolerance that makes it so only replicas that are in sync with the leader are considered reliable for data availability.

17
Q

What is node recovery?

A

A fault tolerance that works if the leader node fails, a new leader is chosen from the ISR.

18
Q

What is Apache ZooKeeper?

A

Manages Kafka brokers, topics, and partitions. It keeps track of partition leaders and manages failover.

19
Q

What is the dumb broker, smart consumer system?

A

It keeps message routing simple, while consumers track and manage their own message processing.

20
Q

What is ZooKeeper?

A

Coordinates distributed brokers.