socket.connection.setup.timeout.ms — Kafka Broker Configuration
The amount of time the client will wait for the socket connection to be established. If the connection is not built before the timeout elapses, clients will close the socket channel.
Description
The amount of time the client will wait for the socket connection to be established. If the connection is not built before the timeout elapses, clients will close the socket channel. This value is the initial backoff value and will increase exponentially for each consecutive connection failure, up to the socket.connection.setup.timeout.max.ms value.
Default Values by Kafka Version
| Kafka Version | Default Value |
|---|---|
| 2.7 | 10000 (10 seconds) |
| 2.8 | 10000 (10 seconds) |
| 3.0 | 10000 (10 seconds) |
| 3.1 | 10000 (10 seconds) |
| 3.2 | 10000 (10 seconds) |
| 3.3 | 10000 (10 seconds) |
| 3.4 | 10000 (10 seconds) |
| 3.5 | 10000 (10 seconds) |
| 3.6 | 10000 (10 seconds) |
| 3.7 | 10000 (10 seconds) |
| 3.8 | 10000 (10 seconds) |
| 3.9 | 10000 (10 seconds) |
| 4.0 | 10000 (10 seconds) |
| 4.1 | 10000 (10 seconds) |
| 4.2 | 10000 (10 seconds) |
Tuning Recommendation
| Profile | Recommended | Why |
|---|---|---|
| producer / latency | 3000 | Reducing the initial TCP connection setup timeout to 3s ensures the producer fails fast on unreachable brokers and triggers re-bootstrap sooner, avoiding 10s of blocked send() time on the first request to a cold or failed broker. |
Related Configs
socket.connection.setup.timeout.max.ms · reconnect.backoff.ms
Manage Kafka configs across all your clusters with Conduktor Console — view, compare, and update configurations in one place.