Search
Varnish Enterprise

Introduction Installation Upgrading Troubleshooting Changelog Changelog for 6.0.x Changes (Varnish Cache 4.1) Changes (Varnish Cache Plus 4.1) Known Issues Features Backend SSL/TLS Client SSL/TLS termination Cluster In-Process TLS MSE 4 Basic Configuration / Getting Started Configuration Persisted caching Categories Configuration Reference MSE 3.0 Settings mkfs.mse Memory Governor MSE 2.0 NUMA Parallel ESI Backend health counter HTTP/2 Support JSON Logging TCP Only Probes Timeouts Transit Buffer Varnish scoreboard VMODs Accept Accounting ACL (aclplus) ActiveDNS Akamai Connector AWS VCL Body Access & Transformation (xbody) Brotli Cookie Plus (cookieplus) DeviceAtlas DeviceAtlas3 Digest Dynamic backends (goto) Edgestash File Format Geolocation (geoip/mmdb) Header Manipulation (headerplus) HTTP communication (http) Image JSON parsing (json) JWT Key value storage (kvstore) Least connections director (leastconn) Module to control the built-in HTTP2 transport (h2) MSE control (mse) MSE4 control (mse4) Probe Proxy ProxyV2 TLV Attribute Extraction (proxy) Pseudo Random Number Generator Purge (purge/softpurge) Real-time Status (rtstatus) Reverse DNS (resolver) Rewrite S3 VMOD Session Slicer SQLite3 Stale Standard (std) Stat (Prometheus) Strings (str) Synthetic backends (synthbackend) Tag-based invalidation (Ykey/Xkey) TCP configuration (tcp) TLS Total Encryption (crypto) Unified director object (udo) Uniform Resource Identifier (uri) Unix Socket Utilities (unix) URL Plus (urlplus) Utils Vsthrottle

Configuration

Varnish 6.0

Configuring MSE4

This manual page describes the configuration format and configuration options used in the MSE4 configuration files.

The page Configuration Reference contains a reference cataloging all of the valid configuration keys while this page covers the main configuration options which are sufficient for most use cases.

Config file format

MSE4 uses a structured configuration file, where keys are associated with values. Key and value pairs are separated by either : (colon) or = (equal sign).

The values can be scalars (boolean, integer, float or string values). String values should use double-quotes, while boolean, integer or float values should be given without any quotes.

Values can also be lists and groups. Lists are denoted by parenthesis, and contain a number of values separated by commas. Groups are denoted by curly brackets, inside of which further key and value pairs are given.

MSE4 uses the libconfig library for parsing its configuration files. Further information about the format can be found in the library’s documentation.

At the top level MSE4 expects to find a single key called env that holds a group. All other configuration directives are given inside of this top level group. An empty configuration file looks like this:

   env: {
	# All configuration directives are given inside this group
   };

Environment configuration

The top most group named env houses the configuration settings that affect the MSE4 instance globally.

Example environment configuration:

   env: {
	# Set a default subdivision of 2 for all categories
	default_subdivisions = 2;
   };

Book and store configuration

To enable persisted caches, one or more books, each having one or more stores, need to be configured. Books are custom databases that contain the meta information about the objects in the cache. One book can manage the meta information for many stores. The stores are single large files that contain all of the cache payload data.

The environment key books takes a list of groups, where each group defines a book. Each book group contains the configuration keys that apply specifically to that book.

The book group further takes a key stores, which should be set to a list of groups, each group defining a store to be managed by that book.

Books and stores both takes a required key id which gives the book or store a symbolic ID. This ID will be used when reporting on the book or store in logs and messages. Note that this ID needs to be globally unique to the configuration, no book or store can have the same ID as any other book or store.

Example configuration using two books, the books having one store each, spread over two disks:

   env: {
	books = ( {
		id = "book1";
		filename = "/var/lib/mse/disk1/book1";
		size = "2g";

		stores = ( {
			id = "b1s1";
			filename = "/var/lib/mse/disk1/store1";
			size = "100g";
		} );
	}, {
		id = "book2";
		filename = "/var/lib/mse/disk2/book2";
		size = "2g";

		stores = ( {
			id = "store2";
			filename = "/var/lib/mse/disk2/store2";
			size = "100g";
		} );
	} );
   };

See Persisted Caching for more information and guidelines for configuring books and stores.

See also

There is more information on Persisted Caching and a systematic listing of all documented options on Configuration Reference


®Varnish Software, Wallingatan 12, 111 60 Stockholm, Organization nr. 556805-6203