Share this question

Welcome to Teachnovice Q&A, where you can ask questions and receive answers from other members of the community.

This is a collaboratively edited question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

How can a web server handle multiple user's incoming requests at a time on a single port (80)?

0 like 0 dislike
458 views
How does a web server handle multiple incoming requests at the same time on a single port(80)?

Example : At the same time 300k users want to see an image from www.abcdef.com which assigned IP 10.10.100.100 and port 80. So how can www.abcdef.com handle this incoming users load?

Can One server (which assigned with IP 10.10.100.100) handle this vast amount of incoming users? If not, then how can one IP address be assigned to more than one server to handle this load?
asked Jun 6, 2013 by anonymous  

1 Answer

0 like 0 dislike
A port is just a magic number. It doesn't correspond to a piece of hardware. The server opens a socket that 'listens' at port 80 and 'accepts' new connections from that socket. Each new connection is represented by a new socket whose local port is also port 80, but whose remote ip:port is as per the client who connected. So they don't get mixed up. You therefore don't need multiple IP addresses or even multiple ports at the server end.
answered Jun 6, 2013 by anonymous  
...