Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Suppose that a Web server runs in Host C on port 8080. Suppose this Web server uses persistent connections, and is currently receiving requests from two different Hosts, A and B. Are all of the requests being sent through the same socket at Host C? If they are being passed through different sockets, do both of the sockets have port 8080?

I would think: they are being passed through the same socket on the same port(:8080) since this webserver uses a persistent connection? I.e. Since this connection is persistent, it doesnt give a new connection to each incoming host or connection Is this true? Why?

share|improve this question

closed as not constructive by Ward, Greg Askew, Khaled, devicenull, MDMarra May 13 '12 at 18:22

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

This sounds like homework to me. Homework questions are not on-topic here. – Magellan Apr 27 '12 at 19:49
That's a big assumption. Nonetheless, it will help further site goers, so care to provide some helpful answer here? – Hi There Apr 27 '12 at 20:03
@Adrian There has been discussion on Meta, but I'm not sure homework questions are off-topic. Regardless, this user's questions thus far do read as copy/paste from a textbook. – jscott Apr 27 '12 at 20:21

Applications that persistently listen on a port handle connection-management of the higher level protocol. The two separate connections over the same port will be handled by the same instance of an application. Two connections, one application, one listening socket. The application is responsible for maintaining application connection state, and managing the TCP connection events (open/close) for the Operating system.

New connections are established at the operating system layer, and once established are passed on to the application listening on that port. When a connection is closed, it can be closed by the OS (generally, unexpected termination for some reason) or the application (normal shutdown), and the application has to handle all cases.

share|improve this answer
Can this: Two connections, one application, one listening socket ALSO be true for N Connections, one application, one listening socket? – Hi There Apr 28 '12 at 14:20

Not the answer you're looking for? Browse other questions tagged or ask your own question.