Varnish High Availability



The Varnish High Availability agent (vha-agent) is a content replicator with the aim of getting the cached objects inserted in one Varnish server replicated into other Varnish servers, increasing the resiliency and performance of your caching layer.

The solution is based on two parts: the first is a small VCL file that is easily integrated to your setup, and the other one is the actual vha-agent daemon.

The daemon reads Varnish’s SHMLOG, and for each object insertion detected it fires off requests to the neighboring Varnish servers, which will then fetch the object from the originating Varnish server, thus the same object is cached in all Varnish servers with only a single backend fetch.


  • Cross-Varnish replication: Greater resilience and boosted performance for your backend setup meaning shorter and more consistent delivery times.

  • Asynchronous replication: VHA live outside Varnish and doesn’t interfere with normal operations.

  • SSL/TLS support: Content replication can be done securely, leveraging SSL/TLS support in Varnish Enterprise.

  • Unlimited nodes support: Replication can happen to any number of nodes.

  • Multi-cluster: Nodes can be group by cluster, allowing VHA to send just one replication per remote cluster, instead of one to each node.

  • Limited Bandwidth: Leveraging Varnish Enterprise power, replicated objects can be revalidated when they expire, avoiding costly transfers.

  • ESI support: Replication respects the ESI protocol, making sure the fragments are replicated individually.

  • Simple configuration: Configuring VHA is a matter of minutes, and can be easily automated to react quickly to cluster changes.


A new version of VHA is available starting in version 6.0.3r6.