Open bemasc opened 1 year ago
Agreed that this would be pretty simple to implement, and ideas along this direction could greatly improve the number of clients/servers willing/able to implement stuff.
Speaking from my knowledge of how relevant connection stuff is implemented in the Chrome client, stuff that makes big changes to how connections are done, or the DNS behavior for those connections, are very difficult. Such changes mostly result in needing to create separate connection paths with a bunch of complicated coordination with the other connection paths. Stuff that keeps things as the same as possible with a minor difference like skipping a specific IP address get much more reasonable, with most of the complexity there just being to pipe a relevant flag through an existing connection path. And especially helpful if things are kept as simple hints ("SHOULD avoid connecting to the same IP address") rather than strict rules that could require a bunch of extra coordination, e.g. handling simultaneous connection attempts that may not be aware of the hint, in order to ensure absolute correctness for all corner cases.
I would think a server using that mechanism would probably just send a GOAWAY, especially if they have enough DNS control that the address of an overloaded endpoint is unlikely to be returned again. But the larger point about the complexity/adoption trade-off is definitely well-taken. As simple as possible, but no simpler.
This draft serves a few different use cases, including load shedding but also latency optimization, etc. If we just focus on load shedding, it seems like there may be some very simple possibilities. For example, I could imagine an HTTP response header (or frame...) that says "please don't use this IP address for the next N minutes". For the next request, the client would rerun its usual connection setup flow (including resolving fresh copies of any DNS records that have expired), but avoiding that IP address (if possible). Another flag value could tell the client to avoid an entire TargetName, instead of just a single IP address.
This isn't very flexible, but it seems relatively simple for clients and servers to implement.
@ericorth