-
Notifications
You must be signed in to change notification settings - Fork 375
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MSC4177: Add upload location hints proposal #4177
base: main
Are you sure you want to change the base?
Conversation
|
||
Server could use request IP to achieve this without any hints, though inaccurate and invalid when | ||
a user is abroad. This is reasonable fallback behaviour for a server when clients do not provide | ||
any location hint. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have a whole lot of experience with CDNs, but would it be reasonable to expose an endpoint that would allow the client to measure the network speed, e.g. by uploading/downloading a small file, from each location? And then it can use the location with the shortest time. It might not be entirely accurate, but might be better than guessing based on IP address, or trying to divine the right location based on a location code?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah a test endpoint per location would be a handy addition here so clients can make informed decisions.
@@ -0,0 +1,63 @@ | |||
# MSC4177: Upload Location Hints |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this only useful for uploads, or is would something similar also be useful for downloads?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both really - specified at upload time but yields benefits on download (assuming others downloading are in the same location/region).
could provide explicit options, or a baseline of options, "it is recommended location hints use | ||
geographical ISO codes" for example. | ||
|
||
## Alternatives |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This sounds more like a routing issue and not a protocol issue. Can using something like Anycast routing or geo-based DNS help find the closest location?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the term you are looking for is EDNS Client Subnet. https://en.wikipedia.org/wiki/EDNS_Client_Subnet
What Wikipedia doesn't mention is NextDNS (and DNS0) and Adguard having more private implementations of it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Kind of, I'm talking about how authoritative servers use that + the original source IP to serve close servers, like the GeoIP backend of PowerDNS or Route53 geolocation routing.
Maybe that's one in the same, but more the application instead of the underlying technology.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can using something like Anycast routing or geo-based DNS help find the closest location?
Definitely, although requires a more complicated setup. But also using request IP would satisfy most use cases here I think.
My thought process for the PR was to give explicit control/negotiation of locations over to clients/servers rather than the server guessing the best location for a client to upload files to.
Now that I’ve said that I’m not sure there’s really much improvement with this change..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Implementation requirements:
- Client
- Server
|
||
How do clients/servers interpret location hints? Is it sensible to leave this undefined/open. We | ||
could provide explicit options, or a baseline of options, "it is recommended location hints use | ||
geographical ISO codes" for example. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the idea that a client would auto-select the most appropriate hint or would the user have to manually pick from the hints the server presents? For auto-selection to work, I think at least a recommendation of hint formats would be needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That’s the idea, perhaps with a speed test endpoint as mentioned above.
## Security considerations | ||
|
||
None? Reveals bucket locations (to logged in users), but servers are aware of this and there's | ||
no security issue (I think). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the hints are expected to be more accurate than IPs, the server would possibly gain more metadata about the client.
Rendered