Varnish Cache
Varnish Cache is an open-source HTTP accelerator (reverse-proxy cache) designed to dramatically speed up content-heavy websites by storing responses in memory.
Definition
Varnish Cache is an open-source HTTP accelerator (reverse-proxy cache) designed to dramatically speed up content-heavy websites by storing responses in memory.
Overview
Varnish, created by Poul-Henning Kamp, sits in front of web application servers as a reverse proxy and caches HTTP responses in RAM, so repeated requests for the same content can be served without hitting the backend application or database at all. Because cache lookups happen in memory rather than on disk, Varnish can serve extremely high volumes of traffic with very low latency for cacheable content. Caching behavior is controlled through VCL (Varnish Configuration Language), a domain-specific language that lets operators write custom logic for what to cache, for how long, how to vary cache entries by request headers or cookies, and how to handle cache misses or purges. This gives fine-grained control that goes beyond simple time-to-live caching, including support for edge-side includes and cache invalidation on content updates. Varnish is commonly deployed in front of content management systems, e-commerce platforms, and high-traffic news or media sites where a large share of requests are for content that changes infrequently, complementing (rather than replacing) load balancers like HAProxy or Nginx that may sit alongside it in the request path.
Key Features
- In-memory HTTP response caching for very low-latency delivery of cacheable content
- VCL (Varnish Configuration Language) for custom, fine-grained caching logic
- Cache invalidation and purging support for content that changes
- Support for edge-side includes to cache partial page fragments
- High throughput designed for content-heavy, high-traffic websites
- Works alongside, rather than replacing, backend load balancers and web servers