October 24, 2023
20 min read time

Compare Varnish Enterprise and Varnish Cache

Compare Varnish Enterprise and Varnish Cache

This article is intended as a reference guide for users looking for a side-by-side comparison of the features found in the open-source Varnish Cache and the commercial offering Varnish Enterprise.

There are two types of features here: capabilities found in the core Varnish caching engine, and Varnish modules (VMODs), which are extensible and flexible add-ons that allow a modular approach to caching optimization and customization. VMODs expose their API in Varnish Configuration Language (VCL), so VMODs essentially extend the capabilities of VCL. For a more detailed look at what each feature or VMOD does, you can take a look at:

Varnish Cache Features

Varnish Cache is fast and stable, offering a rich feature set.

 

  • Request coalescing
  • Cache-Control support
  • Expires support 
  • Conditional requests
  • Grace mode 
  • Content streaming
  • Cache invalidation 
  • LRU cache evictions
  • HTTP/2 support 
  • Backend health checking 
  • Backend connection limiting
  • Backend timeout control 
  • Advanced backend selection
  • Advanced request saving
  • Configurable listening addresses
  • JSON logging
  • PROXY protocol support 
  • TLS termination with Hitch
  • Unix domain socket support (UDS)
  • Stevedores
  • Command line interface
  • Edge Side Includes (ESI)
  • Zero-impact config reload
  • Label-based multi-VCL configurations 
  • Access control lists (ACLs)
  • URL transformation
  • Header transformation
  • Synthetic HTTP responses
  • VCL unit testing framework 
  • Advanced logging 
  • Advanced statistics
  • Paced backend streaming

Varnish Enterprise Features

Varnish Enterprise includes these cache features and adds:

Feature

Description

Varnish Cache

Varnish Enterprise

Massive Storage Engine (MSE) 

An optimized dual-layer storage solution for persistent caching, and a cost-effective way to increase cache size using disk

Varnish High Availability (VHA)

A multi-master object replication suite that reduces backend traffic by replicating object in the cluster

Varnish Controller

A GUI and API to administer all the Varnish servers in your setup

Varnish Traffic Router

Request routing via HTTP or DNS based on customizable rulesets

Varnish Custom Statistics (VCS)

A statistics engine to aggregate, display and analyze user web traffic and cache performance in real time

Varnish Broadcaster

Broadcasts client requests to multiple Varnish nodes from a single entry point

In-process TLS

TLS termination in the Varnish core

Backend TLS/SSL

Connect to backend servers over TLS/SSL, ensuring end-to-end encryption

Varnish Discovery

Autoscale Varnish in cloud or container services

Memory Governor

Dynamic cache sizing and control over Varnish worker process footprint

Parallel ESI

Process Edge Side Includes (ESI) in parallel, rather than sequentially as in Varnish Cache

TCP-only Probes

Perform health checks on backends without sending an HTTP request

Last Byte Timeout

Modify timeouts from VCL, including overriding on a per-request basis and defining how long Varnish waits for full backend responses to complete

Per-Backend Health Counter

Insight into backend health without needing to directly deal with probes

Scoreboard

Detailed information about Varnish instances, for debugging and performance troubleshooting

 

These Varnish Enterprise features achieve multiple objectives:

  • Cater to more complex workloads and a wider variety of use cases e.g. edge storage for video on demand, traffic routing across private CDNs.
  • Improve day-to-day Varnish performance e.g. better origin offload, more efficient memory management, compression.
  • Make processes much faster e.g. auto-scaling and provisioning in Controller.

 

Varnish Modules (VMODs)

Varnish is made up of a core caching engine, edge language (VCL), and a library of pluggable modules for extending default Varnish behavior. Varnish Cache contains some VMODs as standard, while many others are available from the open-source community. Varnish Enterprise comes with 45+ VMODs for a wider range of capabilities and easier management of Varnish. Of course, it’s also possible to build your own!

 

Varnish Module (VMOD)

Varnish Cache

Varnish Enterprise

Utilities for VCL Data (vmod_blob)

Utilities for encoding and decoding the VCL data type BLOB

Cookie Handling (vmod_cookie)

Inspect, modify, and delete client-side cookies

Load Balancing and Sharding (vmod_directors)

Group multiple backends and load balance requests between them

PROXY Protocol Information Retrieval (vmod_proxy)

Extract TLV attributes from connections made with PROXY protocol

Soft Purge (vmod_purge)

Perform soft purges

Basic Functions (vmod_std)

Custom log messages, Query string sorting, Request body caching, Filesystem access

UNIX Domain Socket Information Retrieval (vmod_unix)

Provides information about the credentials of the peer process

Test Cases (vmod_vtc)

A utility module for varnishtest

Content Localization (vmod_accept)

Content negotiation and sanitization module that inspects the content of HTTP request headers


(Requires separate installation)

Cryptographic Functions (vmod_digest)
Computing HMAC, message digests and working with Base64.

Header Manipulation (vmod_header)

Modify and change complex HTTP headers

Per-object Backend Blacklisting (vmod_saintmode)
Handle backends that are failing in random ways for specific requests

String Manipulation (vmod_str)

A string manipulation module

Transfer Rate Limiting (vmod_tcp)
Control TCP congestion control algorithms and log information

Variable Support (vmod_var)

Support strings, integers and real numbers in VCL

Rate Limiting (vmod_vsthrottle)
Rate limit clients using identifying information

Basic Key-based Purging (vmod_xkey)

Perform tag-based invalidation

Detailed Cache Metrics (vmod_accounting)
VCL controlled detailed statistics based on keys, where you can create statistics on different tenants, content types, and more

Dynamic Access Control Lists (vmod_aclplus)

ACL module that doesn't need access control information to be explicitly defined in VCL, but can store ACLs as a string

Dynamic Load Balancing (vmod_activedns)

DNS updates at runtime

Akamai Connector

A module that synchronizes Akamai CDNs with Varnish

AWS VCL (vmod_aws)

Access AWS services, including request signing, S3, Secrets Manager

Brotli Compression (vmod_brotli)

Brotli is the go-to compression algorithm for web content, providing better compression rates than legacy gzip compression

Advanced Cookie Handling (vmod_cookieplus)

Improved cookie modification, allowing interaction with Cookie header on request side and Set-Cookie header on response side

Cache Encryption (vmod_crypto)

Encrypt data at rest in the cache, headers and body using AES encryption.

Device Intelligence (vmod_deviceatlas)

Device detection using the Device Atlas database (subscription required) to match User-Agent with client-device information

Edge-side Page Assembly (vmod_edgestash)

A Mustache-based templating engine on the edge that parses JSON data into Mustache placeholders

File Operations (vmod_file)

A module that allows Varnish to interact with the file system, but also act as a fileserver

String Building (vmod_format)

A module for easy string formatting, based on the ANSI C printf format

Advanced Header Manipulation (vmod_headerplus)

Add, remove, update or retrieve any HTTP header

Synchronous and asynchronous HTTP fetch (vmod_http)

Implement content prefetching or other business logic where an HTTP request to an external server is necessary

Image Compression (vmod_image)

Convert and resize images to WEBP on the fly

JSON Parsing (vmod_json)

A JSON parsing and introspection module

JWT Verification (vmod_jwt)

Inspect, verify, modify and issue JSON Web Tokens (JWT) on the edge

Key Value Store (vmod_kvstore)

A high-performance in-memory key-value store with optional TTLs

Least Connections Director (vmod_leastconn)
Directs traffic to the backend with the least number of active connections

Geo-Location (vmod_mmdb)

Geolocation using the MaxMind GeoIP database to localize users based on their IP address 

Health Probes Proxying (vmod_probe_proxy)
Intercept, manipulate and redirect health probe requests.

Bot Verification (vmod_resolver)

Perform Forward Confirmed reverse DNS (FCrDNS) on a client IP

Rewrite (vmod_rewrite)

Reduces the amount of VCL needed to perform URL and header manipulation

Per-session Modification (vmod_session)

Control the idle timeout of the TCP session

S3 Dynamic Backends (vmod_s3)

Use Varnish as a caching proxy in front of S3, including a dynamic backend director for S3 bucket endpoints

Cache Range Requests (vmod_slicer)

Cache and stitch together ranges of a response, for large file delivery and video streaming

Execute SQL Statements (vmod_sqlite3)

Interact with an SQLite3 database in VCL

Stale-If-Error (vmod_stale)

A convenient and elegant way to implement Stale-If-Error logic in Varnish

Prometheus Integration (vmod_stat)
Export Varnish statistics from a backend in JSON or Prometheus format

Synthetic Backends (vmod_synthbackend)

Insert synthetic objects into the cache as if they were generated by regular backends

TLS Querying (vmod_tls)
Retrieve TLS information from native TLS connections

Load Balancing (vmod_udo)
Flexible load-balancing, supporting local and ad-hoc reconfiguration, smart retry mechanisms and activeDNS

URI Parsing (vmod_uri)

Parse and manipulate URIs from VCL

URL Parsing (vmod_urlplus)

URL inspection and manipulation

Utility Functions (vmod_utils)

A collection of utility functions collected

Web Application Firewall (vmod_waf)

An add-on module that makes Varnish behave like a Web Application Firewall by leveraging the ModSecurity library 

Body Access and Transformation (vmod_xbody)

Access and modify request and response bodies

Improved Key-based Purging (vmod_ykey)

Tag-based invalidation with more features and better performance on MSE

 

While Varnish users can write their own VMODs to achieve great things, the fact that this wide range of VMODs comes pre-packaged in Varnish Enterprise makes usage faster, simpler and more secure - they are optimized, debugged and crash tested by Varnish experts!

Time for a deep dive on Varnish?

If you’re looking for an in-depth discussion of all of these features, and practical tips on using them in your caching operations, get Varnish 6 By Example now!

It’s a practical book full of tips and best practices for getting the most out of your Varnish setup and reaching new heights in your caching operations, whether you’re new to Varnish or an experienced pro.

Take the next step

If you’re looking to further optimize your web delivery infrastructure, our team of Varnish core engineers and experts are on hand to discuss your use case and help with HTTP delivery pain points. Get in touch here.

New call-to-action