Skip to main content
InterviewHubPRO
Section Overview
Q46

Question 46 of 50

Part 3: Advanced Internals, Scale & Production Architecture (Senior / Lead)

92%
Apache Kafka Streaming (50 Qs)•Part 3: Advanced Internals, Scale & Production Architecture (Senior / Lead)

Kafka Broker Socket Request Handlers: Acceptor thread, network processor threads, and I/O worker threads.

senior LevelSystem DesignApache KafkaMicroservices

In Simple Words: Understanding Kafka's low-level multi-threaded network model:

  1. Acceptor Thread (1 per port): Accepts new incoming TCP connections from clients and delegates the socket to a Network Thread in a round-robin pool.
  2. Network Threads (num.network.threads = 8): Reads incoming request frames from client sockets, places them onto the Request Queue, and writes outgoing responses back to sockets.
  3. I/O Threads (num.io.threads = 16): Worker threads that pull requests from the Request Queue, perform local disk reads/writes or memory page cache operations, and push results to the Response Queue.