We're considering best strategy for using cache (memcache
or redis
based) in our application (Symfony2
). It will be deployed on multiple (so far 3) separate machines with load balancing and separate replicated databases + one common shared storage. There's also fourth server, used mostly for crons and sending mass mailing.
Please note that cache will be frequently not only used, but also updated due to frequent data changes.
So far we have three attempts:
we place single cache on fourth machine and share it across the domain. Bad side is, when this machine fails, everything fails.
we place separate caches on multiple machines, each one has it's own cache. Downside is that we have to reserve more computing power to do redundant task.
one machine rebuilds the cache and then propagates it to separate machines (downside same as in 1st case).
What's the best option to handle this?