envoyproxy / envoyproxy/envoy

tcp_backlog_size configured via xDS is not applied to kernel sockets on listener update

Open
#45,478 4 comments 0 reactions 1 assignee Claimed by @ramachaitanyak View on GitHub
area/listener
Dominant language
C++
Stars
28.9k
Forks
5.6k
Avg merge
1d 20h
Merged PRs (30d)
428

Description

*Description*:
> tcp_backlog_size set on a listener appears correctly in /config_dump but has no effect on the actual kernel listener sockets when the listener is updated via xDS. All sockets continue to use the previous backlog value.

[optional *Relevant Links*:]
> Steps to Reproduce

> 1. Start Envoy with a listener on port 7070 (no tcp_backlog_size set — default applies)
>2. Send an xDS update setting tcp_backlog_size: 64 on that listener
>3. Check config_dump and socket state:

> //Shows 64 — config_dump reflects the new value
>curl -s localhost:9000/config_dump | jq '.. | objects | select(.name=="").active_state.listener.tcp_backlog_size'
64

> //Shows 65535 — kernel socket unchanged
>ss -ltn | grep ':7070'
>LISTEN 0 65535 0.0.0.0:7070 0.0.0.0:*
>LISTEN 0 65535 0.0.0.0:7070 0.0.0.0:*
> ... (one per worker)

>//Expected Behaviour

>ss Send-Q should reflect min(tcp_backlog_size, net.core.somaxconn) = min(64, 65535) = 64.

>//Actual Behaviour

>All listener sockets show Send-Q = 65535 regardless of the configured tcp_backlog_size. The kernel accept queue is unconstrained.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.