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;








0















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:



enter image description here



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!










share|improve this question







New contributor




Norbert Boros is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.


























    0















    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:



    enter image description here



    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!










    share|improve this question







    New contributor




    Norbert Boros is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.






















      0












      0








      0








      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:



      enter image description here



      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!










      share|improve this question







      New contributor




      Norbert Boros is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.












      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:



      enter image description here



      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






      share|improve this question







      New contributor




      Norbert Boros is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      share|improve this question







      New contributor




      Norbert Boros is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      share|improve this question




      share|improve this question






      New contributor




      Norbert Boros is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked Apr 4 at 14:46









      Norbert BorosNorbert Boros

      1011




      1011




      New contributor




      Norbert Boros is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      Norbert Boros is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      Norbert Boros is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.




















          1 Answer
          1






          active

          oldest

          votes


















          0














          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.






          share|improve this answer























            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.









            draft saved

            draft discarded


















            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









            0














            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.






            share|improve this answer



























              0














              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.






              share|improve this answer

























                0












                0








                0







                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.






                share|improve this answer













                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.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered yesterday









                Mike PierceMike Pierce

                19511




                19511




















                    Norbert Boros is a new contributor. Be nice, and check out our Code of Conduct.









                    draft saved

                    draft discarded


















                    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.




                    draft saved


                    draft discarded














                    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





















































                    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







                    Popular posts from this blog

                    Wikipedia:Vital articles Мазмуну Biography - Өмүр баян Philosophy and psychology - Философия жана психология Religion - Дин Social sciences - Коомдук илимдер Language and literature - Тил жана адабият Science - Илим Technology - Технология Arts and recreation - Искусство жана эс алуу History and geography - Тарых жана география Навигация менюсу

                    Bruxelas-Capital Índice Historia | Composición | Situación lingüística | Clima | Cidades irmandadas | Notas | Véxase tamén | Menú de navegacióneO uso das linguas en Bruxelas e a situación do neerlandés"Rexión de Bruxelas Capital"o orixinalSitio da rexiónPáxina de Bruselas no sitio da Oficina de Promoción Turística de Valonia e BruxelasMapa Interactivo da Rexión de Bruxelas-CapitaleeWorldCat332144929079854441105155190212ID28008674080552-90000 0001 0666 3698n94104302ID540940339365017018237

                    What should I write in an apology letter, since I have decided not to join a company after accepting an offer letterShould I keep looking after accepting a job offer?What should I do when I've been verbally told I would get an offer letter, but still haven't gotten one after 4 weeks?Do I accept an offer from a company that I am not likely to join?New job hasn't confirmed starting date and I want to give current employer as much notice as possibleHow should I address my manager in my resignation letter?HR delayed background verification, now jobless as resignedNo email communication after accepting a formal written offer. How should I phrase the call?What should I do if after receiving a verbal offer letter I am informed that my written job offer is put on hold due to some internal issues?Should I inform the current employer that I am about to resign within 1-2 weeks since I have signed the offer letter and waiting for visa?What company will do, if I send their offer letter to another company