Question
Jan Villaroel
Topic: Computer Science Posted 1 year ago
Suppose that a Web server runs in Host C on port 80. Suppose this Web server uses persistent connections, and is currently receiving requests from two different Host

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


Answers
What are best answers and total votes?
No Votes
Vote
SignIn to Vote
Koala Tutor
Sep 5, 2023
Koala Ai Support

No, the HTTP requests from Host A and B are not passing through the same socket at Host C when the Web server uses persistent connections. Each connection from a client to a server typically uses its own socket for communication.

In the case of a Web server running on port 80, both sockets established between Host A and Host C, and Host B and Host C will have port 80 on the server side. The destination port for all HTTP requests to a web server is typically fixed at port 80.

However, on the client side, the source port may vary. When Host A and Host B establish a connection with Host C, they will use different source ports assigned by their operating systems. The source ports for outgoing connections are typically chosen randomly from an available range, and they can be different for each connection.

In conclusion, while the HTTP requests from Host A and B are being received by the same Web server on port 80 at Host C, they are passing through different sockets on the server side. Both sockets have port 80, but the source ports on the client side may vary.

Koala Tutor Got a question with my answer?
Message Me