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.
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
Rsync ?
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
@sleddog
Thanks!
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.
@Raymii does this
https://raymii.org/s/tutorials/Gluster-webroot-cluster.html
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.
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.