You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adding such support will help in situations where the user has more than one network card or interface on his or her machine - as only one card or interface is currently supported by Syncthing.
What if the OS doesn't officially support it?
Can a feature be implemented into Syncthing that allows one card to do one task and another card perform another task? (such as in/out or folder a/b?)
Bonding/Etherchannel/802.3ad/Teaming/<insert your OS's name here> is the job of the OS. It's also not the only method of network load balancing, and has significant issues for most regular users (namely, everything has to be set up exactly right otherwise things break (especially with actual 802.3ad)). A suggestion to change your OS if it doesn't support it is somewhat ridiculous also, considering that only the server editions of Windows and OS X actually support it, and you shouldn't (or can't) run those on client nodes, and most people don't have the patience to learn to use a different OS.
Multi-homing though (having multiple networks with their own addressing connecting 2 or more nodes) requires application support, not OS support. It's not an OS feature (unless you're using SCTP or the non-standard extension for TCP, but those do still require some degree of support in the application), but something the application itself needs to be involved in. It also provides means of both failover and load-balancing, and it's implemented in layer 4 or higher (whereas bonding and friends are all layer 2), which means you can do it cross-platform. I personally don't agree that it's out of scope, but I will say that it's probably way more effort than it's worth, since getting it working correctly and reliably without using SCTP or the TCP extensions is hard, while most people probably aren't going to see any benefit.
Not that I know of. Like I said, it's not a situation that will benefit a majority of users, as multi-homing is largely used in failover setups for WAN connections (especially ATM or X.25 networks because you can't do bonding there since it requires Ethernet as the underlying layer 2 protocol as implemented in every OS I know of which supports it). That said, improving file transfer efficiency by running over multiple networks is one of the possibilities for more widespread usage that's talked about somewhat regularly.
FWIW, now that I think about it, implementing this could be as simple as just doing local discovery on all interfaces and making one connection over each without eliminating duplicates (so, if device A and device B are both connected via Ethernet and WiFi, establish connections between them across both networks, not just one like we do currently). The way in which Syncthing itself works already handles most of what's involved in the load balancing, so the only issue should be converting the 1:1 mapping of connections to devices to N:1.
I'd like to see at least one practical scenario where this would make an appreciable difference, for something like at least 1% of users, for it not to be clearly out of scope.
Keeping in mind that in my experience, Syncthing is almost never limited by the (local) network speed. The usual bottlenecks are CPU, disk I/O and network latency.
Like I had said in one of my earlier posts, I don't think it's out of scope in the sense of functionality that's better handled elsewhere, but I will agree that it's probably not worth the effort of implementing given the minimal benefit for most users.
The primary situations I see where this could help are:
Two devices on multiple local networks (most likely WiFi plus some other network link). This situation could also be improved by having some more intelligent performance detection in Syncthing itself to be entirely honest (for example, I have a VPN configured on my laptop and home server, and when they're on the same network, Syncthing will just as often run over that VPN instead of the local network link).
Two devices that have to use relays where the relays have lower throughput than the devices themselves. This would be just as much about load balanced routing through the relays however, and would likely be much harder to implement.
I'd be willing to bet that case 2 is actually pretty common, but it would need some for of limiting so that one person with a couple of 10G uplinks can't swamp all the relays. Case 1, as I mentioned there, could largely be improved by simply checking bandwidth on each possible connection path to a node and automatically selecting the highest bandwidth link.
I think we're mostly in agreement, but just for the record,
> Two devices on multiple local networks (most likely WiFi plus some other network link).
There is a legitimate case for having some sort of detection so that the faster link is preferred (by interface link speed, bandwidth detection, routing preference, or whatever). Apart from that, like I said, I think this is almost never the bottleneck. I have relatively fast computers and semi modern WiFi, and Syncthing almost never saturates the WiFi. (Single threaded connection crypto is always my bottleneck.)
This situation could also be improved by having some more intelligent performance detection in Syncthing itself to be entirely honest (for example, I have a VPN configured on my laptop and home server, and when they're on the same network, Syncthing will just as often run over that VPN instead of the local network link).
Agreed.
> Two devices that have to use relays where the relays have lower throughput than the devices themselves. This would be just as much about load balanced routing through the relays however, and would likely be much harder to implement.
Also questionable if we want to. The relays are intentionally a last resort form of communication, and usually have draconian bandwidth limits. Trying to circumvent those limits by opening more connections or connecting to multiple relays seems like a form of abuse, to me.
There is a legitimate case for having some sort of detection so that the faster link is preferred (by interface link speed, bandwidth detection, routing preference, or whatever). Apart from that, like I said, I think this is almost never the bottleneck. I have relatively fast computers and semi modern WiFi, and Syncthing almost never saturates the WiFi. (Single threaded connection crypto is always my bottleneck.)
Same here, although I do still get noticeably higher bandwidth when using a direct connection than using WiFi, and the difference for the specific case I have (default-on VPN between two systems that may or may not be on the same network) is close to a factor of 10-20 in terms of performance.
Also questionable if we want to. The relays are intentionally a last resort form of communication, and usually have draconian bandwidth limits. Trying to circumvent those limits by opening more connections or connecting to multiple relays seems like a form of abuse, to me.
Agreed, I was only listing it out of the interest of completeness.
Well - regardless if multihoming will be brought as a user-defined feature to Synching, I must say it's at least good we are having this discussion! :-)
Activity
AudriusButkevicius commentedon Jun 7, 2017
This is the job of the OS, the OS can do bonding if it wishes.
jebeld17 commentedon Jun 7, 2017
What if the OS doesn't officially support it?
Can a feature be implemented into Syncthing that allows one card to do one task and another card perform another task? (such as in/out or folder a/b?)
AudriusButkevicius commentedon Jun 7, 2017
If the OS does not support it, you should change your OS to use full potential of your hardware.
Sure, we can fit a rocket engine to syncthing and fly it to the moon, but why would we?
Ferroin commentedon Jun 9, 2017
Bonding/Etherchannel/802.3ad/Teaming/<insert your OS's name here> is the job of the OS. It's also not the only method of network load balancing, and has significant issues for most regular users (namely, everything has to be set up exactly right otherwise things break (especially with actual 802.3ad)). A suggestion to change your OS if it doesn't support it is somewhat ridiculous also, considering that only the server editions of Windows and OS X actually support it, and you shouldn't (or can't) run those on client nodes, and most people don't have the patience to learn to use a different OS.
Multi-homing though (having multiple networks with their own addressing connecting 2 or more nodes) requires application support, not OS support. It's not an OS feature (unless you're using SCTP or the non-standard extension for TCP, but those do still require some degree of support in the application), but something the application itself needs to be involved in. It also provides means of both failover and load-balancing, and it's implemented in layer 4 or higher (whereas bonding and friends are all layer 2), which means you can do it cross-platform. I personally don't agree that it's out of scope, but I will say that it's probably way more effort than it's worth, since getting it working correctly and reliably without using SCTP or the TCP extensions is hard, while most people probably aren't going to see any benefit.
calmh commentedon Jun 9, 2017
Is there some prior art on other applications in our solution space doing this?
Ferroin commentedon Jun 9, 2017
Not that I know of. Like I said, it's not a situation that will benefit a majority of users, as multi-homing is largely used in failover setups for WAN connections (especially ATM or X.25 networks because you can't do bonding there since it requires Ethernet as the underlying layer 2 protocol as implemented in every OS I know of which supports it). That said, improving file transfer efficiency by running over multiple networks is one of the possibilities for more widespread usage that's talked about somewhat regularly.
FWIW, now that I think about it, implementing this could be as simple as just doing local discovery on all interfaces and making one connection over each without eliminating duplicates (so, if device A and device B are both connected via Ethernet and WiFi, establish connections between them across both networks, not just one like we do currently). The way in which Syncthing itself works already handles most of what's involved in the load balancing, so the only issue should be converting the 1:1 mapping of connections to devices to N:1.
calmh commentedon Jun 9, 2017
I'd like to see at least one practical scenario where this would make an appreciable difference, for something like at least 1% of users, for it not to be clearly out of scope.
Keeping in mind that in my experience, Syncthing is almost never limited by the (local) network speed. The usual bottlenecks are CPU, disk I/O and network latency.
Ferroin commentedon Jun 9, 2017
Like I had said in one of my earlier posts, I don't think it's out of scope in the sense of functionality that's better handled elsewhere, but I will agree that it's probably not worth the effort of implementing given the minimal benefit for most users.
The primary situations I see where this could help are:
I'd be willing to bet that case 2 is actually pretty common, but it would need some for of limiting so that one person with a couple of 10G uplinks can't swamp all the relays. Case 1, as I mentioned there, could largely be improved by simply checking bandwidth on each possible connection path to a node and automatically selecting the highest bandwidth link.
calmh commentedon Jun 9, 2017
Ferroin commentedon Jun 9, 2017
Same here, although I do still get noticeably higher bandwidth when using a direct connection than using WiFi, and the difference for the specific case I have (default-on VPN between two systems that may or may not be on the same network) is close to a factor of 10-20 in terms of performance.
Agreed, I was only listing it out of the interest of completeness.
jebeld17 commentedon Jun 10, 2017
Well - regardless if multihoming will be brought as a user-defined feature to Synching, I must say it's at least good we are having this discussion! :-)
marclaporte commentedon Jun 18, 2023
Will be addressed soon: #8918