We want to install Varnish on our nodes that are handled by an Auto-Scaling Group and ELB. These servers currently grow and contract based on load from 2-10 nodes. We do not want to have another "master" varnish server due to cost implications.
Our optimal diagram would look like this:
ELB
/ | \
Node 1 - Node 2 - Node 3, etc.
| | |
Varnish Varnish Varnish
| | |
Apache Apache Apache
| | |
Centralized MySQL/File Servers
For further understanding, Varnish would be running on each of the Nodes as if all three are separate.
How do we keep all the Varnish's in-sync especially involving cache events (for example, someone updates a post on WordPress, and WordPress purges one of the Varnish caches but not the other 2). I would rather not add another dedicated Varnish server to oversee all of this. How do you normally handle the 3 varnish instances syncing across each other? Is there something I am not thinking of correctly or an alternative configuration?