5 ms·
Port numbers as the next ipv4 "problem", oooh I like it. No amount of garbage collection for careful allocation will solve it. Expect another heavy-handed, non-
by exabrial 12y ago
Port numbers as the next ipv4 "problem", oooh I like it. No amount of garbage collection for careful allocation will solve it. Expect another heavy-handed, non-memorizable, rear-ward-looking solution from the IETF that involves reimplementing the whole Internet.
Oh, SRV records, right that's what I was going to post about. Yes, once again, SRV records would have solved this problem in quite an elegant and simple way. And it's backwards compatible until we hit an actual port number crisis... cool!
- jsprogrammer 12y agoThe article claims 90% of the space is still available.
- wongarsu 12y agoBecause nobody actually registers their ports. It's a multi-month process with little benefit to anyone.
- vacri 12y agoAnd even then, it doesn't matter because it's still simply convention. The internet won't break for anyone if I serve something other than mysql on port 3306. There's only a few port numbers where the public edifice around them is so huge that they really can't be that mobile - web (two ports), mail (six or so), dns (one port) and so forth.
- bmn_ 12y agoNot quiet. The last 25%, i.e. ports 49152-65535, are by design excluded from registration. See RFC 6335 §6.
- wongarsu 12y agoMost software doesn't really need fixed port numbers. A few older systems like the DNS system are in practice limited to a fixed port, but most newer systems are port-agnostic. My postgres server is conflicting with some other service using port 5432? Who cares, I will just start it on some other random port. All that changes is that I have to type 5 more characters when connecting to it. SRV records are quite nice for user facing addresses because it's less stuff to remember, but for the majority of protocols it's not needed. Until people start to offer tens of thousands of services per IP, we won't hit any port shortage. And in the hypothetical future where that happens we hopefully moved to IPv6 and can just use another IP address.
- inopinatus 12y agoTwo points; firstly, SRV records offer other advantages over A records beyond simply port diversity. Most notably: the ability to exist at the apex of a domain, resolving to both IPv4 and IPv6 addresses simultaneously, and weighted-round-robin and fallback support. The overload of the address record to discover service endpoints is ultimately a murky throwback to when servers were named like pets, not disposable commodities. Secondly, in this age of containerized deployment it is already common to have many HTTP-substrate services bound to a single address, disambiguated by port. Leveraging the SRV record in DNS means not having to invent yet another endpoint discovery mechanism just to know what port number to connect to. The reference to "typing an extra 5 characters" invokes a world of manual, static configuration that many of us are happy to have replaced with services that find each other through discovery protocols.