Server cluster setup using UNISON to sync files bi-directionally line/star/fully connected?How i can use unison to sync. files of folder with the latest modification time?Solution for two-way file-system transparent solutionLoad balanced Drupal servers: a good way to share data among the servers?What to use for software-based shared file storage?Recommended networked file system for web servers?Load Balancing + Folder syncHow to setup a simple Ubuntu Server Tomcat cluster on VirtualBox for testing?A server cluster for static filesUnison sync getting copy of replaced filesUnison / file syncing between servers without using root account
declaring a variable twice in IIFE
Motorized valve interfering with button?
What is the meaning of "of trouble" in the following sentence?
Draw simple lines in Inkscape
Do airline pilots ever risk not hearing communication directed to them specifically, from traffic controllers?
Why is an old chain unsafe?
Email Account under attack (really) - anything I can do?
XeLaTeX and pdfLaTeX ignore hyphenation
Circuitry of TV splitters
What do you call something that goes against the spirit of the law, but is legal when interpreting the law to the letter?
least quadratic residue under GRH: an EXPLICIT bound
Banach space and Hilbert space topology
What is the white spray-pattern residue inside these Falcon Heavy nozzles?
Example of a relative pronoun
New order #4: World
How can bays and straits be determined in a procedurally generated map?
Can an x86 CPU running in real mode be considered to be basically an 8086 CPU?
What typically incentivizes a professor to change jobs to a lower ranking university?
Could a US political party gain complete control over the government by removing checks & balances?
Is it tax fraud for an individual to declare non-taxable revenue as taxable income? (US tax laws)
What do you call a Matrix-like slowdown and camera movement effect?
Can I make popcorn with any corn?
Patience, young "Padovan"
Why has Russell's definition of numbers using equivalence classes been finally abandoned? ( If it has actually been abandoned).
Server cluster setup using UNISON to sync files bi-directionally line/star/fully connected?
How i can use unison to sync. files of folder with the latest modification time?Solution for two-way file-system transparent solutionLoad balanced Drupal servers: a good way to share data among the servers?What to use for software-based shared file storage?Recommended networked file system for web servers?Load Balancing + Folder syncHow to setup a simple Ubuntu Server Tomcat cluster on VirtualBox for testing?A server cluster for static filesUnison sync getting copy of replaced filesUnison / file syncing between servers without using root account
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
I appreciate that I'm asking multiple questions on the same topic, but they are all related to the same purpose.
Working a horizontal scaling cluster setup, and trying to setup unison to sync "var/www/html" for HA.
To sync between 2 servers is easy and works like a charm, however there will be 10+ servers connected via vLAN.
After a lot of searching I can see most people and even the unison docs recommend "star topology" setup:
However I may have just misunderstood the setup, or my worries are true ( you tell me ).
Star Topology:
In "star topology" setup, a "hub" server pushes changes to the rest of the servers.
For example we have servers : A (hub),B,C,D,E,F. If we add/change something on server A, it will sync it with the servers B,C,D,E,F.
However since I will host websites in "/var/www/html", what happens in the scenario where:
- A load balancer is used in front of all servers
- A wordpress website is hosted across servers
- An author adds a blog post with images, but he does it on let's say server D since the load balancer will "land" him on any of the servers
I would like an explanation for this, is it a case of you need to push from each server to A ?
Some example setup script would be very appreciated.
Fully Connected Topology:
- Can this be achieve with unison ?
- Is it better and more reliable than star topology ?
- How would the setup script look like on each server ?
Many thanks to anyone that will give feedback!
centos7 cluster unison
New contributor
add a comment |
I appreciate that I'm asking multiple questions on the same topic, but they are all related to the same purpose.
Working a horizontal scaling cluster setup, and trying to setup unison to sync "var/www/html" for HA.
To sync between 2 servers is easy and works like a charm, however there will be 10+ servers connected via vLAN.
After a lot of searching I can see most people and even the unison docs recommend "star topology" setup:
However I may have just misunderstood the setup, or my worries are true ( you tell me ).
Star Topology:
In "star topology" setup, a "hub" server pushes changes to the rest of the servers.
For example we have servers : A (hub),B,C,D,E,F. If we add/change something on server A, it will sync it with the servers B,C,D,E,F.
However since I will host websites in "/var/www/html", what happens in the scenario where:
- A load balancer is used in front of all servers
- A wordpress website is hosted across servers
- An author adds a blog post with images, but he does it on let's say server D since the load balancer will "land" him on any of the servers
I would like an explanation for this, is it a case of you need to push from each server to A ?
Some example setup script would be very appreciated.
Fully Connected Topology:
- Can this be achieve with unison ?
- Is it better and more reliable than star topology ?
- How would the setup script look like on each server ?
Many thanks to anyone that will give feedback!
centos7 cluster unison
New contributor
add a comment |
I appreciate that I'm asking multiple questions on the same topic, but they are all related to the same purpose.
Working a horizontal scaling cluster setup, and trying to setup unison to sync "var/www/html" for HA.
To sync between 2 servers is easy and works like a charm, however there will be 10+ servers connected via vLAN.
After a lot of searching I can see most people and even the unison docs recommend "star topology" setup:
However I may have just misunderstood the setup, or my worries are true ( you tell me ).
Star Topology:
In "star topology" setup, a "hub" server pushes changes to the rest of the servers.
For example we have servers : A (hub),B,C,D,E,F. If we add/change something on server A, it will sync it with the servers B,C,D,E,F.
However since I will host websites in "/var/www/html", what happens in the scenario where:
- A load balancer is used in front of all servers
- A wordpress website is hosted across servers
- An author adds a blog post with images, but he does it on let's say server D since the load balancer will "land" him on any of the servers
I would like an explanation for this, is it a case of you need to push from each server to A ?
Some example setup script would be very appreciated.
Fully Connected Topology:
- Can this be achieve with unison ?
- Is it better and more reliable than star topology ?
- How would the setup script look like on each server ?
Many thanks to anyone that will give feedback!
centos7 cluster unison
New contributor
I appreciate that I'm asking multiple questions on the same topic, but they are all related to the same purpose.
Working a horizontal scaling cluster setup, and trying to setup unison to sync "var/www/html" for HA.
To sync between 2 servers is easy and works like a charm, however there will be 10+ servers connected via vLAN.
After a lot of searching I can see most people and even the unison docs recommend "star topology" setup:
However I may have just misunderstood the setup, or my worries are true ( you tell me ).
Star Topology:
In "star topology" setup, a "hub" server pushes changes to the rest of the servers.
For example we have servers : A (hub),B,C,D,E,F. If we add/change something on server A, it will sync it with the servers B,C,D,E,F.
However since I will host websites in "/var/www/html", what happens in the scenario where:
- A load balancer is used in front of all servers
- A wordpress website is hosted across servers
- An author adds a blog post with images, but he does it on let's say server D since the load balancer will "land" him on any of the servers
I would like an explanation for this, is it a case of you need to push from each server to A ?
Some example setup script would be very appreciated.
Fully Connected Topology:
- Can this be achieve with unison ?
- Is it better and more reliable than star topology ?
- How would the setup script look like on each server ?
Many thanks to anyone that will give feedback!
centos7 cluster unison
centos7 cluster unison
New contributor
New contributor
New contributor
asked Apr 4 at 14:46
Norbert BorosNorbert Boros
1011
1011
New contributor
New contributor
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
Since you're aiming to sync a website between these servers, what you need is to make sure the servers are in sync all the time; that there is little or no delay between the files being changed on one server and getting Unison to update those changes to another server. This can be done pretty easily with the Unison option repeat=watch
and maybe using inotifytools
.
Tldr: The star topology avoids headaches that come up with the fully-connected topology.
The star topology setup can sync changes pretty instantly, but it requires Unison to be run a couple times. Suppose that the load balancer lands a user at server D
and the user uploads an image. Then if Unison is running with the repeat=watch
option, basically as a daemon watching your files for changes, then it'll start syncing to the hub node A
as soon as the image is uploaded. Now you need to trigger Unison to run between A
and the other spoke servers in your setup. Ideally you would want to split this work up among the spoke nodes, as opposed to running a bunch of instances of Unison on A
to push to the spokes. So I'd use inotifytools
on A
to watch for changes, and whenever a change occurs have A
send a command to each spoke to run Unison to fetch the changes on A
.
In contrast there is a complication that comes with a fully-connected setup, especially if just using repeat=watch
to sync thing instantly. Suppose a user uploads a file to server D
. Then in your fully connected setup you'd have Unison run one at a time, once for each other server to sync that file. So first D
syncs to A
, then D
starts to sync to B
, but because A
has changed and is now out of sync with B
, it will also run Unison and try to sync to B
, and now B
is trying to get updated from two sources at once ... and this might make Unison cranky at the least. Then goodness forbid that you get conflicting changes on two servers, like say a user uploads their file to D
but before everything syncs another user uploads a file of the same name to E
, in addition to this first headache.
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "2"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Norbert Boros is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f961520%2fserver-cluster-setup-using-unison-to-sync-files-bi-directionally-line-star-fully%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Since you're aiming to sync a website between these servers, what you need is to make sure the servers are in sync all the time; that there is little or no delay between the files being changed on one server and getting Unison to update those changes to another server. This can be done pretty easily with the Unison option repeat=watch
and maybe using inotifytools
.
Tldr: The star topology avoids headaches that come up with the fully-connected topology.
The star topology setup can sync changes pretty instantly, but it requires Unison to be run a couple times. Suppose that the load balancer lands a user at server D
and the user uploads an image. Then if Unison is running with the repeat=watch
option, basically as a daemon watching your files for changes, then it'll start syncing to the hub node A
as soon as the image is uploaded. Now you need to trigger Unison to run between A
and the other spoke servers in your setup. Ideally you would want to split this work up among the spoke nodes, as opposed to running a bunch of instances of Unison on A
to push to the spokes. So I'd use inotifytools
on A
to watch for changes, and whenever a change occurs have A
send a command to each spoke to run Unison to fetch the changes on A
.
In contrast there is a complication that comes with a fully-connected setup, especially if just using repeat=watch
to sync thing instantly. Suppose a user uploads a file to server D
. Then in your fully connected setup you'd have Unison run one at a time, once for each other server to sync that file. So first D
syncs to A
, then D
starts to sync to B
, but because A
has changed and is now out of sync with B
, it will also run Unison and try to sync to B
, and now B
is trying to get updated from two sources at once ... and this might make Unison cranky at the least. Then goodness forbid that you get conflicting changes on two servers, like say a user uploads their file to D
but before everything syncs another user uploads a file of the same name to E
, in addition to this first headache.
add a comment |
Since you're aiming to sync a website between these servers, what you need is to make sure the servers are in sync all the time; that there is little or no delay between the files being changed on one server and getting Unison to update those changes to another server. This can be done pretty easily with the Unison option repeat=watch
and maybe using inotifytools
.
Tldr: The star topology avoids headaches that come up with the fully-connected topology.
The star topology setup can sync changes pretty instantly, but it requires Unison to be run a couple times. Suppose that the load balancer lands a user at server D
and the user uploads an image. Then if Unison is running with the repeat=watch
option, basically as a daemon watching your files for changes, then it'll start syncing to the hub node A
as soon as the image is uploaded. Now you need to trigger Unison to run between A
and the other spoke servers in your setup. Ideally you would want to split this work up among the spoke nodes, as opposed to running a bunch of instances of Unison on A
to push to the spokes. So I'd use inotifytools
on A
to watch for changes, and whenever a change occurs have A
send a command to each spoke to run Unison to fetch the changes on A
.
In contrast there is a complication that comes with a fully-connected setup, especially if just using repeat=watch
to sync thing instantly. Suppose a user uploads a file to server D
. Then in your fully connected setup you'd have Unison run one at a time, once for each other server to sync that file. So first D
syncs to A
, then D
starts to sync to B
, but because A
has changed and is now out of sync with B
, it will also run Unison and try to sync to B
, and now B
is trying to get updated from two sources at once ... and this might make Unison cranky at the least. Then goodness forbid that you get conflicting changes on two servers, like say a user uploads their file to D
but before everything syncs another user uploads a file of the same name to E
, in addition to this first headache.
add a comment |
Since you're aiming to sync a website between these servers, what you need is to make sure the servers are in sync all the time; that there is little or no delay between the files being changed on one server and getting Unison to update those changes to another server. This can be done pretty easily with the Unison option repeat=watch
and maybe using inotifytools
.
Tldr: The star topology avoids headaches that come up with the fully-connected topology.
The star topology setup can sync changes pretty instantly, but it requires Unison to be run a couple times. Suppose that the load balancer lands a user at server D
and the user uploads an image. Then if Unison is running with the repeat=watch
option, basically as a daemon watching your files for changes, then it'll start syncing to the hub node A
as soon as the image is uploaded. Now you need to trigger Unison to run between A
and the other spoke servers in your setup. Ideally you would want to split this work up among the spoke nodes, as opposed to running a bunch of instances of Unison on A
to push to the spokes. So I'd use inotifytools
on A
to watch for changes, and whenever a change occurs have A
send a command to each spoke to run Unison to fetch the changes on A
.
In contrast there is a complication that comes with a fully-connected setup, especially if just using repeat=watch
to sync thing instantly. Suppose a user uploads a file to server D
. Then in your fully connected setup you'd have Unison run one at a time, once for each other server to sync that file. So first D
syncs to A
, then D
starts to sync to B
, but because A
has changed and is now out of sync with B
, it will also run Unison and try to sync to B
, and now B
is trying to get updated from two sources at once ... and this might make Unison cranky at the least. Then goodness forbid that you get conflicting changes on two servers, like say a user uploads their file to D
but before everything syncs another user uploads a file of the same name to E
, in addition to this first headache.
Since you're aiming to sync a website between these servers, what you need is to make sure the servers are in sync all the time; that there is little or no delay between the files being changed on one server and getting Unison to update those changes to another server. This can be done pretty easily with the Unison option repeat=watch
and maybe using inotifytools
.
Tldr: The star topology avoids headaches that come up with the fully-connected topology.
The star topology setup can sync changes pretty instantly, but it requires Unison to be run a couple times. Suppose that the load balancer lands a user at server D
and the user uploads an image. Then if Unison is running with the repeat=watch
option, basically as a daemon watching your files for changes, then it'll start syncing to the hub node A
as soon as the image is uploaded. Now you need to trigger Unison to run between A
and the other spoke servers in your setup. Ideally you would want to split this work up among the spoke nodes, as opposed to running a bunch of instances of Unison on A
to push to the spokes. So I'd use inotifytools
on A
to watch for changes, and whenever a change occurs have A
send a command to each spoke to run Unison to fetch the changes on A
.
In contrast there is a complication that comes with a fully-connected setup, especially if just using repeat=watch
to sync thing instantly. Suppose a user uploads a file to server D
. Then in your fully connected setup you'd have Unison run one at a time, once for each other server to sync that file. So first D
syncs to A
, then D
starts to sync to B
, but because A
has changed and is now out of sync with B
, it will also run Unison and try to sync to B
, and now B
is trying to get updated from two sources at once ... and this might make Unison cranky at the least. Then goodness forbid that you get conflicting changes on two servers, like say a user uploads their file to D
but before everything syncs another user uploads a file of the same name to E
, in addition to this first headache.
answered yesterday
Mike PierceMike Pierce
19511
19511
add a comment |
add a comment |
Norbert Boros is a new contributor. Be nice, and check out our Code of Conduct.
Norbert Boros is a new contributor. Be nice, and check out our Code of Conduct.
Norbert Boros is a new contributor. Be nice, and check out our Code of Conduct.
Norbert Boros is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to Server Fault!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f961520%2fserver-cluster-setup-using-unison-to-sync-files-bi-directionally-line-star-fully%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown