Varnish : Varnish is a reverse caching proxy.
This technology is used by 21.16% of websites in the Caching category. The most popular industry vertical is Business and Finance, with Computing being the top subcategory.
What is Varnish?
Varnish Cache is a high-performance HTTP accelerator designed for content-heavy, high-traffic websites. Created by Poul-Henning Kamp in 2006, Varnish sits in front of web servers, caching responses and serving them directly from memory at speeds approaching RAM bandwidth.
Varnish can handle hundreds of thousands of requests per second on modest hardware. It's used by major websites including Wikipedia, The New York Times, Twitter, and Vimeo. The cache can reduce origin server load by 90% or more for cacheable content.
Unlike other caching solutions, Varnish uses its own configuration language (VCL) that compiles to C, enabling complex caching logic with minimal overhead. Varnish is purely a cache—it doesn't handle SSL/TLS, relying on front-end proxies like nginx or Hitch.
Industry Vertical Distribution
Technologies Frequently Used with Varnish
| Technology | Co-usage Rate | Website |
|---|---|---|
| jQuery | 65.28% | https://jquery.com |
| Google Analytics | 59.58% | http://google.com/analytics |
| PHP | 44.3% | http://php.net |
| Google Tag Manager | 42.34% | http://www.google.com/tagmanager |
| Nginx | 41.16% | http://nginx.org/en |
| Google Font API | 40.44% | http://google.com/fonts |
| MySQL | 27.73% | http://mysql.com |
| WordPress | 27.17% | https://wordpress.org |
| Bootstrap | 26.17% | https://getbootstrap.com |
| Fastly | 25.37% | https://www.fastly.com |
Varnish Architecture
Memory-Based: Stores cached content in RAM. Optional disk storage for overflow. Memory-mapped files. Blazing fast retrieval.
VCL Language: Varnish Configuration Language. Compiles to native C code. Custom cache logic. Request/response manipulation.
Grace Mode: Serve stale content during backend fetch. Seamless user experience. Backend failure tolerance. Configurable staleness.
Health Checks: Backend health monitoring. Automatic failover. Director load balancing. Probe configuration.
ESI Support: Edge Side Includes for partial caching. Cache page fragments. Different TTLs per section. Personalization with caching.
Purging: Invalidate specific URLs. Ban patterns with regex. Soft purge for grace. PURGE HTTP method.
AI-Powered Technology Recommendations
Our AI recommender engine, trained on 100 million data points, suggests these technologies for websites using Varnish:
| Technology | AI Score | Website |
|---|---|---|
| Fastly | 0.3 | https://www.fastly.com |
| MariaDB | 0.25 | https://mariadb.org |
| Pantheon | 0.24 | https://pantheon.io/ |
| Big Cartel | 0.2 | https://www.bigcartel.com |
| AngularJS | 0.16 | https://angularjs.org |
| Section.io | 0.13 | https://www.section.io |
| TypePad | 0.13 | http://www.typepad.com |
| GitHub Pages | 0.12 | https://pages.github.com/ |
| Zipkin | 0.11 | https://zipkin.io/ |
| Percona | 0.11 | https://www.percona.com |
IAB Tier 1 Vertical Distribution
Relative Usage by Industry
Market Distribution Comparison
Varnish Use Cases
News & Media: High-traffic news sites. Breaking news traffic spikes. Article page caching. Homepage edge caching.
E-commerce: Product catalog caching. Category page performance. API response caching. Flash sale handling.
API Acceleration: REST API response caching. GraphQL query caching. Rate limiting. Response normalization.
Streaming: Video manifest caching. CDN origin shielding. Segment caching. Playlist acceleration.
WordPress: Full-page caching. Plugin compatibility. Logged-in user handling. Comment bypass.
High Availability: Backend failure protection. Grace mode serving. Load distribution. Traffic shaping.
IAB Tier 2 Subcategory Distribution
Top Websites Using Varnish
| Website | IAB Category | Subcategory | OpenRank |
|---|---|---|---|
| creativecommons.org | Business and Finance | Educational Content | 8.06 |
| slideshare.net | Business and Finance | Business | 7.44 |
| bbc.com | News and Politics | International News | 7.39 |
| etsy.com | Shopping | Personal Celebrations & Life Events | 7.33 |
| eventbrite.com | Events and Attractions | Concerts & Music Events | 7.13 |
| theverge.com | Business and Finance | Industries | 7.09 |
| anchor.fm | Music and Audio | Talk Radio | 6.86 |
| unsplash.com | Hobbies & Interests | Images/Galleries | 6.79 |
| vice.com | Video Gaming | Astrology | 6.63 |
| investopedia.com | Personal Finance | Financial Planning | 6.58 |
Varnish Configuration
VCL Configuration Example
vcl 4.1;
backend default {
.host = "127.0.0.1";
.port = "8080";
.probe = {
.url = "/health";
.interval = 5s;
.timeout = 2s;
}
}
sub vcl_recv {
# Strip cookies for static files
if (req.url ~ "\.(css|js|jpg|png|gif|ico|woff2)$") {
unset req.http.Cookie;
return (hash);
}
# Bypass cache for logged-in users
if (req.http.Cookie ~ "session_id") {
return (pass);
}
# Normalize Accept-Encoding
if (req.http.Accept-Encoding) {
if (req.http.Accept-Encoding ~ "gzip") {
set req.http.Accept-Encoding = "gzip";
} else {
unset req.http.Accept-Encoding;
}
}
}
sub vcl_backend_response {
# Cache static files for 1 day
if (bereq.url ~ "\.(css|js|jpg|png)$") {
set beresp.ttl = 1d;
unset beresp.http.Set-Cookie;
}
# Enable grace mode
set beresp.grace = 1h;
}
sub vcl_deliver {
# Add cache hit/miss header
if (obj.hits > 0) {
set resp.http.X-Cache = "HIT";
} else {
set resp.http.X-Cache = "MISS";
}
}
Usage by Domain Popularity (Top 1M)
Usage by Domain Age
The average age of websites using Varnish is 12.3 years. The average OpenRank (measure of backlink strength) is 2.67.
Varnish Benefits
Extreme Speed: Serves from RAM at memory speed. Microsecond response times. Handles 100K+ requests/second. Near-zero latency.
Origin Offload: 90%+ cache hit rates achievable. Reduce backend servers. Lower infrastructure costs. Handle traffic spikes.
Flexible Logic: VCL enables custom caching rules. Request manipulation. A/B testing at edge. Complex routing.
Grace Mode: Serve stale during backend issues. User never sees errors. Backend recovery time. Resilient architecture.
ESI Composition: Cache page fragments separately. Personalization with caching. Different TTLs per component. Efficient updates.
Open Source: Free core version. Active community. Enterprise version available. No vendor lock-in.
Proven Scale: Wikipedia, Twitter, NYT use Varnish. Massive traffic handling. Battle-tested reliability.
Emerging Websites Using Varnish
| Website | IAB Category | Subcategory | OpenRank |
|---|---|---|---|
| vasanthdeveloper.com | Technology & Computing | Computing | 0 |
| grigo.com.ar | Education | Children's TV | 0 |
| cdelectricalservices.com | Home & Garden | Auto Repair | 0 |
| fortiesgamer.com | Events and Attractions | Interactive Content | 0 |
| runningthroughdarkness.com | Movies | Horror Movies | 0 |
Technologies Less Frequently Used with Varnish
| Technology | Co-usage Rate | Website |
|---|---|---|
| AB Tasty | 0% | https://www.abtasty.com |
| Accesso | 0% | https://accesso.com/ |
| AccuWeather | 0% | https://partners.accuweather.com |
| Acoustic Experience Analytics | 0% | https://acoustic.com/tealeaf |
| Acquia Cloud Platform CDN | 0% | https://docs.acquia.com/cloud-platform/platformcdn/ |
