Active
Project:
Boost
Version:
6.x-1.17
Component:
Server Hosting
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
15 Dec 2009 at 20:03 UTC
Updated:
2 Apr 2010 at 07:53 UTC
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.
Comments
Comment #1
mikeytown2 commentedIf 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.
Comment #2
Dave Kinchlea commentedUnless 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).
Comment #3
Taras_ commentedHow hard will be to implement independent per-backend boost caches? NAS isn't option for true shared-nothing config.
I consider option to add additional field to Boost DB tables (hostname of backend) + per-backend cache flushing. I.e. common Boost settings for all backends, but absolutely independent caches and cache flushing.
Comment #4
mikeytown2 commentedNew column for each backend server is an interesting idea...
Comment #5
Taras_ commentedWe use csync2 for syncing 3 backends. It syncs all Document Root content across all servers excluding /cache dir. Syncing /cache is not option because of very small cache expiration time ~3 min. (news portal).
As I unerstand, this approach (per-backend independent cache) can be done without changing core logic of how Boost works.
Can we rely on your consulting help if we'll be able to allocate resources for implementing this feature? I.e. to implement it correctly for including in Boost project?
Thanks in advance.
Comment #6
mikeytown2 commentedIf you start to write code for boost I will do my very best to get it into the module and working correctly. Proof: Issues RTBC & Needs review:
http://drupal.org/project/issues/search/boost?status[]=13&status[]=8&status[]=14&version[]=6.x
If you look around you will not find a patch written by someone else; if they went through the effort of writing it, it needs to go in. Unless of course it's a bad idea. This seems like a cool idea so I'm willing to help it go in. This might be of interest
#747788: Instant cache expiration: "Aggressive" page flushing