
Inside LAN Sync - tweakz
https://blogs.dropbox.com/tech/2015/10/inside-lan-sync/
======
teddyh
I’m disappointed that they used the stone-age method of UDP-broadcasts-on-a-
reserved-port to find other servers when there are modern standards like
ZeroConf which work quite well.

~~~
zdw
UDP broadcast is probably much simpler to implement and the code to implement
it is likely to be cross platform, whereas using ZeroConf would require
interfacing either with the native platform's specific implementation, or
including it's own implementation when the platform lacked one, and then
dealing with interoperability issues between all the platforms.

~~~
teddyh
Interoperability shouldn’t be an issue – that’s what a standardized protocol
is _for_. MacOS X has Bonjour already built-in. On Linux you can simply
require Avahi. For Windows there seems to be a large selection of available
ZeroConf libraries, depending on your implementation language (unless you want
to simply require Apple’s “Bonjour Print Services for Windows” bundle).

~~~
michaelmior
You just mentioned three different things necessary for three different
platforms. I could imagine it being easier to write a simple platform-
independent piece to handle the subset of functionality Dropbox needs.

~~~
ccccccc
Apple's C DNS-SD API[1] is available on OS X and Windows and Avahi offers a
shim that implements a decent subset of it.

1:
[https://developer.apple.com/library/mac/documentation/Networ...](https://developer.apple.com/library/mac/documentation/Networking/Conceptual/dns_discovery_api/Introduction.html)

~~~
ccccccc
Down votes for pointing out the same API is available on three platforms? (And
iOS and recent Androids for that matter.)

------
sahaskatta
Does anyone know why LAN Sync is normally turned off by default?

~~~
ComputerGuru
Security reasons. It can be used to confirm whether or not a certain file
exists on another PC on the network by observing where it's synced to/from.

That said, there's nothing novel here. People have been doing this for
decades, and extensions to the bittorrent protocol use it all the time to
prioritize LAN seeds over internet seeds. In fact, I believe there was talk a
while back about optimizing BT to prioritize peers and seeds on the same
subnet/ISP as a way of mitigating ISP bandwidth concerns and whatnot.

~~~
sleet
Facebook use bittorrent as part of their deployment process, they exploit rack
and cluster affinity to improve performance [1].

[1]
[https://facebook.com//download/1411324735760067/devops.pdf](https://facebook.com//download/1411324735760067/devops.pdf)

~~~
gogopuppygogo
Twitter has been doing this for a while:
[https://blog.twitter.com/2010/murder-fast-datacenter-code-
de...](https://blog.twitter.com/2010/murder-fast-datacenter-code-deploys-
using-bittorrent)

------
josho
This explains the high cpu usage on lan sync. Using http to send large files.
So, it has to constantly encode/decode to send over http. For reasons like
this I'm saddened that we never standardized on a secure file transfer
protocol.

~~~
wmf
What do you mean by encode/decode? I would expect TLS is the bottleneck here.

------
sudeepj
Druva already something similar called Cloud Cache. Excerpt: Metadata is
managed directly on the cloud for snapshot consistency and global
deduplication across all enterprise endpoints.

[http://www.druva.com/documents/Druva-CloudCache-
Datasheet.pd...](http://www.druva.com/documents/Druva-CloudCache-
Datasheet.pdf)

