Howdy, Stranger!

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


Keeping content on webserver-nodes all updated?
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.

Keeping content on webserver-nodes all updated?

OvateOvate Member

Let's say I want to load balance, I have 5 web server nodes I want to load balance on. How could I keep all the content on each server updated?

Just having a thought.

Comments

  • rm_rm_ IPv6 Advocate, Veteran

    That's if your site is read-only or even static and uses no DB. If not, then there is no easy answer.

  • jarjar Patron Provider, Top Host, Veteran

    An rsync is fine for files, use a separate MySQL server and/or MySQL replication for database.

    http://dev.mysql.com/doc/refman/5.0/en/replication-howto.html

  • @rm_ said:
    That's if your site is read-only or even static and uses no DB. If not, then there is no easy answer.

    In that case wouldn't it be best to use a separate server as a remote MYSQL Server so that all sites can just pull the db of that?

  • rm_rm_ IPv6 Advocate, Veteran

    xaitmi said: use a separate server as a remote MYSQL Server so that all sites can just pull the db of that?

    Sure, but that's still a single point of failure. Perhaps I misread the OP, I thought they want fault-tolerance as one of the reasons to have multiple nodes.

    Load-balancing purely for performance reasons rarely makes sense, at least at the scale where you still order LEB VPSes and not clusters of dedicated servers.

    And if your goal is really just performance, having a remote MySQL server with considerable ping times to all or some of the nodes will eliminate some or most of the benefit of load-balancing in the first place.

  • @rm_ said:
    That's if your site is read-only or even static and uses no DB. If not, then there is no easy answer.

    Static caching?

  • edited March 2015

    @Ovate said:
    Let's say I want to load balance, I have 5 web server nodes I want to load balance on. How could I keep all the content on each server updated?

    Just having a thought.

    MySQL: Run Percona XtraDB Cluster on each node with PTP VPN in between all nodes (not a central VPN server, if that fails, your MySQL is going to crap itself). A bit dependent on latency, don't bother if latency is over 100 as it sometimes causes odd things and desyncs to happen (when the server is desynced, it goes to read-only to prevent damage). Requires at least 3 nodes minimum. If I were you, I would use more.

    Syncthing/BTSync: Use to sync files on all servers at once. Syncthing by default only checks for updated files per 10m(?), however this can be fixed by https://github.com/syncthing/syncthing-inotify . Btsync is not Open Source.

    Balancing: Haproxy with multiple nodes

  • Take a look at Gluster, Csync2, and Syncthing.

    Each has particular strengths and weaknesses.

  • Mount NAS on all the webs, keep a single instance of the web content on shared storage, and split DB off to a dedicated DB cluster. Put a HAproxy cluster in front of the lot, and ensure all your components run on different physical servers...

  • Good advice @dediserve, however the NAS then becomes a single point of failure. Not to mention that NAS/SAN don't do so hot when you geo-disperse servers.

  • Well, NAS is a loose term for any remote mounted file system.

    It can be a fully redundant HA NAS cluster, etc, or a pair or more of VMs, etc.

    If the content is very static, a 'master' VM with rsync will also work well.

  • HAProxy + (Syncthing + Syncthing Inotify) + Offloaded MySQL

  • wychwych Member

    rsync / mysql replication.

Sign In or Register to comment.