We get asked a lot of questions about Varnish and this blog sets out to explain what it is, why we use it and the benefits for recruitment websites.
At Volcanic, we use Varnish to cache our servers to make sure all our websites continue to appear online. This means that if we conduct planned maintenance on our platform, for example, visitors to your site will experience no difference in the look or functionality of your website.
What is Varnish?
Varnish Cache is a web application accelerator also known as a caching HTTP reverse proxy. It is installed in front of a server that uses HTTP and is configured to cache the contents.
How does it work?
If a visitor visits a webpage, Varnish will receive the request and will gather all the information for that page from the server. It then makes a copy of that page and stores it in cache for up to two hours. If that same webpage should be requested again within the two hour timeframe, Varnish will deliver the same version again - the ‘copied’ cached response. This is instead of revisiting the server and recreating a new page every time it is requested.
Why do you use it?
Using Varnish speeds up delivery, so information flow becomes faster and more efficient. It also gives you a safety-net because changes don’t appear on a website for up to two hours. Most importantly, if a site should go down momentarily, the pages are still available in Varnish for up to two hours.
Can candidates still apply for jobs if the website should crash and is kept online by Varnish?
Yes. All visitors to the site and candidates who are logged in to their dashboard can use the site and search and apply for jobs as normal. This is a key benefit of Varnish.
Who uses Varnish?
Varnish is popular among high-profile, high-traffic websites, such as news sites and social media sites. All Volcanic websites use Varnish.
Do visitors to the site know that Varnish is there?
No, Varnish can’t be seen. In fact, it was originally named Varnish as it provides a gloss-over - you can think of it as a clear screen. This means that visitors to the site are ‘in front’ of the varnish and can’t see anything that goes on ‘behind’ in the back end or the CMS.
Why don’t changes I make to my website show instantly?
If you login to your site’s admin area, you’ll be ‘behind’ the varnish. This means that you can make changes to your site and save them. Any logged in user will see the changes, which will then appear on the site to visitors in anything up to two hours. This gives you a ‘cooling off period,’ in case you change your mind and want to change things again.
I can see the changes but my colleague can’t?
Any logged-in user will see all changes immediately. Logging out means you are viewing the site as a visitor and won’t see the changes for a couple of hours. So if your colleague isn’t logged in as a user, they will view the site as a visitor.
For example, you may change a blog image. Any logged-in user, will see this new image straightaway, but it will take up to a couple of hours to show on your website to visitors.
Does Varnish help with SEO?
Yes - web performance is an essential part of the user experience. If you want to make sure users stay on your site and keep the Google search crawlers happy, make sure your pages load fast - because that’s taken into account by Google when calculating page rank.
Can search bots still crawl despite Varnish?
Yes. The Google bots, as well as other search engines’ bots, crawl the cached version of a webpage.