Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Is there an easy way to mirror a vps for round robin?
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Is there an easy way to mirror a vps for round robin?

Hello. Is there an easy way to make a mirror vps box to the main box in real or, almost real time (5 to 10 minutes delay), so, I can use round-robin or other load balance functions to share the load of my server?
Is there a good tutorial for the installation and use of rsync to use it for this reason?

Comments

  • netomxnetomx Moderator, Veteran

    Rsync ?

  • Mirroring is one thing. Use rsync.

    Round-robin load balancing is something altogether different and more complex.

  • @sleddog said:
    Mirroring is one thing. Use rsync.

    Round-robin load balancing is something altogether different and more complex.

    Round robin is a next step project, with the use of a third box. For now, I want some instructions to use rsync to mirror a vps

  • @jvnadr said:
    Round robin is a next step project, with the use of a third box. For now, I want some instructions to use rsync to mirror a vps

    • Setup ssh keys between boxes so you can do rsync over ssh.
    • Decide what you're going to mirror and which user will do it (root? a specific user?)
    • Attempting to mirror everything will either fail or lead to problems, like overwriting the network config on the remote box. You're safer defining user data and selected server config bits (like vhosts if its a webserver) and mirroring just those.
    • Study the options for rsync. Play. Ask specific questions after :)
  • @sleddog

    Thanks!

  • servarica_haniservarica_hani Member, Patron Provider

    Hi

    If you host a dynamic website on the VPS (website with database) you will get into trouble if you just use rsync for mirroring .

    for dynamic website use the idea of master-slave in mysql and only replicate the database in real time.
    for files you can replicate them in less aggressive manner.

  • There are many ways to do this, but a replicating filesystem is probably your best bet. Look into DRBD and GlusterFS for this.

    Rsync is awesome, but what if a file is added on the "slave"? It won't be sent to the other node unless you have Rsync setup in both directions.

  • If you go the rsync route I'd recommend lsyncd on the master server to trigger updates. Life is going to be a lot simpler if things are only in one direction.

  • GlusterFS or MooseFS. Lustre is overkill here..

  • @texteditor said:

    GlusterFS is very good if you don't need very low latency (<0.5 seconds), and I'm using it for myself as with clients with pleasure. Recently upgraded two clients from 3.3 to 3.4, without issues or downtime.

  • SplitIceSplitIce Member, Host Rep

    btsync will somewhat work (doesnt sync permissions). but if it is just data (e.g data files) then it should be able to cope. Latency is usually ~10-30s from my observations.

Sign In or Register to comment.