Why only port 80 for web services?

  • Why isn't it sensible to dedicate more than one TCP/IP port to http? Although admittedly naive, isn't it intuitive to think that server performance could somehow be increased?

    You are absolutely correct. I changed my web servers default port from 80 to 90,91,92 & 93. The load on the server has dropped drastically.

    ...perhaps because no clients can find the server any more?

    80 is just the port used for http. When you say "something.com"; (or even "something.com") the browser completes it to be a request to "something.com:80"; (on port 80, as it's the default well-known http port). Same for https on 443. If you decide to change it, you'll have to say it in the URL: "myserver.com:1280"; otherwise the browser will try on port 80 and will not find it. A list can be seen on wikipedia

    Sorry Marcos, that was a poor attempt at humor. I've never been good at it.

    I knew it was a joke!! ;-)

    @DavidHoude, time for a refresher on emoticons for you. :-) http://www.cs.cmu.edu/~sef/sefSmiley.htm

    @generalnetworkerror: eh, emoticons can take away from the dryness of a joke. I prefer the deadpan delivery in this instance

    I have only one first name. Wouldn't my performance be increased if I used more than one name? Such as Alice, Bob, Charlie, David, and Eve.

  • Useless

    Useless Correct answer

    8 years ago

    Port 80 is a well-known port, which means it is well-known as the location you'll normally find HTTP servers. You can find it documented in the HTTP/1.1 RFC.

    Having a default is useful precisely because you don't have to type it into your web browser with the URI. If you run an HTTP server (or in fact any service) on a non-standard port, you force the client to remember which arbitrary 16-bit number you chose and type it in.

    In addition to this unfriendliness, there is no performance benefit: a port is just one part of the (dst ip:port, src ip:port) 4-tuple which uniquely identifies a TCP connection. If two connections share a dst ip:port, that doesn't mean they share some system resource - they can reside in different threads, or different processes.

    Now, if you have logically different services which both happen to use HTTP, there is no problem with running them on different ports. It just makes the URI a little uglier.

    That's it! Port 80 is not a resource! It's just part of a tuple! Thank you for putting it so clearly.

    It's also worth nothing that even for different services, the actual HTTP connection is usually received on port 80 by a system-wide driver which performs initial protocol analysis and then hands it off to the correct service, thus allowing totally different services in different processes to share the same port.

    Userful answer of Useless

License under CC-BY-SA with attribution

Content dated before 7/24/2021 11:53 AM

Tags used