LEVIATHAN SYSTEMS

Planning

What Waits in a Linux TCP Listen Backlog?

Technical contentPublished Updated

For an ordinary Linux TCP listener, the listen backlog concerns established connections waiting for the application to accept them. Incomplete handshakes and connections already accepted belong to different populations. A backlog figure therefore needs a connection-state definition before it can support a serving proposal; it supplies no count of application workers or completed responses.

A TCP connection can be established before the application accepts it

Follow one connection at the listening server. In the basic three-way handshake illustrated by RFC 9293, the initiating peer sends SYN, the listening peer replies with SYN and ACK, and the initiator acknowledges that reply. The server reaches ESTABLISHED when it receives the final acknowledgement in that ordinary exchange.

Establishment and application acceptance are separate events. Linux man-pages 6.19 documents that, since Linux 2.2, the TCP listen backlog applies to the queue of completely established sockets waiting to be accepted. Incomplete connection requests have a separate queue. A connection can therefore have finished its handshake at the server and still be waiting for accept.

The teaching case here uses ordinary TCP with that Linux interpretation. TCP Fast Open and SYN-cookie variants are outside the case. These are connection lifecycle distinctions for reading proposal evidence, rather than instructions for configuring or operating a listener.

References: [T1][L1]

Separate the requested limit from current occupancy

The backlog argument supplied to listen describes a queue limit, not the number currently waiting. The Linux manual also says that a requested value above somaxconn is silently capped to that value. A proposal quoting only the application's requested backlog has therefore left the effective limit unestablished.

Keep two questions separate: which limit applies to this listener, and how many established connections are waiting for acceptance at the observation time? Neither figure is the total number of clients the service can support. Once a connection has been accepted, it is no longer a member of this waiting population, even if it remains established.

References: [L1][A1]

Eight waiting connections, 108 established, 124 including incomplete handshakes

Consider a fictional snapshot for one Linux TCP listener. Assume an effective illustrative backlog limit of 12. There are 16 incomplete handshakes, eight established connections waiting for accept, and 100 already accepted connections that are all still ESTABLISHED. The numbers are stipulated for explanation; 12 is neither a default nor a recommendation.

The accept queue occupancy is eight. Its members are the established connections whose application acceptance has not yet occurred. The 16 incomplete handshakes belong to the other waiting population, and the 100 accepted connections have already left the accept queue.

Among the connections in this snapshot, 8 + 100 = 108 are established. The inclusive count is 16 + 8 + 100 = 124, combining incomplete attempts with established connections. That inclusive total answers a different question from queue occupancy. The listening socket itself is not an additional established connection.

An offer calling this a backlog of 124 has mixed three stages. An offer calling 12 the maximum number of established connections has also misread the limit: this example already contains 108 established connections, of which only eight await acceptance.

References: [L1][A1]

Four successful accepts change the waiting count, not the established total

Now let the application successfully accept four of the eight waiting connections. Hold every other event unchanged: no new arrivals, handshake completions, closes, failures or other application progress. The incomplete population remains 16.

The accept manual describes extracting a pending connection, creating a connected socket and returning a new file descriptor referring to it. That descriptor gives the application a way to use the connected socket. The original socket retains its listening role. This API operation does not establish another TCP connection for each one accepted.

The waiting population becomes 8 - 4 = 4, and the accepted population becomes 100 + 4 = 104. All 104 accepted connections remain established by stipulation. The established total is still 4 + 104 = 108, and the inclusive count remains 16 + 4 + 104 = 124.

Four connections have left the waiting population because those connections were accepted, not because four responses finished. Nothing in the transition identifies an application request, assigns a worker or shows a GPU completing work. Treating the four accepts as four newly available GPU workers would invent an application event that the example never supplies.

References: [A1]

Keep this listener separate from HTTP streams and backend admission

An accepted TCP connection is also a different object from an HTTP/2 stream. RFC 9113, published in June 2022, permits multiple concurrent streams within one HTTP/2 connection. A connection count therefore cannot be substituted for that stream population. The related HTTP/2 article explains the stream limit and its separate relationship to inference batches.

Application admission needs its own account too. The descriptor returned by accept does not tell a buyer which requests the serving application has retained, assigned or completed. The related request-queues article covers those later request states and caller deadlines. A socket acceptance count supplies no mapping to them.

Locate the listener before applying its figure to the backend. If a gateway terminates the client connection and forwards requests to another server, it introduces a separate connection boundary. RFC 9110's June 2022 intermediary model describes a chain of connections and allows the gateway to use another protocol toward its servers. A gateway's client-facing accept queue consequently supplies no backend accept-queue depth or application queue count. The actual connections and forwarding relationship must be identified.

References: [A1][H1][G1]

Decide which part of the serving claim the evidence answers

For the fictional snapshot, the backlog figure supports a statement about connections waiting for acceptance at one listener. It leaves the application's useful-response performance unestablished.

For a real offer, ask the evidence owner to identify the listening endpoint, relevant Linux implementation, whether the quoted number is a requested limit or an effective limit, and which connection states the accompanying observation includes. If the listener belongs to a terminating gateway, keep its observations attached to that hop. Request the application's separate evidence before using the figure to compare serving capacity. For a claim about successful response rate, the evidence needs a defined workload, a response-success definition, an observation interval and the recorded completions within it.

The example supplies no arrival rate, elapsed interval or waiting durations. Even the four accepts have no stated duration, and they are not response completions. Neither waiting time nor throughput can be derived from these counts.

Connect a separate equipment requirement to physical deployment

If the resulting infrastructure plan includes equipment that needs physical installation, Leviathan's Complete Physical Deployment service can discuss agreed receiving, rack integration, onsite installation, IT cabling and physical handoff records. Use the related service and project inquiry with a nonconfidential equipment, site, connection and handoff outline.

That inquiry concerns the separate equipment project. Linux operation and serving-software configuration remain with the appointed platform and application providers.

References: [S1]

Primary sources

  1. [L1] Linux man-pages 6.19 — listen(2), page dated February 11, 2026Checked 2026-10-20. DESCRIPTION and NOTES define the Linux TCP established-unaccepted backlog, separate incomplete requests and the somaxconn cap. This article adopts no default, overflow outcome or tuning recommendation.
  2. [A1] Linux man-pages 6.19 — accept(2), page dated October 29, 2025Checked 2026-10-20. DESCRIPTION and RETURN VALUE explain pending-connection extraction, the connected socket and its new descriptor, while preserving the original listener. Application work requires separate evidence.
  3. [T1] RFC 9293 — Transmission Control Protocol, August 2022, Section 3.5 and Figure 6Checked 2026-10-20. The basic three-way handshake establishes the server-side state transition used in the ordinary TCP teaching case; it does not define Linux's accept API or backlog sizing.
  4. [H1] RFC 9113 — HTTP/2, June 2022, Section 5Checked 2026-10-20. Defines streams within an HTTP/2 connection and permits concurrent streams, supporting the distinction between connection and stream counts.
  5. [G1] RFC 9110 — HTTP Semantics, June 2022, Section 3.7Checked 2026-10-20. Describes HTTP intermediaries, the connection chain and gateway protocol choice. Applies when the gateway terminates a connection and forwards requests.
  6. [S1] Leviathan Systems — Complete Physical DeploymentChecked 2026-10-20. Defines the separate physical equipment delivery scope and project inquiry. Relevant when the selected plan also requires actual equipment installation.

Does a separate equipment project need installation?

Share a nonconfidential equipment, site, IT connection and physical handoff outline to discuss scope, requirements and availability.

Discuss a ProjectEmail Project Scope