logo level
SME
Agency
Large enterprise
contactOperationalControl Panel
newsthe-level27-varnish-template-fast-websites-with-fewer-resources

The Level27 Varnish template: fast websites with fewer resources!

Everyone relaxed online, that's what Level27 strives for every day. An important part of this is the speed of websites. We are therefore delighted to unveil our latest asset: a user-friendly Varnish template. Never before has it been so easy to give your site a speed boost. No hassle and no technical expertise required, just a fast website. So that you and your visitors can relax online.

Agency‎‎ㅤ16/08/2023
The Level27 Varnish template: fast websites with fewer resources! image

What is Varnish?

Varnish provides page caching on your website. This means that when a user visits a website, the result is stored in memory. The next user who visits the same page will immediately see the (pre-loaded) page. Your website will therefore respond faster because no computing power is required from the server, and this also ensures that fewer resources are used.

Page caching (and caching in general) also has a dark side, because when exactly do you stop caching? A concrete example: you modify the content of a page and want the users of your website to see the result immediately. Then you have to make sure that the cache is emptied, otherwise visitors will continue to see the page without modifications. Is your website a webshop? Then extra attention is needed because the content of the page may differ between different users, such as the shopping cart. Fortunately, there are plugins that can help you with these kinds of problems.

A while back, we wrote a blog about all the technical details of (Varnish) caching. In it, you can read that caching isn't as simple as “making your website faster with the push of a button.” But we've changed that now ;). To make caching user-friendly, we've developed a Varnish template so that anyone can make their website faster.

The Varnish template in our control panel

The Varnish component is what we at Level27 call a linked component. By this we mean that you will need to link/connect the component to another component, such as your PHP website.

image413

When creating the component, you will not have to choose which system the component should be on, but rather which component it should be linked to.

There are a number of options available. But we go one step further: you can leave the Varnish configuration entirely to us! We provide a template that works on most websites, which also supports plugins such as Drupal Varnish Cache. This makes it easy for you to increase the speed of your website. We do not cache static content by default because this can already be handled quite efficiently by the web server. If your CMS requires computing power or CPU to deliver your static content to the user, as is the case with Wordpress, for example, it may be useful to enable this static cache. The template is not mandatory, of course. If you wish, you can also manage the configuration yourself.

A bit more technical

Whether you are already familiar with the Level27 control panel or not, using the Varnish template is a piece of cake. First, you create the linked component. Next, you go to the main component to which you have linked the Varnish component and adjust the URLs on the main component. For each URL, you can specify whether it should go through the Varnish component or not.

Once everything is set up, you can check whether the cache is working by checking the response headers of your requests. These contain two new headers with content:

  • x-cache: HIT 38472-19
  • x-cache-hits: 6

The first header indicates whether the request comes from the cache or not. HIT simply means: cached. The two numbers you see next are the ID of the app and the ID of the component (both can be found in the URL bar). If you navigate to the detail page of your component in the control panel, you will also see these IDs again in the URL bar.

The second header indicates how many times the result has already been retrieved from the cache. A higher number indicates that the cache is working well. Every so often, Varnish will send an update request to the backend, and then the number will start again from 0, which is normal.

Conclusion

Varnish is certainly not simple, and implementing it is not always easy. But there is no doubt about the results. When you delve into the world of Varnish caching, it will pay off. Your website will be faster and the resources your website uses will also be smaller. All that advice is great, but as a hosting partner, we go one step further. Based on our experience and the possibilities offered by the Level27 control panel, we have made the application of Varnish caching as easy as possible using our Varnish template. So, is your website slow, or would you like to receive more visitors with the same resources? Don't hesitate to make the switch to Varnish. And would you like to learn more about the technical application of Varnish caching? Our engineers are ready and waiting to assist you.

Stay informed

Subscribe to our newsletter and receive the latest updates on our products and services.

By subscribing, you agree to our privacy policy