by ben0x539 · 8y ago · 0 comments
Following some of the links in the article, I've seen people make arguments on how straightforward it would be to implement and how it clearly works well for some non-HTTP systems. I'm guessing there's some implicit shared understanding of the problem space that I, as an uninitiated, casual DNS user, can't really wrap my head around.
Can y'all point me in the right direction to read something about, like, what problems SRV records solve for HTTP, and specifically how that solution compares to how people have traditionally solved those problems with HTTP? There seems to be some tension between best practices as established by IETF RFCs and best practices coming from decades of deploying public-facing HTTP infrastructure/browsers, does that sound about right?
A second one: deploying TLS websites used to require one ip per hostname, and presently requires weird hacks like SNI (which leak the hostname to which one is connecting to observers). Being able to deploy any website on any port allows for a lot more flexibility in deployments, especially given the current trends such as “serverless”, k8s, et c.
* http://jdebp.eu./FGA/dns-round-robin-is-useless.html
Note that making priority and weighting available is given in the rationale section of the original RFC from 1996. What you're talking about actually isn't specific to HTTP.
The use of SRV could help in newer API driven implementations so that scripts and other tooling could enumerate which IP's are preferred. For now, developers will just have to make use of multiple records like the browsers do.
That said, it won't likely happen because the HTTP spec does not allow new DNS implementations. The RFC would have to be deprecated with a new one that permits SRV. HTTP/2 would have been a grand opportunity to do just that. There have been many discussions [1] and debates on the issue, but I do not foresee it happening.
[1] - https://www.ietf.org/mail-archive/web/httpbisa/current/msg25...
The hand-wringing evidenced by some about the difficulties of introducing a new behaviour seems pretty feeble when you consider that Google has successfully intruded both a new transport protocol (QUIC) and a new application layer protocol (HTTP/2 i.e. SPDY) in a few short years. Rolling browser updates are now the norm and enable these major changes.
Browsers are not the only thing that speak http. There are a myriad of libraries used by API's and all manor of automation that must also be updated to support a new protocol. A good example of this is SNI. All major browsers support SNI, but there are plenty of libraries that have yet to catch up to that very well aged protocol.
API endpoints tend not to be apex records, indeed are characterised by using a label of "api" or similar which doesn't automatically conflict with other services, certainly not in the common case. It'd remain a violation IMO to use a host name as a service selector but in practice they could continue using address records for many years of transition.
Because it's at the apex of the domain, that record also cannot be a CNAME alias, because the apex includes DNS metadata that is not allowed to be aliased. So instead we have numerous ugly hacks from DNS providers that vary that address record by tracking an alias target, with varying degrees of reliability.
In other words, your DNS is now entirely subordinate to the demands of the web protocols and using ugly hacks to work around limitations of address records. You can stick a "www" on the front as a cheap, poorly specified, and untyped service selector, but because of the convention of just entering a domain name you'll still have to do the apex record.
Basically, the current convention for HTTP is to overload the address record to be its personal service record and screw everyone else and the consequences.
SRV also provides mechanisms for service fallback and weighted loadbalancing that address records do not. It can also conserve IP space by directing clients to alternative ports without ugly port specifications in the URI. There's a lot to like about it, and a lot to dislike about the current practices.
Thanks for the clarifications!