Title: Loadbalancing WordPress
Last modified: August 19, 2016

---

# Loadbalancing WordPress

 *  [mutahir](https://wordpress.org/support/users/mutahir/)
 * (@mutahir)
 * [16 years, 3 months ago](https://wordpress.org/support/topic/loadbalancing-wordpress/)
 * Hi All,
 * I have to install wordpress (One Blog, one domain, for e.g. mycompany.com/blog)
   on two servers sharing one database on a different server, these two servers 
   are behind a loadbalancer and the db would be on another server. We are planning
   this way due to high traffic.
 * I have done standalone wordpress installations on a single server, on windows
   2003, 2008 with IIS6, 7 etc
 * I am just researching as to how would I implement this.
 * What would be the steps to achieve this and upon searching I saw some posts regarding
   the wp-content/uploads directory to be synced at regular intervals ?
 * your help much appreciated
    Thanks for reading

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Thread Starter [mutahir](https://wordpress.org/support/users/mutahir/)
 * (@mutahir)
 * [16 years, 3 months ago](https://wordpress.org/support/topic/loadbalancing-wordpress/#post-1369607)
 * Hi All 🙂
 * Anyone any thoughts on the above ?
 * Kind regards
 *  [volomike](https://wordpress.org/support/users/volomike/)
 * (@volomike)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/loadbalancing-wordpress/#post-1369707)
 * I don’t know with IIS, but perhaps you can translate what I would suggest in 
   Linux and do that with Windows.
 * On LAMP, given your problem, I would be mounting a shared volume with either 
   NAS or iSCSI or NFS. I would mount this on each Linux web node as /var/www. The
   blog code would load on each web node from that code base. That way, there’s 
   no syncing between web nodes because it’s the same file base. Then, I would use
   LVS (linuxvirtualserver.org) for the web farm, and point it back to a central
   MySQL database. (That alone would pick up performance. However, to improve the
   MySQL performance you could cluster it, or at least add replication so that you
   have a fast system to cutover too in the event of a problem.)
 *  [gaspol65](https://wordpress.org/support/users/gaspol65/)
 * (@gaspol65)
 * [15 years, 11 months ago](https://wordpress.org/support/topic/loadbalancing-wordpress/#post-1369721)
 * In the proposed solution above, are you saying that you only need to install 
   WordPress once (on the shared volume) and you can have multiple Apache nodes 
   accessing it? So the only thing running on the web nodes would be Apache (at 
   least to serve up web pages)?
 *  [jetole](https://wordpress.org/support/users/jetole/)
 * (@jetole)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/loadbalancing-wordpress/#post-1369739)
 * With what was suggested, yes you would only need to install it once however you
   would have a single point of failure since, if your file share goes down then
   so do all of your web sites and the load balancer would be pointless at this 
   point. If you don’t mind a single point of failure and you are only doing this
   for faster access / load times then yes, this should increase your load time.
   One way to do this to avoid the single point of failure would be to either have
   replication between the two drives which can be done (in Linux and most *nix)
   with DRBD, a regular scheduled rsync or I am sure there are other ways. Another
   way would be to have two file servers that sync via DRBD and then use fail over
   with the file servers. You can do this by using NFS like what volomike said but
   have a second NFS server with an identical share (via DRBD for example) and if
   the first file server fails, you can have the second file server take over via
   use of keepalived or something similar. If you do want to get rid of all scenarios
   where a single host can cause the site to be down then you would also want to
   implement MySQL clustering and use some sort of Disaster Recovery (DR) / High
   Availability (HA) with the load balancer itself. You can also use keepalived 
   for Linux based load balancers i.e. if you are using IPVS (or even haproxy) then
   you have two identical hosts with one inactive that monitors the first one via
   keepalived and if it finds that the first one is down then it will take over.
   The main idea behind HA is that you should be able to walk into the data center,
   unplug any server. I mean any server, take it off the rack and throw it out the
   window and still have your site running in a way that clients will never even
   know or be able to find out that anything has changed when any server has been
   removed.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Loadbalancing WordPress’ is closed to new replies.

## Tags

 * [load balance](https://wordpress.org/support/topic-tag/load-balance/)
 * [load balancing](https://wordpress.org/support/topic-tag/load-balancing/)
 * [wordpress 2.9.1](https://wordpress.org/support/topic-tag/wordpress-2-9-1/)

 * In: [Installing WordPress](https://wordpress.org/support/forum/installation/)
 * 4 replies
 * 4 participants
 * Last reply from: [jetole](https://wordpress.org/support/users/jetole/)
 * Last activity: [15 years, 4 months ago](https://wordpress.org/support/topic/loadbalancing-wordpress/#post-1369739)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
