Skip to main content
Version: 4.1

Varnish

Varnish is a reverse caching proxy that acts as an HTTP accelerator, optimizing content-heavy dynamic websites and APIs.

Use HiTechCloud > Caching > Varnish to manage the Varnish service, enable or disable it per domain, and view service logs.


Status​

Enable or disable the Varnish service globally.

  • The current service status is displayed.
  • Use the toggle to enable or disable Varnish as needed.

Varnish Cache​

While the service is running, real-time cache performance and efficiency metrics are displayed, including Hit Ratio, Hits, Misses, Pass, Requests, Backend Requests, Backend Failures and an overall Efficiency Score.


Domains​

Control Varnish caching on a per-domain basis.

  • Each domain has a toggle showing its current status.
  • Click the toggle to enable or disable Varnish caching for that specific domain.

Edge Side Includes (ESI)​

A website whose pages are built from fragments can have Varnish assemble them: every <esi:include src="/fragment"> in the page is replaced with whatever that URL answers, so the shell of the page and each fragment are cached — and expire — on their own.

This is off for every website and is turned on by the server administrator, one hostname at a time:

hitechcloudcli varnish esi example.com on # on for this site only
hitechcloudcli varnish esi example.com off # back to off
hitechcloudcli varnish esi example.com # what is it now?

It is not a self-serve switch, because it changes what visitors are sent rather than how fast they are sent it: with ESI on, Varnish parses the page and removes every <esi:include>, <esi:remove> and <!--esi --> it finds. A page that was not written for ESI can contain that markup for its own reasons — a tutorial, a quoted code block, a feed — and there the parse would delete what the author wrote. Ask your provider to turn it on for a site whose markup is ESI.

What it leaves alone:

  • Only text/html answers are parsed; stylesheets, scripts, JSON and downloads are passed on untouched.
  • Every other website on the same cache is unaffected, including the other sites of the same account.
  • A page that sets a cookie, or that the cache is not allowed to store, is still assembled — a logged-in visitor never sees the raw markup — and is still not stored.

Turning it on or off restarts the account's cache, so it starts empty. Fill it again with hitechcloudcli varnish warm example.com.


Container​

While the service is running, real-time resource usage (CPU, memory, network and block I/O) is displayed. Click Edit limits to adjust the container's resource limits from the Docker/Containers page.


Logs​

Monitor Varnish activity and troubleshoot issues by viewing service logs.

  • Click View service log to open and follow the log output in real time.