Skip to content

Prefer QUIC for WAN connections #8626

Closed

Description

@bt90

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.

Activity

  1. added
    enhancement
    needs-triage
    on Oct 27, 2022
  2. calmh commented on Oct 28, 2022

    @calmh
    Member

    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.

  3. removed
    needs-triage
    on Oct 28, 2022
  4. bt90 commented on Oct 28, 2022

    @bt90
    ContributorAuthor

    At least to avoid issues with nodes running an older Syncthing version.

    I wonder if we can already drop the QUIC->TCP upgrade logic.

  5. AudriusButkevicius commented on Oct 28, 2022

    @AudriusButkevicius
    Member

    I also think the "gigabits" claim needs to be verified.
    We have a lot of glue around quic, which might be the bottleneck achieving the said gigabytes.
    We don't need that glue for TCP.

    Also, if anything, the batch writes might break the existing glue rather than make things better.

  6. bt90 commented on Oct 28, 2022

    @bt90
    ContributorAuthor

    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

  7. calmh commented on Nov 2, 2022

    @calmh
  8. bt90 commented on Jan 19, 2023

    @bt90
    ContributorAuthor

    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

  9. imsodin commented on Jan 19, 2023

    @imsodin
    Member

    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.

  10. bt90 commented on Jan 19, 2023

    @bt90
    ContributorAuthor

    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.

  11. bt90 commented on Jan 20, 2023

    @bt90
    ContributorAuthor

    Blocked by #7403

  12. daiaji commented on Jan 22, 2023

    @daiaji

    QoS on older gateways is actually less of a concern, as HTTP3 advances they have to accommodate large amounts of UDP data.

  13. added a commit that references this issue on May 9, 2023
  14. pataquets commented on Aug 12, 2023

    @pataquets

    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.

    +1

    As for LAN i don't see any benefits because packetloss and latency is not an issue here.

    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.
    Just my 2c.

  15. calmh commented on Aug 13, 2023

    @calmh
    Member

    On further consideration I think this is resolved as you can now tell Syncthing to prefer QUIC, though it's not the default.

  16. pataquets commented on Aug 13, 2023

    @pataquets

    @calmh How do you tell ST to prefer QUIC? Is there any way to make it default (eg. a command line switch)?
    I can file another issue, if required.

  17. calmh commented on Aug 16, 2023

    @calmh
    Member

    @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.

  18. The0013 commented on Aug 17, 2023

    @The0013

    THANK YOU VERY MUCH

  19. nikow commented on Aug 21, 2023

    @nikow

    image
    Looks like we just need to tweak those numbers. Thank you very much!

  20. added
    frozen-due-to-age
    on Aug 12, 2024
  21. locked and limited conversation to collaborators on Aug 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementfrozen-due-to-age

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions