Fanout Purge invalidates every Varnish in front of your Drupal site, not just one. It is a Purge purger that discovers your Varnish instances when it purges, from Kubernetes headless-Service DNS or a static list, and sends an HTTP BAN to all of them in parallel.
The problem
When Varnish runs as a Kubernetes Deployment with several replicas (on EKS, GKE, AKS or k3s), each pod keeps its own cache. A normal Service load-balances requests, so a purge sent to the Service hostname reaches one pod. The other pods keep serving stale pages, with no errors, until their TTLs expire.
You won't see this on a single-replica dev cluster. It shows up in production as soon as you scale: an editor fixes a typo, reloads, and sees the fix only some of the time.
Listing pod IPs by hand doesn't work either, because pods get new IPs on every rollout and autoscale.
The solution
A Kubernetes headless Service (clusterIP: None) returns one DNS A record per Ready pod. Fanout Purge looks up that name every time it purges and sends a BAN to each address. When Varnish scales up or down, the next purge reaches the new set of pods with no Drupal configuration change.
Features
- Supports the tag, url, wildcardurl and everything invalidation types, so content edits purge automatically through Purge's core tags queuer.
- Dynamic discovery through any DNS name with multiple A records, with a static
settings.phplist as a fallback. It also works for VMs and bare metal. - Strict failure semantics. If any Varnish rejects a BAN or can't be reached, the invalidation is marked failed and Purge retries it, so a single stale pod never counts as success.
- Safe by design. DNS is queried only when purging, never during page delivery. BAN requests run in parallel with configurable timeouts.
- Ready-to-use Varnish config. The VCL has separate site and purge listeners, an ACL, tag, URL and wildcard bans that the ban lurker can process in the background, and clear error responses for invalid bans.
- Kubernetes manifests and a Helm chart for the Varnish tier: Deployment, site Service, headless purge Service, NetworkPolicy and an AWS ALB Ingress.
- Admin form for purging URLs, wildcards, tags or everything on demand.
- Drush commands (
fanout:status,fanout:tag,fanout:url,fanout:wildcard,fanout:everything) that exit non-zero on any failure, so you can use them as CI/CD deploy gates. - A status report entry showing how targets are discovered.
Requirements
- Drupal 10.3+ or 11
- Purge 3.x
- Varnish 6.6 or newer (tested with 7.5)
- MySQL or MariaDB for Purge's queue (see the README)
Getting started
composer require drupal/fanout_purge drush en fanout_purge purge_queuer_coretags purge_processor_cron drush p:purger-add fanout_purger drush cset fanout_purge.settings headless_service_host varnish-purge.default.svc.cluster.local drush fanout:status
Then deploy the included VCL to your Varnish pods, and expose them through a headless Service. Both are provided in k8s/ and helm/. See the README for full instructions.
How it compares
- Varnish Purger sends each invalidation to configured hostnames. Behind a load-balanced Service, that reaches one pod. Fanout Purge works out the full set of pods on every purge.
- Purging through a CDN or a central broker (for example Redis pub/sub with sidecars) is a good fit for multi-cluster setups. For a single cluster, Fanout Purge needs no extra infrastructure beyond a headless Service.
Similar projects and integrations
Fanout Purge is a purger plugin for the Purge framework. Use it with Purge's queuers and processors, and with modules that add invalidations to the queue.
Ask your assistant about Fanout Purge
Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works
Depends on
Dependencies of the latest stable release
No dependencies recorded for this project.
Required by
Tracked projects that depend on this one
No tracked projects depend on this one yet.
Activity
Releases
| Version | Type | Core | PHP | Release date | |
|---|---|---|---|---|---|
| 1.0.x-dev | Dev | 10–11 | Nov 29, 2026 |