best multi-devices sync config

Hi,

I’m trying to setup the following scenario: server A at office A server B at office B client C at either office or home Server A and B hold a lot of files, and client C syncs a part of that using ignore pattern.

What is the best approach to configure sync pair? My straight forward idea is A<=>B and A<=>C and A<=>B, but wondering it’s okay. I prefer stability over speed, so I don’t care which, A or B is fast to sync with C. As long as the sync works good, it’s great.

Any advice are appreciated!

What’s wrong with a fully connected mesh? This should work just fine, given that you only have a small cluster.

Thanks for your comment. As long as a full mesh has issue, that’s fine. I was just not sure which structure, mesh-like or hub-spoke is recommended.

Thanks again.

Personally I would recommend a mesh until you start having difficulties managing the devices (adding/removing devices) at which point a hub-spoke becomes more practical from a management perspective.

Mesh is better initially because it ensures the highest likelihood of files being up to date on any given device.

If you happen to have an always on server in your cluster that has high reliability/uptime then you have other options in terms of introducers or going hub-spoke from the beginning.

Personally I use mesh between desktop/laptop/server computers, but my personal Android device only syncs to my main desktop device (even though the folders it shares are otherwise shared with most of the cluster devices). I do this because I sometimes uninstall Syncthing on my phone and it’s a hassle to go to each other cluster device to re-add it. I could probably save the keys and re-add it that way but it’s easier to just have it syncing with one other node rather than all nodes.

Thanks for your comment. My doubt came more from technical thought.

Assuming A<=>B and B<=>C and A<=>C, three site mesh configuration.

  1. add a file at A
  2. this change are propagated to B and C simultaneously
  3. Each B and C tells another there’s a new file. Doesn’t it make conflict?

So I wondered that mesh config is recommended or not.

Nothing changes: It is recommended.

In fact I’d say it’s the very core of Syncthing that this works - being p2p.

To maybe help get an intuition of what Syncthing does in your scenario:

  1. Add file at A
  2. A tells B and C simultaneously that it has a new file with version A:1.
  3. B and C start pulling the data from A.
  4. Once finished B and C tell A and B/C respectively that they now also have that new file with version A:1 - everyone is happy.

The primary mechanism to get into a consistent state across all devices (global state) doesn’t happen by syncing the file data, but exchanging about metadata about the data/files that every device has. Once that happened every device on its own decides what data it needs to request from which devices to get up-to-date with this global state.

Simon, thanks for your detailed explanation! I’ll configure my system as mesh.

Thanks for you advice!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.