This preview shows page 1. Sign up to view the full content.
Unformatted text preview: y the maximum number of queued
connections for one listening end point, all of which have already been accepted by TCP
and are waiting to be accepted by the application. This backlog has no effect whatsoever
on the maximum number of established connections allowed by the system, or on the
number of clients that a concurrent server can handle concurrently.
The Solaris values in this figure are what we expect. The traditional BSD values are (for some
unknown reason) the backlog value times 3, divided by 2, plus 1. 4. If there is room on this listening end point's queue for this new connection (based on
Figure 18.23), the TCP module ACKs the SYN and completes the connection. The
server application with the listening end point won't see this new connection until the
third segment of the three-way handshake is received. Also, the client may think the
server is ready to receive data when the client's active open completes successfully,
before the server application has been notified of the new connection. (If this happens,
the server's TCP just queues the incoming data.)
5. If there is not room on the queue for the new connection, TCP just ignores the received
SYN. Nothing is sent back (i.e., no RST segment). If the listening server doesn't get
around to accepting some of the already accepted connections that have filled its queue
to the limit, the client's active open will eventually time out.
We can see this scenario take place with our sock program. We invoke it with a new option (O) that tells it to pause after creating the listening end point, before accepting any connection
requests. If we then invoke multiple clients during this pause period, it should cause the server's
queue of accepted connections to fill, and we can see what happens with tcpdump.
bsdi % sock -a -v -q1 -O30 7777
The -q1 option sets the backlog of the listening end point to 1, which for this traditional BSD
system should allow two pending connection requests (Figure 18.23). The -O30 option causes
the program to sleep for 30...
View Full Document
- Spring '12