Search code examples
varnishdistributed-cachingcaching-proxy

Does Varnish support distributed caching?


Can Varnish distribute its cache to multiple machines?

For example, if the amount of data that needs to be cached by Varnish exceeds the amount of RAM available at the local machine, will I be hitting disk IO bottleneck or will Varnish be able to make use of remote machines to distribute the cache so as to avoid disk IO?


Solution

  • Consider using something in front of Varnish to distribute requests among several cache instances. You could use HA Proxy, nginx or another (non-caching?) Varnish instance to do this.

    Alternatively, you can use an SSD with file storage in Varnish, to reduce disk IO bottlenecks when using an object cache larger than available RAM.