Reducing bandwidth


The Dave

Recommended Posts

I'm currently testing Sync on a small scale environment, for an eventual deployment on a larger scale. One concern I have is bandwidth consumed by mobile users who are paying per byte transferred, and have a need to sync files. 

My initial testbed was a pair of local servers (S1, S2), and workstations (W1, W2, W3), all of which are on the same wired LAN. I don't care about bandwidth consumption here, and the synchronization works perfectly. I was also planning on adding a remote server, VPS1, and am in the process of provisioning such. VPS1 will only carry the encrypted versions of files for security/safety, but will be on a multi-GB/s internet connection.

In initial testing, if I write 1GB of data to Sync on W1, I only see around 1GB of data go out to VPS1, which is expected and perfect. 

However, W3 is a laptop and when it's on a 3G/LTE connection (therefore outside the LAN), and I place a 100MB file into a Sync'd directory, I saw at least 200MB worth of bandwidth consumed. 

My idea about how to fix this is as follows: On the workstations, I will uncheck "Use tracker server", but leave "Search LAN" checked. I will then also use "Use predefined hosts" and list VPS1. If I've understood the logic, Sync will use "Search LAN" to discover local clients, but once machines move out of broadcast range, files will synchronize to VPS1 and it will take care of synchronizing the files out to other users, defeating the peer-to-peer beauty and therefore reducing bandwidth consumption.

Does this approach make sense? Will it work? Is there a better approach? 

Link to comment
Share on other sites

At this point I'm less confident about this solution. I haven't had as much time to test as I hoped, but it looks like the peers still eventually find each other even if I turn off "Use tracker server", although it doesn't happen as quickly. However, some of the peers appear greyed out, I'm not sure what that means either. 

Link to comment
Share on other sites

@The Dave When peer is using LAN discovery or tracker server, it will tell other peers about peers it knows. Also, Sync tends to cache IPs of peers it talked to, so even when you disable all discoveries, it still remembers the IP in cache and will attempt to connect.

If you want to isolate someone, you need to disable his tracker and LAN discovery and use predefined hosts only. Also, you can flush cache by temporary setting the "peer_expiration_days" power option to zero and then back to default value.

Link to comment
Share on other sites

Ahh, so it's LAN discovery that is part of what allows peers to share information about other peers? Fair enough. This will give me a workaround when I'm roaming. 

Would it be possible to request a feature to add an advanced option that would control whether my client will "Accept information from peers about other peers"? -- In other words, I'd like to discover people on the same LAN using broadcasts (I believe this is how Sync does it?), but otherwise, only use pre-defined hosts (our publicly accessible, high bandwidth server)

The point about cached peers is noted and appreciated. Thanks!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.