-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Prefer QUIC for WAN connections #8626
Comments
We might want to consider some sort of circuit breaker if implementing this, to prevent an eternal connection-upgrade fight between two differently configured devices. |
At least to avoid issues with nodes running an older Syncthing version. I wonder if we can already drop the QUIC->TCP upgrade logic. |
I also think the "gigabits" claim needs to be verified. Also, if anything, the batch writes might break the existing glue rather than make things better. |
There's also been some discussion on caddys issue tracker around the performance of quic-go: caddyserver/caddy#4876 As you're mentioning the glue code support: AudriusButkevicius/pfilter#7 |
This comment was marked as off-topic.
This comment was marked as off-topic.
Looks like quic-go is fast enough for our purposes and is already aiming to be able to saturate 10Gbps links: quic-go/quic-go#3670 |
Yeah, the bare quic-go implementation is performant enough based on those reports. There's still the glue around it that Audrius mentioned plus real networks: I'd be surprised if UDP traffic works as well (more so on reliability than throughput) in the wild. Not because it couldn't, but because of old hard/software or policies/firewalls getting in the way. I'd be vary of changing the default, and maybe make it an opt-in config first. Plus the mentioned problem of flip-flop-management. |
I think the safest option would be to treat QUIC and TCP as equal, but choose QUIC first. This would avoid the flip-flop problem with older nodes. If only new nodes are involved and a QUIC connection could be established, it stays that way. An older device could force TCP, but again this would not cause any problems because the newer nodes would see no reason to switch it to QUIC. So instead of: Relay < QUIC WAN < TCP WAN < TCP LAN We would treat it this way: Relay < QUIC WAN == TCP WAN < TCP LAN I'm not that concerened about UDP problems to be honest. The adoption of HTTP/3 forces things to work at least on the provider level. If it's blocked in corporate networks or public wifis we can still fallback to TCP. |
Blocked by #7403 |
QoS on older gateways is actually less of a concern, as HTTP3 advances they have to accommodate large amounts of UDP data. |
…thing#8626) This makes the various protocol priorities configurable among the other options. With this, it's possible to prefer QUIC over TCP for WAN connections, for example. Both sides need to be similarly configured for this to work properly. The default priority order remains the same as previously (TCP, QUIC, Relay, with LAN better than WAN).
…thing#8626) This makes the various protocol priorities configurable among the other options. With this, it's possible to prefer QUIC over TCP for WAN connections, for example. Both sides need to be similarly configured for this to work properly. The default priority order remains the same as previously (TCP, QUIC, Relay, with LAN better than WAN). To make this happen I made each dialer & listener more priority aware, and moved the check for whether a connection is LAN or not into the dialer / listener -- this is the new "lanChecker" type that's passed around.
… (#8868) This makes the various protocol priorities configurable among the other options. With this, it's possible to prefer QUIC over TCP for WAN connections, for example. Both sides need to be similarly configured for this to work properly. The default priority order remains the same as previously (TCP, QUIC, Relay, with LAN better than WAN). To make this happen I made each dialer & listener more priority aware, and moved the check for whether a connection is LAN or not into the dialer / listener -- this is the new "lanChecker" type that's passed around.
* main: build(deps): bump github.com/quic-go/quic-go from 0.33.0 to 0.34.0 (syncthing#8877) gui, man, authors: Update docs, translations, and contributors lib/ignore: Properly handle non-existing included ignore-files (fixes syncthing#8764) (syncthing#8874) lib/connections: Avoid using nil lanChecker gui, man, authors: Update docs, translations, and contributors lib/config, lib/connections: Configurable protocol priority (ref syncthing#8626) (syncthing#8868) build: Upgrade recli (fixes syncthing#8503) (syncthing#8871)
* main: gui, man, authors: Update docs, translations, and contributors lib/ignore: Properly handle non-existing included ignore-files (fixes syncthing#8764) (syncthing#8874) lib/connections: Avoid using nil lanChecker gui, man, authors: Update docs, translations, and contributors lib/config, lib/connections: Configurable protocol priority (ref syncthing#8626) (syncthing#8868) build: Upgrade recli (fixes syncthing#8503) (syncthing#8871)
* main: (42 commits) all: Correct various typos (syncthing#8870) gui, man, authors: Update docs, translations, and contributors lib/model: Set platform data, incl. copying ownership, for new folders w/ NoPermissions flag (syncthing#8883) gui: Add Thai (th) translation template. (syncthing#8887) build: Produce nightly release builds gui, man, authors: Update docs, translations, and contributors build: Bump actions version; fix Node 12 deprecation warning (syncthing#8881) build: Build Debian packages build: Sign for upgrades build: Notarize mac builds build(deps): bump github.com/quic-go/quic-go from 0.33.0 to 0.34.0 (syncthing#8877) gui, man, authors: Update docs, translations, and contributors lib/ignore: Properly handle non-existing included ignore-files (fixes syncthing#8764) (syncthing#8874) lib/connections: Avoid using nil lanChecker gui, man, authors: Update docs, translations, and contributors lib/config, lib/connections: Configurable protocol priority (ref syncthing#8626) (syncthing#8868) build: Upgrade recli (fixes syncthing#8503) (syncthing#8871) build: Update dependencies (syncthing#8869) lib/model: Improve path generation for auto accepted folders (fixes syncthing#8859) (syncthing#8860) docs: fix typo (syncthing#8857) ...
+1
Just wondering... QUIC (aka UDP) on LAN would be easy on network equipment which might come handy if there's lots of traffic. Also, being UDP easily dropped in need, it would coexist better with TCP streaming and low latency applications. |
On further consideration I think this is resolved as you can now tell Syncthing to prefer QUIC, though it's not the default. |
@calmh How do you tell ST to prefer QUIC? Is there any way to make it default (eg. a command line switch)? |
@pataquets by setting the connection priority for QUIC to be lower than TCP. Advanced options. I should write a doc article one of these days. |
THANK YOU VERY MUCH |
This is a bit of a long shot and depends on the performance of future quic-go releases but QUIC already tends to perform better on high latency connections:
https://forum.syncthing.net/t/prefer-quic-option/19136
https://www.reddit.com/r/Syncthing/comments/ye0429/syncthing_quicserver_quickclient_disconnecting/
Seems like quic-go v0.30.0 already comes with a bunch of performance improvements and batch writing is scheduled for v0.31.0.
Once quic-go is able to saturate a gigabit link, we should change the priority for WAN connections.
As for LAN i don't see any benefits because packetloss and latency is not an issue here.
The text was updated successfully, but these errors were encountered: