S
S
Sergic2018-05-03 08:29:46
linux
Sergic, 2018-05-03 08:29:46

How to ensure file synchronization between VPS (without using cdn)?

There is one instance of the application that works with the database and accepts, saves files, and also gives them away.
We need to deploy it in another region, the replica database has been set up, the instance has been raised, but the application does not yet work with cdn.
What is the best way to quickly synchronize files between vps, what tools to resolve, are there already precedents and examples? And so that there are no cyclic records: server1 -> server2 -> server1 -> ... so that it registers on the server once

Answer the question

In order to leave comments, you need to log in

5 answer(s)
P
pfg21, 2018-05-03
@Sergic

syncthing - daemon, hangs in memory, synchronizes files between a bunch of clients. at small changes in a file - updates only changed. read the same rsync only smarter.
about terabyte clouds were cast on lore from a dozen and a half clients.
Inotify keeps track of writing to disk, so it catches disk changes almost immediately.
web face control.
open source

O
OnYourLips, 2018-05-03
@OnYourLips

ceph, glusterfs.

A
Alex McArrow, 2018-05-03
@AlexMcArrow

The simplest rsync is s1->s2 and s2->s1 a cron once a minute.
It's fast and cheap and with a lot of points: sync time is once a minute, space usage on both servers.
Better yet (for the future) read OnYourLips

P
Puma Thailand, 2018-05-03
@opium

Nginx reverse proxy and configure cache in it

D
Denis Oleinichenko, 2018-05-04
@wellweb_host

rsync to cron

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question