Boost + load balancer
mburak - December 15, 2009 - 20:03
| Project: | Boost |
| Version: | 6.x-1.17 |
| Component: | Server Hosting |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
Hi,
how does Boost work behind a load balancer balancing 2 or more web servers ? Would it have a static cache per server? What happens when I want to flush a page cache? How do Boost notify all the servers ?
Thanks,
Matias.

#1
If you have a really fast NAS using that is the best; otherwise using rsync is a good solution
http://drupal.org/node/583264#rsync
#570458: Multi-Server: Send signal to other servers for cache removal of expired content (boost behind load balancer)
Having boost support multiple webheads would be nice, but it would take a lot of extra work to do it correctly.
#2
Unless I misunderstand the request, your pointer to the rsync post won't really help, it only provides a cluster of static cache servers. I think the request is asking about multiple Drupal sites running boost (which I'm sure you understood as well).
You need more than just a fast NAS, you need a reliable one and it needs to be external from all of your webheads (else you lose the redundancy expected with a load-balanced solution). Having all your web servers mounting that should suffice assuming your NAS can keep up with load; use a gigabit or better network for intraserver communication and use TCP NFS if you can (I'll reveal my bias here and say that I wouldn't attempt this for a CIFS-based NAS connection but that probably isn't fair these days)... the only real problem here would be a potential locking problem, but I'd be surprised if Boost locked the files it creates as I can't think of any reason to do so (does it Mike?).
I think the real concern would be the cron runs, particularly boost_crawler, you'd want that only run on one of the hosts.
I'm not really sure it is possible to run multiple sites using rsync effectively; there are certainly lots of opportunities for race conditions with rsync and cache clearing; unless you can absolutely ensure that rsync will not run while cache clearing takes place, I can see a lot of confusion between what boost thinks is in the cache and what is actually in the cache.
In any case, be sure your servers are synced to a common time source regardless of your approach. Also don't forget to use Boost's
Set FileETag 'MTime Size' - Useful in server clusters (Recommended)option; this will ensure that whichever Boost host creates a page cache, clients will see it as the same page (and thus get a 304).