This was discussed by the WG. The best rationale is given in the thread starting from this mail[0] from Will Chan at Google, followed up by this one[1] from Amos Jeffries (Squid Proxy). The summary is: waiting for SRV lookups can be slower than just doing straight-up A records, so no client in a competitive space is going to do it.
Everyone agrees that in an ideal world this would be great, but in practice no-one is going to be the first person to move on that front. The wins aren't big enough and the cost is too high.
[0]: http://lists.w3.org/Archives/Public/ietf-http-wg/2014JanMar/... [1]: http://lists.w3.org/Archives/Public/ietf-http-wg/2014JanMar/...
If the language says "You MUST consult SRV records for _http2._tcp before you use the result of an A lookup", then anything that delays that SRV lookup will delay page resolution. Browsers are strongly disincentivised from making anything slow, so it's just safer not to add the extra delay point. If we specced that, no-one would do it.
Better to have what we have now, which is: do SRV if you want.
What Amos was talking about is the problem of some resolvers not returning an answer at all, not even NXDOMAIN or an empty authoritative answer, due to the fact that he queried for AAAA records and some resolvers are buggy and can’t handle those queries. SRV is irrelevant to this problem, except that using “happy-eyeballs” and requiring A and AAAA has problems.
What William Chan (陈智昌) was talking about was where a query for SRV records fail, causing a long timeout. But this is not the normal case; normally you get an answer (perhaps an empty one) immediately. And since this has nothing to do with IPv6 and buggy resolvers, I don’t know why this situation should be considered common enough to optimize for. (Clients which really wanted to mitigate this could certainly detect this case when it happens and keep a blacklist.)
You keep implying that such things will happen. They won’t. There is no reason for an SRV record lookup to delay page resolution any more than an A (or AAAA) record lookup.
> If we specced that, no-one would do it.
Are you seriously saying that even if the HTTP/2 standard came out and it said “A client MUST lookup an SRV record and use it if one exists, and not use any A or AAAA records before the non-existence of an SRV record can be confirmed.”, that the browser vendors would simply ignore this? If that’s the case, why do we even have a standards process? Why do we even pretend to write RFCs if we can just assume that every implementer will ignore the standard and do whatever they feel like?
No, a thing which would be a net win for the Internet in general should go in the standard. RFC writers should not bow to fears of what Google, IBM, or General Motors might or might not do. Or, at least, wait until they make the threat of non-compliance openly.
I regard this as the worst-case scenario. It is a baffling omission. The HTTP URI scheme [RFC7230] does nothing to clarify matters:
"If host is a registered name, the registered name is an indirect identifier for use with a name resolution service, such as DNS..."
In my view the WG has the opportunity to definitively fix the problems of dual-stack discovery and of apex record service names, and the refusal to do so is exceedingly disappointing. We're left with implementations of Happy Eyeballs that have lookup race conditions and therefore nondeterministic behaviour.
All the arguments against using service records are actually complaints about artefacts arising from the current ambiguity in resolution practices, and thereby perpetuate the problem.
The proper choice should be that all IPv6 sites should be resolved via SRV rather than raw AAAA lookup - this is the soft introduction that over the years will ramp up to a global first preference for service records, and remains compatible as a variation on Happy Eyeballs.
But entrenched positions don't change and I have no clout with the WG or with browser product managers, so I gave up.
Reading that I'm not sure the problem is that SRV lookups are slower, but that forcing clients to do a SRV lookup, wait, and then a A/AAAA queries is slower:
If I own a popular client and I switch to mandatory SRV lookup, and don't issue A and AAAA queries until the SRV lookup fails, then for the services and paths where SRV lookup doesn't work, user experience will be vastly degraded.[1]
However,it appears that making SRV optional remains a possibility:
Note that none of what I've said necessarily applies to optionally doing SRV and using it when the results are available.
[1] http://lists.w3.org/Archives/Public/ietf-http-wg/2014JanMar/...
Few if any resolvers support this feature, but it show that the problem we have is because of legacy assumption that are no longer true. Fix those, and the problem goes away.
I agree it's a pretty decent system, and something I'd like to see more systems adopt it.
Interestingly, I can't actually think of a reason why a (customised) web browser couldn't use it now. If a browser understood SRV records it could use the correct port. There might be some odd interactions with the HTTP 1.1 Host header, but I haven't thought about it much.
Of course, browsers that don't understand it wouldn't be able to follow links that use it which is something of a downside I guess.
(I wrote about this previously here on HN: https://news.ycombinator.com/item?id=7522208)
Indeed, since the HTTP/1.1 RFC was issued in 1999 and the SRV RFC in 2000 there is no way it could have mentioned it.
If there are technical reasons why it can't work that's one thing. If some verbiage in the RFC is all that holds it back it's easy to fix: try it out, then issue a new RFC.
The whole RFC process embraces changes like this.
SHOULD NOT This phrase, or the phrase "NOT RECOMMENDED" mean that
there may exist valid reasons in particular circumstances when the
particular behavior is acceptable or even useful, but the full
implications should be understood and the case carefully weighed
before implementing any behavior described with this label.And an RFC is not a standard, and all life is meaningless? No, a SHOULD NOT should be taken seriously, not ignored.
The SRV RFC included that language for a reason, and probably had HTTP in mind when they wrote it, and therefore wanted HTTP clients not to use SRV records randomly. Since then, HTTP has has plenty of time to add SRV usage in its minor revisions, but has chosen not to. But now, with HTTP/2, a major revision, it is the perfect time to add this kind of thing.
RFCs are not like ISO standards. The name says it all: "request for comments".
RFCs reflect the ideal of "rough consensus and running code".
The SRV RFC was written by an author from Microsoft aimed at domain controller discovery. They probably didn't think of HTTP at all.
There's an expired draft RFC for SRV+HTTP[1].
You are right: SHOULD NOT should be taken seriously. But if you are (say) Mozilla, Microsoft or Google and writing a webbrowser you probably know enough to understand when you can break a RFC.
How do you think TCP-fast-start happened?
The SRV RFC was not by Microsoft. It has three authors, the other two being one Arnt Gulbrandsen from Troll Tech (of the Qt library fame) and Paul Vixie of the Internet Software Consortium, who is also the author of BIND. I actually am inclined to think that they did consider HTTP seriously.
1. The well-known resilience of mail can be largely attributed to its use of MX records to specify the use of backup servers and/or load balancing. SRV records are essentially a generalization of MX records for any service, not just mail, so using SRV records would bring this benefit to any protocol which uses them.
2. The problem of “www” or no “www” would be entirely eliminated; no need for non-standard so-called ANAME or ALIAS “records”. Just imagine – if, in an alternate universe, mail servers hadn’t used MX records, it would then have been necessary to have an A record on the bare domain name, and later, when the Web was created in this alternate universe, the web server would have to be the same server as the mail server, since both now would use the bare domain name. In our universe, this position is now solely occupied by the HTTP protocol, which causes lots of pain in the DNS when redundant (and harder to update) A records need to be put on the bare domain name just for HTTP. Not to mention IPv6, which, for HTTP to work, requires an additional AAAA record on the bare domain.
3. The “everything is on port 80, let’s reinvent everything on top of HTTP” problem could certainly have been entirely avoided, and could be slowly fixed, by using SRV records. (A server concerned about clients needing to traverse old-style restrictive firewalls could provide a low-priority port 80 server as a fallback.)
① A DNS RR for specifying the location of services (DNS SRV) https://tools.ietf.org/html/rfc2782