Status

Current state"Accepted"

Discussion thread: here

JIRA

Please keep the discussion on the mailing list rather than commenting on the wiki (wiki discussions get unwieldy fast).

Motivation

In large scale Kafka cluster which handles requests from massive clients, preferred leader election (e.g. upon restarting broker) could cause many clients to open connection to a broker in a short period.

Sometimes this causes Acceptor socket's SYN backlog to be filled up. In case this happens, further incoming connections will be handled differently depending on `tcp_syncookies` kernel parameter in Linux.

  1. Drop further SYN packets (`tcp_syncookies = 0`)
  2. SYN packets are handled with "SYN cookies" (`tcp_syncookies = 1`)


Both are undesirable, and can be mitigated by increasing backlog size passed to `ServerSocket#bind()` as necessary.

Public Interfaces

We propose a new KafkaConfig

Proposed Changes

KafkaConfig

SocketServer

Compatibility, Deprecation, and Migration Plan

Rejected Alternatives

  1. Increase static backlog size without introducing new config