The Internet is a frankly incredible design. The IP protocol, which is at its heart, is technology from 1974. TCP, which implements connections on top of IP’s packet delivery, is from the same year. Forty-two years on, both are essentially unchanged. Even DNS, the domain-name service, dates back to 1983, and is going strong 33 years in with only minor tweaks.
The only big change in this time has been the slooow migration (still in its early stages really) from IPv4 to IPv6 — something that has proven necessary as the Internet has been so wildly more successful and popular than anyone anticipated, and the 32-bit-wide host addresses are running out. But in the scheme of things, this is a minor tweak. We’re running the Internet on 1970s technology, not due to sloth, but because it’s good.
There’s just one nasty misfeature in this suite of protocols, and that is port numbers. A running TCP/IP service is available on an address that consist of the host (expressed as an IP address such as 184.108.40.206 or more often a domain name such as google.com), together with a small integer — the port number. Different ports support different services, so you can run (for example) an remote-shell service and a Web server on the same host, on ports 22 and 80 respectively.
The problem is, there are only a finite number of ports on a host — 2^16, or 65536 — and a potentially infinite number of services that you might wish to support. Different services conventionally run on different well-known ports (such as port 80 for Web servers, as in the example above). The space is very polluted and getting worse.
In particular, port 8080 is woefully oversubscribed, with important services like Web proxies and caches, the Java-based Web server Tomcat, and several more all wanting to run there. This isn’t just a theoretical problem: the reason I am writing this post is because of the problems I’ve had today trying to get Tomcat to start on my Ubuntu 15.10 box, where something is already running on port 8080. I don’t know what: I can’t find out, because although it accepts connections, it immediately closes them.
How easy it would have been to avoid this problem, if only the protocols had specified ports as short strings instead of integers. Then it would be trivial to make up truly unique port-names for each service. They could be faceted, like Unix file paths or Java package names, so that for example my home-brew MUNDI server could run on port “uk.org.miketaylor.mundi”. Then Tomcat would never collide with whatever the heck is already running on my port 8080.
So it’s a real shame that in protocols so brilliantly engineered, which have stood the test of time so well, this one trivial wart causes so much avoidable grief.