How I used BitTorrent Sync between offices in Russia and China

I have not seen articles about BitTorrentSync for a long time , and I am very surprised: it is such a useful tool. Just the other day a new version * was released, and I decided to tell how I applied this solution at work.



Start

Once in our company there came a time when it became necessary to exchange rather heavy files - product and packaging mockups (100-500 megabytes) between offices in Moscow, Yekaterinburg and an office in Zhejiang Province, China. The difficulty was in the catastrophically low speed and reliability of the Russian-Chinese communications.

When I drew attention to the problem, there was complete confusion and reeling: this was the transfer of files in the form of multi-volume archives of 9 megabytes through corporate mail with a server in Yekaterinburg, and public file hosting services with tons of advertising, and transmission via Skype. Advanced employees used Dropbox with varying success (until the Great Chinese Firewall began to block it ), and Yandex.Disk.

All of these methods were united by one thing: low speed, cliffs and blockages by the Chinese government. A 120 megabyte layout could swing an hour and a half, and break off in the middle. I did not want to return to the era of Flashget. At the same time, the guaranteed channel of the Chinese provider was 10 Mbps, and inside China, of course, such speeds were issued without problems.

In the process of finding a solution to this problem, as well as the problem of slow corporate mail in China, they even discussed installing a satellite dish and connecting to a Russian satellite. However, incredible tariffs tempered the ardor. Mail was more or less sorted out by setting up an intermediate mailbox on a third-party stable working service (in our case, Yandex.Mail; Western services in China like to block, and Chinese mailers consider non-Chinese mail as spam). But with the file transfer was not so smooth. FTP was not comfortable with the speed; the VPN to the Russian server was also not stable.

Then I thought about BitTorrentSync.

Conditions

So, it is given:

1. Three offices: 2 in the Russian Federation, 1 in the PRC
2. Three to five employees in the Russian office (stationary machines) and six to seven in Chinese (laptops) who needed to exchange files with each other, the entire infrastructure is Windows XP, 7, 8;
3. Rack servers in all offices, which were used including as a local file storage;
4. A lot of client machines in all offices that did not directly need to exchange files;
5. Great Chinese Firewall, sudden and merciless.

At first glance, everything is simple: install Sync for these employees, make one directory with a shared key, and everything will work.
In practice, I had to tinker a bit.

Installation, problems, solutions

1. In addition to the actual users who needed it, Sync was installed to everyone whom it didn’t bother (that is, to desktop computers with relatively large amount of free space on the hard disk) in read-only mode - this increased the speed and reliability of transmission between peers inside the network;
2. Additionally, the client was delivered to those who used the laptop (again with sufficient free space) also in read-only - that is, users connecting through other networks increased the survivability of the entire system in case of problems with external communications at the office provider;
3. Also, Sync was installed on the server in all offices, so that the files are available as a network folder for those who cannot install Sync;
4. In the routing rules, I had to follow the advice from the forum and open ports 3000 and 9999, so that synchronization starts faster;
5. The sync_max_time_diff parameter was set to 0, since all users were in different time zones;

Faced with some difficulties:

1. Sync by default saves all deleted files in a hidden directory .SyncArchive, which with the active use of the exchange quickly grew to hundreds of gigabytes, clogging the memory of some devices to zero (obviously, what leads to the lack of free space on the system laptop drive). I hope that in future releases they will make it possible to tightly adjust the maximum volume of this folder;
2. An attempt to transfer a file weighing 8 gigabytes also led to uncontrolled clogging of computers. The optimal size in our case was 50-500 megabytes;
3. Although the process of exchanging files for end users is simplified to the limit, I still had to write a warning - see the spoiler:
Instruction manual

!!! I draw your attention to the fact that deleting a file by one of the participants will entail deleting the file from everyone else - do not do wrecking! If you want to delete all files of the exchange folder from the computer, then first you need to delete the folder from the BitTorrent Sync program (Delete folder button).

Files are transferred between computers directly, without intermediate servers.
Therefore, to transfer a file on the network must be at least two members of our group. When one of the participants receives the file, he “transfers the chain” to the others. The more participants in the group, the more reliable and fast the files are transferred.
The maximum file transfer speed is within the local network (for example, in one office), and the minimum is between cities.
Folders are synchronized at a certain interval (several minutes), so file transfer may not start instantly, but with some delay.
It is enough to copy the file to the appropriate folder, and it will be downloaded to computers to all participants.
If necessary, the program can be installed and configured on a home computer or laptop - files will be downloaded there too.

Sincerely,
Namedirek


Sure, the program is still in beta, but it is already quite usable.

Pros and cons


Among the advantages, the following should be noted:
0. Free;
1. For the user, the file transfer process is transparent and simple: you just need to copy the file to the desired folder;
2. In our conditions, in general, faster and more reliable than affordable cloud storage;
3. Fast exchange rate inside the office.

And, of course, the disadvantages:
1. Certain efforts to configure software for each client;
2. For some time, to explain to employees why by deleting a file with himself, he deletes it from all his colleagues;
3. Beta: there are rare bugs like spontaneous stop of synchronization, which helps to restart the system;
4. For paranoid - not yet opensource;

Total

It was possible to achieve a stable file exchange between the Russian Federation and China at a speed in the district of 120 kB / s, which is a head better than the 10-12 kB that we had before. Just compare before ...



... and after:


To connect users in the absence of specialists, I wrote a mini-instruction, also under a spoiler:
Setup Instructions
Instructions for connecting the exchange folder:


(if any items are difficult, please contact a specialist)
0. There must be at least 25 gigabytes of free space on the hard disk of the computer.
1. Create the GC_SHARE folder in the root directory of the disk (for example, D: \ GC_SHARE \, or C: \ GC_SHARE \)
2. Inside the GC_SHARE folder, create the VIDEO, LAYOUTS, IDEAS, PHOTO, DOCUMENTS folders (on topics that you need to exchange);
3. Download the BitTorrent Sync program - labs.bittorrent.com/experiments/sync/win-download.html
4. Run the downloaded program, install in the default folder;
5. Run the installed program.
6. Connect the created folders to the program as follows:
6.1 In the BitTorrent Sync program, on the Folders tab, click the Add folder button;
6.2 a pop-up window in the second row list the path to the folder (using the Select button, such as D: \ GC_SHARE \ LAYOUTS) in the first line insert the appropriate code from the table below:

LAYOUTS
AV6LDEXXXXXXXXXXXXXXXXXXXX64NVJDJCX3II

PHOTO
ALVVVQKXXXXXXXXXXXXXXXXXXXXOB622CO42O

DOCUMENTS
A6E4EECXXXXXXXXXXXXXXXXXXXXRA44ISVTDZ3

6.3 repeat with all folders;
7. In the program, open the Settings tab:
7.1 in the Name field write your name in Latin letters (for example ZHDANOV VLADIMIR)
7.2 set all the checkmarks to the active position, except Notify me when downloads are completed;
7.3 in the Limit download speed and Restrict upload speed fields, set the values ​​to 5000 and 5000;
8. Click the Advanced button:
8.1 find the sync_max_time_diff item, left-click on it, replace the value 600 with 0 in the field below, click the Set button and close the window; Click Apply.

Setup completed.

Features:

Files are transferred between computers directly, without intermediate servers.
Therefore, to transfer a file on the network must be at least two members of our group. When one of the participants receives the file, he “transfers the chain” to the others. The more participants in the group, the more reliable and fast the files are transferred.
The maximum file transfer speed is within the local network (for example, in one office), and the minimum is between cities.
Folders are synchronized at a certain interval (several minutes), so file transfer may not begin immediately, but with some delay.

It is enough to copy the file to the appropriate folder, and it will be downloaded to computers to all participants.
If necessary, the program can be installed and configured on a home computer or laptop - files will be downloaded there too.
I draw your attention to the fact that deleting a file by one of the participants will entail deleting the file from everyone else - do not do wrecking! If you want to delete all files of the exchange folder from the computer, then first you need to delete the folder from the BitTorrent Sync program (Delete folder button).

Sincerely,
Namedirek


I hope the description of the live use of the system will give you new ideas.

At home I also use Sync: to backup photos from my phone, archive telephone recordings, organize torrent downloads on an impromptu media server, backup working files to a file storage ... But this is a completely different story.

How do you use Sync in life?

PS: While the post was in draft copies, an even newer version was released - it already added the ability to not store copies of files in .SyncArchive, and much more.

Also popular now: