title: W3 Total Cache - Advice needed keeping load balanced servers in sync
body: <p>I currently have a single web server hosting multiple WordPress sites which use W3TC.</p>
  
  <p>Let's call said web server "Server A". I'm looking to clone this server, we'll call the clone "Server B".</p>
  
  <p>I'm then looking to load balance Server A and Server B.</p>
  
  <p>I also want a third "Admin" server. This is where I will log into WordPress and make changes to the sites hosted on Server A and Server B.</p>
  
  <p>Incidentally I have a separate database server, and am using Rackspace Cloud Files CDN for all of my attachments / theme files / etc.</p>
  
  <p>What I'm puzzled about is keeping everything in sync. Or, more specifically, keeping the W3TC cache in sync. For example, if I log in to the Admin Server and publish a new post, due to me having specified that various pages should be purged from cache when I create or edit a post, the page cache on the Admin Server will be cleared. The page caches on Server A and Server B, however, will not be cleared.</p>
  
  <p>I could call a script on Server A and Server B which would use w3tc_pgcache_flush() to flush the caches on these servers, but how do I get these scripts to run when a post is created/edited on the Admin Server? Is there an event I can hook into?</p>
  
  <p>Another option I had considered was that I could use lsyncd to sync any changes to the contents of the /wp-content/w3tc/ folder on the Admin Server to Server A and Server B, but then I realised that no page cache will exist on the Admin Server because no one will ever visit the instances of the sites hosted upon it.</p>
  
  <p>Bonus question: Do I need to sync all of my attachments across all servers or can they reside only on the Admin Server? I ask because W3TC is set to export changed files automatically - if it looks in the /wp-content/uploads/ folder on Server A or Server B and finds it empty, is it going to remove all of my files from the CDN?</p>
  
  <p>I'm hoping someone on here has implemented something similar or knows of a better way of doing what I'm trying to achieve?</p>
  
  <p>Many thanks in anticipation -</p>
  
  <p>chris</p>