{"id":7563,"date":"2024-10-09T12:49:57","date_gmt":"2024-10-09T10:49:57","guid":{"rendered":"https:\/\/www.combell.com\/en\/blog\/?p=7563"},"modified":"2024-11-19T14:20:50","modified_gmt":"2024-11-19T13:20:50","slug":"what-is-varnish","status":"publish","type":"post","link":"https:\/\/www.combell.com\/en\/blog\/what-is-varnish\/","title":{"rendered":"What is Varnish? Your key questions answered"},"content":{"rendered":"<p><strong>If you want a high volume of visitors on your website, you'll need both an ultra-fast site and server. There are various tools to make your website as fast as possible, such as caching. And when it comes to caching, Varnish is the top technology. We\u2019re here to answer your essential questions about this powerful yet complex tool.<\/strong><\/p>\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n<div class=\"wp-block-uagb-table-of-contents uagb-toc__align-left uagb-toc__columns-1  uagb-block-0e06ec1c     \"\n\t\t\t\t\tdata-scroll= \"1\"\n\t\t\t\t\tdata-offset= \"30\"\n\t\t\t\t\tstyle=\"\"\n\t\t\t\t><\/p>\n<div class=\"uagb-toc__wrap\">\n<div class=\"uagb-toc__title\">\n\t\t\t\t\t\t\t<strong>Table of contents<\/strong>\t\t\t\t\t\t\t\t\t\t\t\t\t<svg xmlns=\"https:\/\/www.w3.org\/2000\/svg\" viewBox= \"0 0 384 512\"><path d=\"M192 384c-8.188 0-16.38-3.125-22.62-9.375l-160-160c-12.5-12.5-12.5-32.75 0-45.25s32.75-12.5 45.25 0L192 306.8l137.4-137.4c12.5-12.5 32.75-12.5 45.25 0s12.5 32.75 0 45.25l-160 160C208.4 380.9 200.2 384 192 384z\"><\/path><\/svg>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n<div class=\"uagb-toc__list-wrap\">\n<ol class=\"uagb-toc__list\">\n<li class=\"uagb-toc__list\"><a href=\"#what-is-caching\">What is caching?<\/a><\/li>\n<li class=\"uagb-toc__list\"><a href=\"#why-is-caching-essential-for-a-fast-website\">Why is caching essential for a fast website?<\/a><\/li>\n<li class=\"uagb-toc__list\"><a href=\"#what-is-varnish\">What is Varnish?<\/a><\/li>\n<li class=\"uagb-toc__list\"><a href=\"#how-does-varnish-work\">How does Varnish work?<\/a><\/li>\n<li class=\"uagb-toc__list\"><a href=\"#what-are-the-benefits-of-varnish\">What are the benefits of Varnish?<\/a><\/li>\n<li class=\"uagb-toc__list\"><a href=\"#do-you-need-varnish\">Do you need Varnish?<\/a><\/li>\n<li class=\"uagb-toc__list\"><a href=\"#what-is-vcl-varnish-configuration-language\">What is VCL (Varnish Configuration Language)?<\/a><\/li>\n<li class=\"uagb-toc__list\"><a href=\"#how-do-i-install-varnish-on-my-server\">How do I install Varnish on my server?<\/a><\/li>\n<li class=\"uagb-toc__list\"><a href=\"#how-to-optimize-specific-varnish-settings\">How to optimize specific Varnish settings<\/a><\/li>\n<li class=\"uagb-toc__list\"><a href=\"#combell-develops-a-varnish-solution-for-you\">Combell develops a Varnish solution for you<\/a><\/li>\n<\/ol><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div style=\"height:50px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n<h2 class=\"wp-block-heading\">What is caching?<\/h2>\n<p>Caching is a technique used to reduce the load on your resources while maintaining the stability and speed of your application. By storing data in a precomputed format for future use, caching eliminates the need to recompute the same request over and over.<\/p>\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n<div class=\"wp-block-uagb-inline-notice uagb-inline_notice__align-left uagb-block-b59c9631 uagb-inline_notice__outer-wrap\">\n<p class=\"uagb-notice-title\">Also read<\/p>\n<div class=\"uagb-notice-text\">\n<p><a href=\"https:\/\/www.combell.com\/en\/blog\/what-is-caching-and-how-does-it-work\/\" target=\"_blank\" rel=\"noreferrer noopener\">What's caching<\/a> and how does it work? <\/p>\n<\/div>\n<\/div>\n<div style=\"height:50px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n<h2 class=\"wp-block-heading\">Why is caching essential for a fast website?<\/h2>\n<p>No matter how well-coded your website is, spikes in traffic can lead to slowdowns. Without caching, your <a href=\"https:\/\/www.combell.com\/en\/blog\/what-is-a-web-server\/\" rel=\"noreferrer noopener\" target=\"_blank\">web server<\/a> must repeat the same calculations for each visitor. With caching, those calculations happen only once, which prevents your server from becoming <strong>overloaded<\/strong>.<\/p>\n<p>Google considers <a href=\"https:\/\/www.combell.com\/en\/blog\/make-your-website-faster\/\" rel=\"noreferrer noopener\" target=\"_blank\">website speed<\/a> when ranking sites in search results. Simply put, the faster your website, the higher it appears in search results, which brings in more visitors!<\/p>\n<p>Nobody enjoys shopping on a slow-loading website\u2014it\u2019s frustrating, and frustrated customers buy less. Providing a <strong>smooth shopping experience<\/strong>, especially for large websites with dynamic elements like e-commerce platforms, is crucial. Caching <a href=\"https:\/\/www.combell.com\/en\/blog\/website-load-time-nothing-but-ultrafast-is-good-enough\/\" rel=\"noreferrer noopener\" target=\"_blank\">enhances load times<\/a> by reducing the number of requests to the server.<\/p>\n<p>Curious about how to speed up your website? <a href=\"https:\/\/www.combell.com\/en\/technology\/caching\" target=\"_blank\" rel=\"noreferrer noopener\">Our experts are here to help!<\/a><\/p>\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"731\" src=\"https:\/\/www.combell.com\/en\/blog\/files\/varnish-speed@2x-1024x731.png\" alt=\"Varnish makes your website the fastest! \" class=\"wp-image-12879\" srcset=\"https:\/\/www.combell.com\/en\/blog\/files\/varnish-speed@2x-1024x731.png 1024w, https:\/\/www.combell.com\/en\/blog\/files\/varnish-speed@2x-300x214.png 300w, https:\/\/www.combell.com\/en\/blog\/files\/varnish-speed@2x-768x549.png 768w, https:\/\/www.combell.com\/en\/blog\/files\/varnish-speed@2x.png 1400w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">Varnish makes your website the fastest! <\/figcaption><\/figure>\n<\/div>\n<div style=\"height:50px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n<h2 class=\"wp-block-heading\">What is Varnish?<\/h2>\n<p>Varnish is a unique form of <a href=\"https:\/\/www.combell.com\/en\/technology\/caching\" rel=\"noreferrer noopener\" target=\"_blank\">caching<\/a> software initially developed as a custom solution to speed up the Norwegian online newspaper <em><a href=\"http:\/\/www.vg.no\" rel=\"noreferrer noopener\" target=\"_blank\">www.vg.no<\/a><\/em> and is now used by millions of websites worldwide. Acting as a reverse proxy, Varnish Cache can significantly reduce webpage load times, especially for dynamic, high-traffic websites.<\/p>\n<p>By storing entire web pages in its cache, Varnish intercepts HTTP traffic meant for the web application and delivers cached pages directly to visitors. This approach minimizes the load on the application itself, helping maintain stability and speed.<\/p>\n<p>While other caching technologies like <a href=\"https:\/\/www.combell.com\/en\/technology\/redis\" rel=\"noreferrer noopener\" target=\"_blank\">Redis<\/a>, OPcache, and APCu exist, Varnish is the most widely used and often the recommended choice, especially for web applications that leverage Edge Side Includes (ESI).<\/p>\n<p>The results are impressive: <strong>websites using Varnish Cache load 300 to 1000 times faster<\/strong> than those without caching technology.<\/p>\n<div style=\"height:50px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n<h2 class=\"wp-block-heading\">How does Varnish work?<\/h2>\n<p>So, what exactly does Varnish do? <strong>Unlike other caching technologies, Varnish caches entire web pages.<\/strong> By storing these pages separately in its cache, Varnish ensures they don\u2019t need to be fetched from the server each time they are reopened, allowing <a href=\"https:\/\/www.combell.com\/en\/blog\/webpage-vs-website\/\" rel=\"noreferrer noopener\" target=\"_blank\">web pages<\/a> to display much faster. Acting as a reverse proxy, Varnish handles and caches requests for the web server to optimize the performance of dynamic web projects.<\/p>\n<p>When a user requests a web page that hasn\u2019t been cached, Varnish connects to the web application and forwards the original request. The HTTP output of the requested page, once delivered by the application, is then stored in Varnish.<\/p>\n<p><a href=\"https:\/\/en.wikipedia.org\/wiki\/Edge_Side_Includes\" rel=\"noreferrer noopener\" target=\"_blank\">Edge Side Includes (ESI)<\/a> allows specific parts of a page to be cached while other sections remain dynamic. This is especially useful for delivering both static and personalized content, benefiting both anonymous and logged-in users.<\/p>\n<p>Cached data remains in Varnish until the <a href=\"https:\/\/en.wikipedia.org\/wiki\/Time_to_live\" target=\"_blank\" rel=\"noreferrer noopener\">Time To Live <\/a>(TTL) expires, which is defined by the \"Cache-Control\" header in the HTTP response from the application. This header tells Varnish how long to store a web page in the cache.<\/p>\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"380\" src=\"https:\/\/www.combell.com\/en\/blog\/files\/cache-explained-1024x380.png\" alt=\"This is how Varnish software works.\" class=\"wp-image-12880\" srcset=\"https:\/\/www.combell.com\/en\/blog\/files\/cache-explained-1024x380.png 1024w, https:\/\/www.combell.com\/en\/blog\/files\/cache-explained-300x111.png 300w, https:\/\/www.combell.com\/en\/blog\/files\/cache-explained-768x285.png 768w, https:\/\/www.combell.com\/en\/blog\/files\/cache-explained.png 1400w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">This is how Varnish software works.<\/figcaption><\/figure>\n<\/div>\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n<p><strong>Varnish only serves cached pages when it is certain the content is not private.<\/strong> For responses involving authentication or cookies, Varnish delivers the page only to the requesting user rather than caching it for others. The application itself can also instruct Varnish to exclude specific pages from caching. In addition, Varnish has internal rules to determine when to bypass the cache, ensuring up-to-date information when needed.<\/p>\n<p>Varnish can also function as a <strong>load balancer<\/strong>. When traffic grows too large for a single server, additional servers can be added to handle the load. Varnish distributes incoming requests among the servers and, if one server becomes unavailable due to maintenance or failure, Varnish removes it from its list and redirects users to the remaining servers.<\/p>\n<p>Varnish supports gradual upgrades, allowing you to implement code changes on each server incrementally without users noticing.<\/p>\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n<div class=\"wp-block-group alignwide\">\n<div class=\"wp-block-group__inner-container is-layout-constrained wp-block-group-is-layout-constrained\">\n<div class=\"wp-block-columns alignwide has-blue-faded-background-color has-background is-layout-flex wp-container-core-columns-is-layout-1 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:25%\">\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/on.combell.com\/en\/ebooks\/lightning-fast-sites-with-varnish\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"440\" height=\"622\" src=\"https:\/\/www.combell.com\/en\/blog\/files\/lightning-fast-sites-with-varnish-ebook@2x.png\" alt=\"lightning-fast-sites-with-varnish-ebook\" class=\"wp-image-10338\" srcset=\"https:\/\/www.combell.com\/en\/blog\/files\/lightning-fast-sites-with-varnish-ebook@2x.png 440w, https:\/\/www.combell.com\/en\/blog\/files\/lightning-fast-sites-with-varnish-ebook@2x-212x300.png 212w\" sizes=\"(max-width: 440px) 100vw, 440px\" \/><\/a><\/figure>\n<\/div>\n<div class=\"wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:85%\">\n<h4 class=\"wp-block-heading uagb-heading-text mt-1\">Download our free e-book: lightning-fast sites with Varnish<\/h4>\n<p>In today\u2019s digital world, fast websites are essential. Varnish caching helps you achieve this by storing and delivering dynamic content from RAM at lightning speed. Discover in our e-book how Varnish can drastically improve your site\u2019s load times for an optimal user experience.<\/p>\n<div class=\"wp-block-uagb-icon-list uagb-block-66566e25 uagb-icon-list__outer-wrap uagb-icon-list__layout-vertical\">\n<div class=\"uagb-icon-list__wrap\">\n<div class=\"wp-block-uagb-icon-list-child uagb-block-7b5a5fe3 uagb-icon-list-repeater uagb-icon-list__wrapper\"><a target=\"_blank\" aria-label=\"Download it here\" rel=\"noopener noreferrer\" href=\"https:\/\/on.combell.com\/en\/ebooks\/lightning-fast-sites-with-varnish\"> <\/a><span class=\"uagb-icon-list__source-wrap\"><svg xmlns=\"https:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\"><path d=\"M504.3 273.6l-112.1 104c-6.992 6.484-17.18 8.218-25.94 4.406c-8.758-3.812-14.42-12.45-14.42-21.1L351.9 288H32C14.33 288 .0002 273.7 .0002 255.1S14.33 224 32 224h319.9l0-72c0-9.547 5.66-18.19 14.42-22c8.754-3.809 18.95-2.075 25.94 4.41l112.1 104C514.6 247.9 514.6 264.1 504.3 273.6z\"><\/path><\/svg><\/span><span class=\"uagb-icon-list__label\">Download it here<\/span><\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div style=\"height:50px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n<h2 class=\"wp-block-heading\">What are the benefits of Varnish?<\/h2>\n<p>The benefits of Varnish are clear: Varnish offers the <strong>speed<\/strong>, <strong>stability<\/strong>, and <strong>performance<\/strong> essential for any web application. It\u2019s especially useful for dynamic web projects, as it helps manage complexity and traffic volumes\u2014both critical for maintaining high performance.<\/p>\n<p>Varnish can handle a large number of simultaneous connections while using minimal memory. Its CPU usage is also very low. Since Varnish is focused solely on <a href=\"https:\/\/www.combell.com\/en\/technology\/caching\" rel=\"noreferrer noopener\" target=\"_blank\">caching<\/a>, without many additional features, its architecture is highly efficient.<\/p>\n<p>Varnish stores entire pages to reduce the load on the server. Acting as a reverse proxy, it helps alleviate server strain and boosts website speed by caching and efficiently processing requests. By keeping cached items in RAM, Varnish delivers <strong>lightning-fast<\/strong> performance.<\/p>\n<p>A Varnish server delivers the following performance metrics:<\/p>\n<ul>\n<li>800,000 requests per second<\/li>\n<li>Throughput up to 200 Gbps<\/li>\n<li>Latency under one millisecond<\/li>\n<\/ul>\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"731\" src=\"https:\/\/www.combell.com\/en\/blog\/files\/sales-2@2x-1024x731.png\" alt=\"Interested in Varnish Cache? Rely on our Varnish experts for a custom solution. \" class=\"wp-image-12881\" srcset=\"https:\/\/www.combell.com\/en\/blog\/files\/sales-2@2x-1024x731.png 1024w, https:\/\/www.combell.com\/en\/blog\/files\/sales-2@2x-300x214.png 300w, https:\/\/www.combell.com\/en\/blog\/files\/sales-2@2x-768x549.png 768w, https:\/\/www.combell.com\/en\/blog\/files\/sales-2@2x.png 1400w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">Interested in Varnish Cache? Rely on our Varnish experts for a custom solution. <\/figcaption><\/figure>\n<\/div>\n<div style=\"height:50px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n<h2 class=\"wp-block-heading\">Do you need Varnish?<\/h2>\n<p>At Combell, we recommend Varnish for website owners with substantial static (non-changing) content. While caching is beneficial for any site, if you expect high traffic or are a growing mid-sized company, Varnish is a powerful tool you can rely on. It boosts efficiency by caching pages, leading to faster load times and reduced server load, which can benefit both performance and SEO\u2014even for sites with lower traffic levels.<\/p>\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n<div class=\"wp-block-uagb-inline-notice uagb-inline_notice__align-left uagb-block-b2c48390 uagb-inline_notice__outer-wrap\">\n<p class=\"uagb-notice-title\">Tip<\/p>\n<div class=\"uagb-notice-text\">\n<p>Caching with Varnish or Redis is included with every Combell web hosting package and is available with our other hosting solutions as well.<\/p>\n<\/div>\n<\/div>\n<div style=\"height:50px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n<h2 class=\"wp-block-heading\">What is VCL (Varnish Configuration Language)?<\/h2>\n<p>VCL is a <strong>specialized programming language<\/strong> used to define the caching behavior of Varnish.<\/p>\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n<p>With VCL, you can perform tasks such as:<\/p>\n<div class=\"wp-block-uagb-icon-list uagb-block-77e7d795 uagb-icon-list__outer-wrap uagb-icon-list__layout-vertical uagb-icon-list__icon-at-top\">\n<div class=\"uagb-icon-list__wrap\">\n<div class=\"wp-block-uagb-icon-list-child uagb-block-c383f32b uagb-icon-list-repeater uagb-icon-list__wrapper\"><a target=\"_self\" aria-label=\"Inspecting HTTP requests and responses\" rel=\"noopener noreferrer\" href=\"#\"> <\/a><span class=\"uagb-icon-list__source-wrap\"><svg xmlns=\"https:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\"><path d=\"M256 0C114.6 0 0 114.6 0 256c0 141.4 114.6 256 256 256s256-114.6 256-256C512 114.6 397.4 0 256 0zM406.6 278.6l-103.1 103.1c-12.5 12.5-32.75 12.5-45.25 0s-12.5-32.75 0-45.25L306.8 288H128C110.3 288 96 273.7 96 256s14.31-32 32-32h178.8l-49.38-49.38c-12.5-12.5-12.5-32.75 0-45.25s32.75-12.5 45.25 0l103.1 103.1C414.6 241.3 416 251.1 416 256C416 260.9 414.6 270.7 406.6 278.6z\"><\/path><\/svg><\/span><span class=\"uagb-icon-list__label\">Inspecting HTTP requests and responses<\/span><\/div>\n<div class=\"wp-block-uagb-icon-list-child uagb-block-45167a9d uagb-icon-list-repeater uagb-icon-list__wrapper\"><a target=\"_self\" aria-label=\"Modifying HTTP requests and responses\" rel=\"noopener noreferrer\" href=\"#\"> <\/a><span class=\"uagb-icon-list__source-wrap\"><svg xmlns=\"https:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\"><path d=\"M256 0C114.6 0 0 114.6 0 256c0 141.4 114.6 256 256 256s256-114.6 256-256C512 114.6 397.4 0 256 0zM406.6 278.6l-103.1 103.1c-12.5 12.5-32.75 12.5-45.25 0s-12.5-32.75 0-45.25L306.8 288H128C110.3 288 96 273.7 96 256s14.31-32 32-32h178.8l-49.38-49.38c-12.5-12.5-12.5-32.75 0-45.25s32.75-12.5 45.25 0l103.1 103.1C414.6 241.3 416 251.1 416 256C416 260.9 414.6 270.7 406.6 278.6z\"><\/path><\/svg><\/span><span class=\"uagb-icon-list__label\">Modifying HTTP requests and responses<\/span><\/div>\n<div class=\"wp-block-uagb-icon-list-child uagb-block-95a1c63e uagb-icon-list-repeater uagb-icon-list__wrapper\"><a target=\"_self\" aria-label=\"Controlling cache behavior\" rel=\"noopener noreferrer\" href=\"#\"> <\/a><span class=\"uagb-icon-list__source-wrap\"><svg xmlns=\"https:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\"><path d=\"M256 0C114.6 0 0 114.6 0 256c0 141.4 114.6 256 256 256s256-114.6 256-256C512 114.6 397.4 0 256 0zM406.6 278.6l-103.1 103.1c-12.5 12.5-32.75 12.5-45.25 0s-12.5-32.75 0-45.25L306.8 288H128C110.3 288 96 273.7 96 256s14.31-32 32-32h178.8l-49.38-49.38c-12.5-12.5-12.5-32.75 0-45.25s32.75-12.5 45.25 0l103.1 103.1C414.6 241.3 416 251.1 416 256C416 260.9 414.6 270.7 406.6 278.6z\"><\/path><\/svg><\/span><span class=\"uagb-icon-list__label\">Controlling cache behavior<\/span><\/div>\n<div class=\"wp-block-uagb-icon-list-child uagb-block-9f262703 uagb-icon-list-repeater uagb-icon-list__wrapper\"><a target=\"_self\" aria-label=\"Selecting the preferred web server\" rel=\"noopener noreferrer\" href=\"#\"> <\/a><span class=\"uagb-icon-list__source-wrap\"><svg xmlns=\"https:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\"><path d=\"M256 0C114.6 0 0 114.6 0 256c0 141.4 114.6 256 256 256s256-114.6 256-256C512 114.6 397.4 0 256 0zM406.6 278.6l-103.1 103.1c-12.5 12.5-32.75 12.5-45.25 0s-12.5-32.75 0-45.25L306.8 288H128C110.3 288 96 273.7 96 256s14.31-32 32-32h178.8l-49.38-49.38c-12.5-12.5-12.5-32.75 0-45.25s32.75-12.5 45.25 0l103.1 103.1C414.6 241.3 416 251.1 416 256C416 260.9 414.6 270.7 406.6 278.6z\"><\/path><\/svg><\/span><span class=\"uagb-icon-list__label\">Selecting the preferred web server<\/span><\/div>\n<div class=\"wp-block-uagb-icon-list-child uagb-block-bc8b4de3 uagb-icon-list-repeater uagb-icon-list__wrapper\"><a target=\"_self\" aria-label=\"Setting the Time To Live (TTL) for objects\" rel=\"noopener noreferrer\" href=\"#\"> <\/a><span class=\"uagb-icon-list__source-wrap\"><svg xmlns=\"https:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\"><path d=\"M256 0C114.6 0 0 114.6 0 256c0 141.4 114.6 256 256 256s256-114.6 256-256C512 114.6 397.4 0 256 0zM406.6 278.6l-103.1 103.1c-12.5 12.5-32.75 12.5-45.25 0s-12.5-32.75 0-45.25L306.8 288H128C110.3 288 96 273.7 96 256s14.31-32 32-32h178.8l-49.38-49.38c-12.5-12.5-12.5-32.75 0-45.25s32.75-12.5 45.25 0l103.1 103.1C414.6 241.3 416 251.1 416 256C416 260.9 414.6 270.7 406.6 278.6z\"><\/path><\/svg><\/span><span class=\"uagb-icon-list__label\">Setting the Time To Live (TTL) for objects<\/span><\/div>\n<div class=\"wp-block-uagb-icon-list-child uagb-block-6ec62111 uagb-icon-list-repeater uagb-icon-list__wrapper\"><a target=\"_self\" aria-label=\"Enabling communication with external systems\" rel=\"noopener noreferrer\" href=\"#\"> <\/a><span class=\"uagb-icon-list__source-wrap\"><svg xmlns=\"https:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\"><path d=\"M256 0C114.6 0 0 114.6 0 256c0 141.4 114.6 256 256 256s256-114.6 256-256C512 114.6 397.4 0 256 0zM406.6 278.6l-103.1 103.1c-12.5 12.5-32.75 12.5-45.25 0s-12.5-32.75 0-45.25L306.8 288H128C110.3 288 96 273.7 96 256s14.31-32 32-32h178.8l-49.38-49.38c-12.5-12.5-12.5-32.75 0-45.25s32.75-12.5 45.25 0l103.1 103.1C414.6 241.3 416 251.1 416 256C416 260.9 414.6 270.7 406.6 278.6z\"><\/path><\/svg><\/span><span class=\"uagb-icon-list__label\">Enabling communication with external systems<\/span><\/div>\n<div class=\"wp-block-uagb-icon-list-child uagb-block-30fd22e3 uagb-icon-list-repeater uagb-icon-list__wrapper\"><a target=\"_self\" aria-label=\"Customizing synthetic HTTP responses\" rel=\"noopener noreferrer\" href=\"#\"> <\/a><span class=\"uagb-icon-list__source-wrap\"><svg xmlns=\"https:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\"><path d=\"M256 0C114.6 0 0 114.6 0 256c0 141.4 114.6 256 256 256s256-114.6 256-256C512 114.6 397.4 0 256 0zM406.6 278.6l-103.1 103.1c-12.5 12.5-32.75 12.5-45.25 0s-12.5-32.75 0-45.25L306.8 288H128C110.3 288 96 273.7 96 256s14.31-32 32-32h178.8l-49.38-49.38c-12.5-12.5-12.5-32.75 0-45.25s32.75-12.5 45.25 0l103.1 103.1C414.6 241.3 416 251.1 416 256C416 260.9 414.6 270.7 406.6 278.6z\"><\/path><\/svg><\/span><span class=\"uagb-icon-list__label\">Customizing synthetic HTTP responses<\/span><\/div>\n<\/div>\n<\/div>\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n<p>VCL can also be used to write hooks for integrating external code into the application, enhancing the cache\u2019s functionality.<\/p>\n<p>The VCL code resides in a VCL file located on the Varnish server.<\/p>\n<div style=\"height:50px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n<h2 class=\"wp-block-heading\">How do I install Varnish on my server?<\/h2>\n<p>To activate Varnish, the basic setup involves pointing the \u201cwww\u201d DNS record of your <a href=\"https:\/\/www.combell.com\/en\/domain-names\" target=\"_blank\" rel=\"noreferrer noopener\">domain<\/a> to the Varnish server. If your application adheres to HTTP caching conventions, the rest will follow automatically. When a user requests a webpage, an interaction occurs between the browser and the server, and Varnish Cache speeds up page loading by storing previously loaded content. Getting started with Varnish can be that simple.<\/p>\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n<p>In practice, however, it\u2019s important to carefully examine how your web application handles HTTP:<\/p>\n<div class=\"wp-block-uagb-icon-list uagb-block-a86ccf4c uagb-icon-list__outer-wrap uagb-icon-list__layout-vertical uagb-icon-list__icon-at-top\">\n<div class=\"uagb-icon-list__wrap\">\n<div class=\"wp-block-uagb-icon-list-child uagb-block-d52405f2 uagb-icon-list-repeater uagb-icon-list__wrapper\"><a target=\"_self\" aria-label=\"Are there specific parts of web pages that should not be cached?\" rel=\"noopener noreferrer\" href=\"#\"> <\/a><span class=\"uagb-icon-list__source-wrap\"><svg xmlns=\"https:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 448 512\"><path d=\"M438.6 105.4C451.1 117.9 451.1 138.1 438.6 150.6L182.6 406.6C170.1 419.1 149.9 419.1 137.4 406.6L9.372 278.6C-3.124 266.1-3.124 245.9 9.372 233.4C21.87 220.9 42.13 220.9 54.63 233.4L159.1 338.7L393.4 105.4C405.9 92.88 426.1 92.88 438.6 105.4H438.6z\"><\/path><\/svg><\/span><span class=\"uagb-icon-list__label\">Are there specific parts of web pages that should not be cached?<\/span><\/div>\n<div class=\"wp-block-uagb-icon-list-child uagb-block-6bcc606f uagb-icon-list-repeater uagb-icon-list__wrapper\"><a target=\"_self\" aria-label=\"Are there parts of web pages that can be cached even if they use cookies?\" rel=\"noopener noreferrer\" href=\"#\"> <\/a><span class=\"uagb-icon-list__source-wrap\"><svg xmlns=\"https:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 448 512\"><path d=\"M438.6 105.4C451.1 117.9 451.1 138.1 438.6 150.6L182.6 406.6C170.1 419.1 149.9 419.1 137.4 406.6L9.372 278.6C-3.124 266.1-3.124 245.9 9.372 233.4C21.87 220.9 42.13 220.9 54.63 233.4L159.1 338.7L393.4 105.4C405.9 92.88 426.1 92.88 438.6 105.4H438.6z\"><\/path><\/svg><\/span><span class=\"uagb-icon-list__label\">Are there parts of web pages that can be cached even if they use cookies?<\/span><\/div>\n<div class=\"wp-block-uagb-icon-list-child uagb-block-b14678a7 uagb-icon-list-repeater uagb-icon-list__wrapper\"><a target=\"_self\" aria-label=\"Are there certain cookies that should be removed to ensure proper caching?\" rel=\"noopener noreferrer\" href=\"#\"> <\/a><span class=\"uagb-icon-list__source-wrap\"><svg xmlns=\"https:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 448 512\"><path d=\"M438.6 105.4C451.1 117.9 451.1 138.1 438.6 150.6L182.6 406.6C170.1 419.1 149.9 419.1 137.4 406.6L9.372 278.6C-3.124 266.1-3.124 245.9 9.372 233.4C21.87 220.9 42.13 220.9 54.63 233.4L159.1 338.7L393.4 105.4C405.9 92.88 426.1 92.88 438.6 105.4H438.6z\"><\/path><\/svg><\/span><span class=\"uagb-icon-list__label\">Are there certain cookies that should be removed to ensure proper caching?<\/span><\/div>\n<div class=\"wp-block-uagb-icon-list-child uagb-block-5b3722e8 uagb-icon-list-repeater uagb-icon-list__wrapper\"><a target=\"_self\" aria-label=\"Are specific cache variations possible based on cookies?\" rel=\"noopener noreferrer\" href=\"#\"> <\/a><span class=\"uagb-icon-list__source-wrap\"><svg xmlns=\"https:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 448 512\"><path d=\"M438.6 105.4C451.1 117.9 451.1 138.1 438.6 150.6L182.6 406.6C170.1 419.1 149.9 419.1 137.4 406.6L9.372 278.6C-3.124 266.1-3.124 245.9 9.372 233.4C21.87 220.9 42.13 220.9 54.63 233.4L159.1 338.7L393.4 105.4C405.9 92.88 426.1 92.88 438.6 105.4H438.6z\"><\/path><\/svg><\/span><span class=\"uagb-icon-list__label\">Are specific cache variations possible based on cookies?<\/span><\/div>\n<div class=\"wp-block-uagb-icon-list-child uagb-block-29c6bf50 uagb-icon-list-repeater uagb-icon-list__wrapper\"><a target=\"_self\" aria-label=\"Does the web application use Cache-Control headers to determine the TTL (time-to-live)?\" rel=\"noopener noreferrer\" href=\"#\"> <\/a><span class=\"uagb-icon-list__source-wrap\"><svg xmlns=\"https:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 448 512\"><path d=\"M438.6 105.4C451.1 117.9 451.1 138.1 438.6 150.6L182.6 406.6C170.1 419.1 149.9 419.1 137.4 406.6L9.372 278.6C-3.124 266.1-3.124 245.9 9.372 233.4C21.87 220.9 42.13 220.9 54.63 233.4L159.1 338.7L393.4 105.4C405.9 92.88 426.1 92.88 438.6 105.4H438.6z\"><\/path><\/svg><\/span><span class=\"uagb-icon-list__label\">Does the web application use Cache-Control headers to determine the TTL (time-to-live)?<\/span><\/div>\n<\/div>\n<\/div>\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n<p>In certain cases, some objects may need to be explicitly removed from the cache.<\/p>\n<p>For example, consider the homepage of a news site. If there\u2019s breaking news, the site won\u2019t want to wait for the TTL of cached content to expire. Instead, the relevant pages need to be removed from the cache immediately.<\/p>\n<p>Popular platforms like WordPress, Drupal, Joomla, and Magento offer VCL templates that account for the caching behavior of each specific framework.<\/p>\n<div style=\"height:50px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n<h2 class=\"wp-block-heading\">How to optimize specific Varnish settings<\/h2>\n<div class=\"wp-block-uagb-icon-list uagb-block-6aa4f659 uagb-icon-list__outer-wrap uagb-icon-list__layout-vertical uagb-icon-list__icon-at-top\">\n<div class=\"uagb-icon-list__wrap\">\n<div class=\"wp-block-uagb-icon-list-child uagb-block-503e65c6 uagb-icon-list-repeater uagb-icon-list__wrapper\"><a target=\"_self\" aria-label=\"Improve Cache hit rate\" rel=\"noopener noreferrer\" href=\"#\"> <\/a><span class=\"uagb-icon-list__source-wrap\"><svg xmlns=\"https:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\"><path d=\"M256 0C114.6 0 0 114.6 0 256c0 141.4 114.6 256 256 256s256-114.6 256-256C512 114.6 397.4 0 256 0zM406.6 278.6l-103.1 103.1c-12.5 12.5-32.75 12.5-45.25 0s-12.5-32.75 0-45.25L306.8 288H128C110.3 288 96 273.7 96 256s14.31-32 32-32h178.8l-49.38-49.38c-12.5-12.5-12.5-32.75 0-45.25s32.75-12.5 45.25 0l103.1 103.1C414.6 241.3 416 251.1 416 256C416 260.9 414.6 270.7 406.6 278.6z\"><\/path><\/svg><\/span><span class=\"uagb-icon-list__label\"><strong><strong>Improve Cache hit rate<\/strong><\/strong><\/span><\/div>\n<\/div>\n<\/div>\n<p>Use the Varnish Configuration Language (VCL) to define rules for caching specific content. For instance, cache images and scripts for longer durations while refreshing dynamic content more frequently. Make sure only essential elements, like specific cookies and headers, affect the cache to maximize the number of requests served from cache.<\/p>\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n<div class=\"wp-block-uagb-icon-list uagb-block-10744ae9 uagb-icon-list__outer-wrap uagb-icon-list__layout-vertical uagb-icon-list__icon-at-top\">\n<div class=\"uagb-icon-list__wrap\">\n<div class=\"wp-block-uagb-icon-list-child uagb-block-f98cc6e0 uagb-icon-list-repeater uagb-icon-list__wrapper\"><a target=\"_self\" aria-label=\"Use grace and saint mode\" rel=\"noopener noreferrer\" href=\"#\"> <\/a><span class=\"uagb-icon-list__source-wrap\"><svg xmlns=\"https:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\"><path d=\"M256 0C114.6 0 0 114.6 0 256c0 141.4 114.6 256 256 256s256-114.6 256-256C512 114.6 397.4 0 256 0zM406.6 278.6l-103.1 103.1c-12.5 12.5-32.75 12.5-45.25 0s-12.5-32.75 0-45.25L306.8 288H128C110.3 288 96 273.7 96 256s14.31-32 32-32h178.8l-49.38-49.38c-12.5-12.5-12.5-32.75 0-45.25s32.75-12.5 45.25 0l103.1 103.1C414.6 241.3 416 251.1 416 256C416 260.9 414.6 270.7 406.6 278.6z\"><\/path><\/svg><\/span><span class=\"uagb-icon-list__label\"><strong><strong><strong>Use grace and saint mode<\/strong><\/strong><\/strong><\/span><\/div>\n<\/div>\n<\/div>\n<p><strong>Grace Mode<\/strong>: Allows Varnish to serve outdated content if the backend is slow or temporarily unavailable, ensuring a smoother user experience during high traffic or maintenance.<\/p>\n<p><strong>Saint Mode<\/strong>: Helps avoid downtime by skipping temporarily failing backends and testing others, enhancing site reliability.<\/p>\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n<div class=\"wp-block-uagb-icon-list uagb-block-627aac1a uagb-icon-list__outer-wrap uagb-icon-list__layout-vertical uagb-icon-list__icon-at-top\">\n<div class=\"uagb-icon-list__wrap\">\n<div class=\"wp-block-uagb-icon-list-child uagb-block-98652d33 uagb-icon-list-repeater uagb-icon-list__wrapper\"><a target=\"_self\" aria-label=\"Enhance backend performance\" rel=\"noopener noreferrer\" href=\"#\"> <\/a><span class=\"uagb-icon-list__source-wrap\"><svg xmlns=\"https:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\"><path d=\"M256 0C114.6 0 0 114.6 0 256c0 141.4 114.6 256 256 256s256-114.6 256-256C512 114.6 397.4 0 256 0zM406.6 278.6l-103.1 103.1c-12.5 12.5-32.75 12.5-45.25 0s-12.5-32.75 0-45.25L306.8 288H128C110.3 288 96 273.7 96 256s14.31-32 32-32h178.8l-49.38-49.38c-12.5-12.5-12.5-32.75 0-45.25s32.75-12.5 45.25 0l103.1 103.1C414.6 241.3 416 251.1 416 256C416 260.9 414.6 270.7 406.6 278.6z\"><\/path><\/svg><\/span><span class=\"uagb-icon-list__label\"><strong><strong><strong><strong>Enhance backend performance<\/strong><\/strong><\/strong><\/strong><\/span><\/div>\n<\/div>\n<\/div>\n<p>Varnish can continuously monitor backend health through health checks, automatically switching to healthy servers when necessary. Additionally, load balancing distributes the load across multiple backends to improve performance and prevent downtime.<\/p>\n<div style=\"height:50px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n<h2 class=\"wp-block-heading\">Combell develops a Varnish solution for you<\/h2>\n<p>With years of experience optimizing load times and user experiences through caching technologies like Varnish, Combell is well-equipped to find the best caching solution for your website or application.<\/p>\n<p>Our specialists will work with you to select and implement the optimal caching strategy tailored to your needs.<\/p>\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n<div class=\"wp-block-buttons is-vertical is-content-justification-center is-layout-flex wp-container-core-buttons-is-layout-1 wp-block-buttons-is-layout-flex\">\n<div class=\"wp-block-button is-style-fill\"><a class=\"wp-block-button__link has-white-color has-yellow-background-color has-text-color has-background wp-element-button\" href=\"https:\/\/www.combell.com\/en\/technology\/varnish\">Get yourself the fastest applications<\/a><\/div>\n<\/div>\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n","protected":false},"excerpt":{"rendered":"<p>If you want a high volume of visitors on your website, you'll need both an ultra-fast site and server. There are various tools to make your website as fast as possible, such as caching. And when it comes to caching, Varnish is the top technology. We\u2019re here to answer your essential questions about this powerful yet complex tool.<\/p>\n","protected":false},"author":33,"featured_media":12883,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_uag_custom_page_level_css":"","footnotes":""},"categories":[63],"tags":[96,210,99],"acf":[],"uagb_featured_image_src":{"full":["https:\/\/www.combell.com\/en\/blog\/files\/wat-is-varnish-header-small.png",1200,420,false],"thumbnail":["https:\/\/www.combell.com\/en\/blog\/files\/wat-is-varnish-header-small-50x50.png",50,50,true],"medium":["https:\/\/www.combell.com\/en\/blog\/files\/wat-is-varnish-header-small-300x105.png",300,105,true],"medium_large":["https:\/\/www.combell.com\/en\/blog\/files\/wat-is-varnish-header-small-768x269.png",768,269,true],"large":["https:\/\/www.combell.com\/en\/blog\/files\/wat-is-varnish-header-small-1024x358.png",1024,358,true],"1536x1536":["https:\/\/www.combell.com\/en\/blog\/files\/wat-is-varnish-header-small.png",1200,420,false],"2048x2048":["https:\/\/www.combell.com\/en\/blog\/files\/wat-is-varnish-header-small.png",1200,420,false],"post-featured":["https:\/\/www.combell.com\/en\/blog\/files\/wat-is-varnish-header-small-850x290.png",850,290,true],"post-featured-opt":["https:\/\/www.combell.com\/en\/blog\/files\/wat-is-varnish-header-small-750x256.png",750,256,true],"post-featured-opt-md":["https:\/\/www.combell.com\/en\/blog\/files\/wat-is-varnish-header-small-850x290.png",850,290,true],"post-featured-opt-sm":["https:\/\/www.combell.com\/en\/blog\/files\/wat-is-varnish-header-small-485x165.png",485,165,true],"post-featured-opt-xs":["https:\/\/www.combell.com\/en\/blog\/files\/wat-is-varnish-header-small-375x128.png",375,128,true],"post-most-popular":["https:\/\/www.combell.com\/en\/blog\/files\/wat-is-varnish-header-small-50x50.png",50,50,true],"post-author":["https:\/\/www.combell.com\/en\/blog\/files\/wat-is-varnish-header-small-60x60.png",60,60,true]},"uagb_author_info":{"display_name":"Amber","author_link":"https:\/\/www.combell.com\/en\/blog\/author\/amber\/"},"uagb_comment_info":0,"uagb_excerpt":"If you want a high volume of visitors on your website, you'll need both an ultra-fast site and server. There are various tools to make your website as fast as possible, such as caching. And when it comes to caching, Varnish is the top technology. We\u2019re here to answer your essential questions about this powerful&hellip;","_links":{"self":[{"href":"https:\/\/www.combell.com\/en\/blog\/wp-json\/wp\/v2\/posts\/7563"}],"collection":[{"href":"https:\/\/www.combell.com\/en\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.combell.com\/en\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.combell.com\/en\/blog\/wp-json\/wp\/v2\/users\/33"}],"replies":[{"embeddable":true,"href":"https:\/\/www.combell.com\/en\/blog\/wp-json\/wp\/v2\/comments?post=7563"}],"version-history":[{"count":8,"href":"https:\/\/www.combell.com\/en\/blog\/wp-json\/wp\/v2\/posts\/7563\/revisions"}],"predecessor-version":[{"id":12888,"href":"https:\/\/www.combell.com\/en\/blog\/wp-json\/wp\/v2\/posts\/7563\/revisions\/12888"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.combell.com\/en\/blog\/wp-json\/wp\/v2\/media\/12883"}],"wp:attachment":[{"href":"https:\/\/www.combell.com\/en\/blog\/wp-json\/wp\/v2\/media?parent=7563"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.combell.com\/en\/blog\/wp-json\/wp\/v2\/categories?post=7563"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.combell.com\/en\/blog\/wp-json\/wp\/v2\/tags?post=7563"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}