Trellis FastCGI Caching and Load Balancers

Hi,

Just wondering what the recommended Trellis setup is for Caching with a load balanced, multiple server environment? Is the included FastCGI caching suitable for this setup, or perhaps should we solely use Memcache(d) in this situation?

Many thanks!

In a load balanced setup you do not want individual servers maintaining cache state because this can lead to somewhat unpredictable cache hits or misses depending on what server fulfills a request.

You will probably want a central memcache instance to share between the servers anyway, so mind as well use it to cache the pages.

1 Like

You could also use Nginx as the load balancer and use its proxy_cache feature instead of fastcgi_cache.

Many thanks for the replies, will look into proxy_cache for page caching across servers.

Until memcache (not memcached) supports PHP7, we are still at odds about how to best implement our Object Caching with the latest Trellis. Im sure you are all keeping an eye on it also!

What’s the problem with memcached? It’s the better PHP extension.

Only problem being that W3 Total Cache doesn’t work without memcache, which unfortunately might be a hard requirement (out of our hands). Thanks for the replies however, thats really helpful to our cause at the moment.