{"id":1145,"date":"2016-09-28T15:17:13","date_gmt":"2016-09-28T15:17:13","guid":{"rendered":"http:\/\/cloudkul.com\/blog\/?p=1145"},"modified":"2024-10-07T07:09:21","modified_gmt":"2024-10-07T07:09:21","slug":"configure-varnish-and-redis-magento-2","status":"publish","type":"post","link":"https:\/\/cloudkul.com\/blog\/configure-varnish-and-redis-magento-2\/","title":{"rendered":"How to configure Varnish and Redis in Magento 2"},"content":{"rendered":"<p>Varnish and Redis are great tools for increasing the performance of your Magento2 store.<\/p>\n<p>Varnish is an HTTP accelerator that is used to increase the speed of the site by caching the static contents.<\/p>\n<p>Redis server is a database server that stores frequently asked queries in the cache so users do not have to query the main database server.<\/p>\n<p>In this tutorial, we will show you how to configure Varnish and Redis in Magento 2.<\/p>\n<p>Before you start you must have configured Magento 2 and varnish must be enabled from the Magento backend.<\/p>\n<p><a href=\"https:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2016\/09\/varnish_magento-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-16632 size-full aligncenter\" src=\"https:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2016\/09\/varnish_magento-1.png\" alt=\"\" width=\"1293\" height=\"666\" \/><\/a><\/p>\n<h2><span style=\"text-decoration: underline;\"><strong>Configure Varnish<\/strong><\/span><\/h2>\n<p>If you are running your server at port 80 you should run the server at a different port because here we are using varnish to listen at port 80.<\/p>\n<p>You can define the port as per your requirement, and update the port in the varnish file accordingly.<\/p>\n<p>To install the service run the following commands.<\/p>\n<pre class=\"lang:default decode:true\">#apt-get install varnish\n#systemctl enable varnish\n#systemctl status varnish\n#sudo apt-get updateBAN\n<\/pre>\n<p>To check its version, run the below command &#8211;<br \/>\n# varnishd -V<\/p>\n<p><a href=\"https:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2016\/09\/varnish-2.png\"><img data-dominant-color=\"3c1c31\" data-has-transparency=\"false\" style=\"--dominant-color: #3c1c31;\" loading=\"lazy\" decoding=\"async\" class=\"not-transparent size-large wp-image-17105 aligncenter\" src=\"https:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2016\/09\/varnish-2-1024x152.png\" alt=\"\" width=\"1024\" height=\"152\" \/><\/a><\/p>\n<p>Open \/etc\/default\/varnish and change the following.<\/p>\n<pre class=\"lang:default decode:true\">DAEMON_OPTS=\"-a :80 \\   \n             -T localhost:6082 \\\n             -f \/etc\/varnish\/default.vcl \\ \n             -S \/etc\/varnish\/secret \\\n             -s malloc,2048m\"  # -a : &lt;set_port&gt;,  -s malloc,&lt;cache_memory&gt;\n                                             \n<\/pre>\n<p>Replace this code in \/etc\/varnish\/default.vcl with varnish.vcl. Make sure that the configuration file name should be the default.vcl<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\">vcl 4.0;\n\nimport std;\n# The minimal Varnish version is 4.0\n# For SSL offloading, pass the following header in your proxy server or load balancer: 'X-Forwarded-Proto: https'\n\nbackend default {\n.host = \"localhost\";\n.port = \"8080\";\n.first_byte_timeout = 600s;\n.probe = {\n.url = \"\/health_check.php\";\n.timeout = 2s;\n.interval = 5s;\n.window = 10;\n.threshold = 5;\n}\n}\n\nacl purge {\n\"localhost\";\n}\n\nsub vcl_recv {\nif (req.restarts &gt; 0) {\nset req.hash_always_miss = true;\n}\n\nif (req.method == \"PURGE\") {\nif (client.ip !~ purge) {\nreturn (synth(405, \"Method not allowed\"));\n}\n\n# To use the X-Pool header for purging varnish during automated deployments, make sure the X-Pool header\n# has been added to the response in your backend server config. This is used, for example, by the\n# capistrano-magento2 gem for purging old content from varnish during its deployment routine.\nif (!req.http.X-Magento-Tags-Pattern &amp;&amp; !req.http.X-Pool) {\nreturn (synth(400, \"X-Magento-Tags-Pattern or X-Pool header required\"));\n}\nif (req.http.X-Magento-Tags-Pattern) {\nban(\"obj.http.X-Magento-Tags ~ \" + req.http.X-Magento-Tags-Pattern);\n}\nif (req.http.X-Pool) {\nban(\"obj.http.X-Pool ~ \" + req.http.X-Pool);\n}\nreturn (synth(200, \"Purged\"));\n}\n\nif (req.method != \"GET\" &amp;&amp;\nreq.method != \"HEAD\" &amp;&amp;\nreq.method != \"PUT\" &amp;&amp;\nreq.method != \"POST\" &amp;&amp;\nreq.method != \"TRACE\" &amp;&amp;\nreq.method != \"OPTIONS\" &amp;&amp;\nreq.method != \"DELETE\") {\n\/* Non-RFC2616 or CONNECT which is weird. *\/\nreturn (pipe);\n}\n\n# We only deal with GET and HEAD by default\nif (req.method != \"GET\" &amp;&amp; req.method != \"HEAD\") {\nreturn (pass);\n}\n\n# Bypass shopping cart and checkout\nif (req.url ~ \"\/checkout\") {\nreturn (pass);\n}\n\n# Bypass health check requests\nif (req.url ~ \"\/pub\/health_check.php\") {\nreturn (pass);\n}\n\n# Set initial grace period usage status\nset req.http.grace = \"none\";\n# normalize url in case of leading HTTP scheme and domain\nset req.url = regsub(req.url, \"^http[s]?:\/\/\", \"\");\n\n# collect all cookies\nstd.collect(req.http.Cookie);\n\n# Compression filter. See\u00a0https:\/\/www.varnish-cache.org\/trac\/wiki\/FAQ\/Compression\nif (req.http.Accept-Encoding) {\nif (req.url ~ \"\\.(jpg|jpeg|png|gif|gz|tgz|bz2|tbz|mp3|ogg|swf|flv)$\") {\n# No point in compressing these\nunset req.http.Accept-Encoding;\n} elsif (req.http.Accept-Encoding ~ \"gzip\") {\nset req.http.Accept-Encoding = \"gzip\";\n} elsif (req.http.Accept-Encoding ~ \"deflate\" &amp;&amp; req.http.user-agent !~ \"MSIE\") {\nset req.http.Accept-Encoding = \"deflate\";\n} else {\n# unknown algorithm\nunset req.http.Accept-Encoding;\n}\n}\n\n# Remove all marketing get parameters to minimize the cache objects\nif (req.url ~ \"(\\?|&amp;)(gclid|cx|ie|cof|siteurl|zanpid|origin|fbclid|mc_[a-z]+|utm_[a-z]+|_bta_[a-z]+)=\") {\nset req.url = regsuball(req.url, \"(gclid|cx|ie|cof|siteurl|zanpid|origin|fbclid|mc_[a-z]+|utm_[a-z]+|_bta_[a-z]+)=[-_A-z0-9+()%.]+&amp;?\", \"\");\nset req.url = regsub(req.url, \"[?|&amp;]+$\", \"\");\n}\n\n# Static file caching\nif (req.url ~ \"^\/(pub\/)?(media|static)\/\") {\n# Static files should not be cached by default\nreturn (pass);\n# But if you use a few locales and don't use CDN you can enable caching static files by commenting previous line (#return (pass);) and uncommenting the next 3 lines\n#unset req.http.Https;\n#unset req.http.X-Forwarded-Proto;\n#unset req.http.Cookie;\n}\n\n# Authenticated GraphQL requests should not be cached by default\nif (req.url ~ \"\/graphql\" &amp;&amp; req.http.Authorization ~ \"^Bearer\") {\nreturn (pass);\n}\n\nreturn (hash);\n}\n\nsub vcl_hash {\nif (req.http.cookie ~ \"X-Magento-Vary=\") {\nhash_data(regsub(req.http.cookie, \"^.*?X-Magento-Vary=([^;]+);*.*$\", \"\\1\"));\n}\n\nif (req.url ~ \"\/graphql\") {\ncall process_graphql_headers;\n}\n\n# To make sure HTTP users don't see SSL warning\nif (req.http.X-Forwarded-Proto) {\nhash_data(req.http.X-Forwarded-Proto);\n}\n\n}\nsub process_graphql_headers {\nif (req.http.Store) {\nhash_data(req.http.Store);\n}\nif (req.http.Content-Currency) {\nhash_data(req.http.Content-Currency);\n}\n}\n\nsub vcl_backend_response {\n\nset beresp.grace = 3d;\n\nif (beresp.http.content-type ~ \"text\") {\nset beresp.do_esi = true;\n}\n\nif (bereq.url ~ \"\\.js$\" || beresp.http.content-type ~ \"text\") {\nset beresp.do_gzip = true;\n}\n\nif (beresp.http.X-Magento-Debug) {\nset beresp.http.X-Magento-Cache-Control = beresp.http.Cache-Control;\n}\n\n# cache only successfully responses and 404s\nif (beresp.status != 200 &amp;&amp; beresp.status != 404) {\nset beresp.ttl = 0s;\nset beresp.uncacheable = true;\nreturn (deliver);\n} elsif (beresp.http.Cache-Control ~ \"private\") {\nset beresp.uncacheable = true;\nset beresp.ttl = 86400s;\nreturn (deliver);\n}\n# validate if we need to cache it and prevent from setting cookie\nif (beresp.ttl &gt; 0s &amp;&amp; (bereq.method == \"GET\" || bereq.method == \"HEAD\")) {\nunset beresp.http.set-cookie;\n}\n\n# If the page is not cacheable then bypass varnish for 2 minutes as Hit-For-Pass\nif (beresp.ttl &lt;= 0s ||\nberesp.http.Surrogate-control ~ \"no-store\" ||\n(!beresp.http.Surrogate-Control &amp;&amp;\nberesp.http.Cache-Control ~ \"no-cache|no-store\") ||\nberesp.http.Vary == \"*\") {\n# Mark as Hit-For-Pass for the next 2 minutes\nset beresp.ttl = 120s;\nset beresp.uncacheable = true;\n}\n\nreturn (deliver);\n}\n\nsub vcl_deliver {\nif (resp.http.X-Magento-Debug) {\nif (resp.http.x-varnish ~ \" \") {\nset resp.http.X-Magento-Cache-Debug = \"HIT\";\nset resp.http.Grace = req.http.grace;\n} else {\nset resp.http.X-Magento-Cache-Debug = \"MISS\";\n}\n} else {\n# unset resp.http.Age;\n}\n\n# Not letting browser to cache non-static files.\nif (resp.http.Cache-Control !~ \"private\" &amp;&amp; req.url !~ \"^\/(pub\/)?(media|static)\/\") {\nset resp.http.Pragma = \"no-cache\";\nset resp.http.Expires = \"-1\";\nset resp.http.Cache-Control = \"no-store, no-cache, must-revalidate, max-age=0\";\n}\n\nunset resp.http.X-Magento-Debug;\nunset resp.http.X-Magento-Tags;\nunset resp.http.X-Powered-By;\nunset resp.http.Server;\n#unset resp.http.X-Varnish;\nunset resp.http.Via;\nunset resp.http.Link;\n}\n\nsub vcl_hit {\nif (obj.ttl &gt;= 0s) {\n# Hit within TTL period\nreturn (deliver);\n}\nif (std.healthy(req.backend_hint)) {\nif (obj.ttl + 300s &gt; 0s) {\n# Hit after TTL expiration but within a grace period\nset req.http.grace = \"normal (healthy server)\";\nreturn (deliver);\n} else {\n# Hit after TTL and grace expiration\nreturn (restart);\n}\n} else {\n# server is not healthy, retrieve from cache\nset req.http.grace = \"unlimited (unhealthy server)\";\nreturn (deliver);\n}\n}<\/pre>\n<p>We are using this custom vcl file instead of using the default vcl file for configuring varnish version 6.<\/p>\n<p><strong>Restart the service<\/strong><\/p>\n<pre class=\"lang:default decode:true\">sudo service varnish restart<\/pre>\n<p>Now verify service is caching the page. Go to your Magento root directory and clear the cache.<\/p>\n<pre class=\"lang:default decode:true\">sudo php bin\/magento cache:flush\nsudo rm -rf var\/cache\/*\nsudo rm -rf var\/page_cache\/*<\/pre>\n<p>Now open your website in the browser and check the service status in the terminal with this command.<\/p>\n<pre class=\"lang:default decode:true\">varnishstat<\/pre>\n<p><a href=\"http:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2016\/08\/varnishstat.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-1179 alignnone\" src=\"http:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2016\/08\/varnishstat.png\" alt=\"varnishstat\" width=\"728\" height=\"494\" \/><\/a><\/p>\n<p>If you see MAIN.cache_hit, that means the varnish cache is working fine.<\/p>\n<p>As you reload your page MAIN.cache_hit will increase. If you restart the service, the cache will be cleared.<\/p>\n<h2><span style=\"text-decoration: underline;\"><strong>Configure Redis Server<\/strong><\/span><\/h2>\n<p>Install the Redis server.<\/p>\n<pre class=\"\">#apt install redis-server\n#systemctl enable redis-server\n#systemctl status redis-server\n#sudo apt-get update<\/pre>\n<p>To check the Redis version, run the below command-<br \/>\n# redis-server -v<\/p>\n<p><a href=\"https:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2016\/09\/redis-1.png\"><img data-dominant-color=\"36182c\" data-has-transparency=\"false\" style=\"--dominant-color: #36182c;\" loading=\"lazy\" decoding=\"async\" class=\"not-transparent size-full wp-image-17107 aligncenter\" src=\"https:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2016\/09\/redis-1.png\" alt=\"\" width=\"987\" height=\"111\" \/><\/a><\/p>\n<p>Run the below command to check whether the Redis service is installed properly or not<\/p>\n<p>#redis-cli<br \/>\nping<\/p>\n<p><a href=\"https:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2016\/09\/redis_blog.png\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-16616 size-full aligncenter\" src=\"https:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2016\/09\/redis_blog.png\" alt=\"\" width=\"502\" height=\"93\" \/><\/a><\/p>\n<p>A &#8216;pong&#8217; response will come which shows the Redis is working fine.<\/p>\n<p>Go to your Magento root directory and run the below command to update the env.php file<\/p>\n<pre class=\"lang:default decode:true\">#bin\/magento setup:config:set --cache-backend=redis --cache-backend-redis-server=127.0.0.1 --cache-backend-redis-db=0\n#bin\/magento setup:config:set --page-cache=redis --page-cache-redis-server=127.0.0.1 --page-cache-redis-db=1\n<\/pre>\n<p><strong>Restart the Redis server<\/strong><\/p>\n<pre class=\"lang:default decode:true\">sudo service redis-server restart<\/pre>\n<p>Check whether the Redis server is working or not. Open your website and view some pages then \u00a0run the command<\/p>\n<pre class=\"lang:default decode:true\">sudo redis-cli info<\/pre>\n<p>If you see this keyspace and some values, then it means your Redis is configured properly.<\/p>\n<p>If you do not see anything below Keyspace then Redis have not cached anything. In this case, you need to cross-check your Redis configuration<\/p>\n<p><a href=\"http:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2016\/08\/keyspace.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-1191 alignleft\" src=\"http:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2016\/08\/keyspace.png\" alt=\"keyspace\" width=\"723\" height=\"44\" \/><\/a><\/p>\n<p>To flush the Redis cache run the following command<\/p>\n<pre class=\"lang:default decode:true \">sudo redis-cli flushdb<\/pre>\n<p>Now your site has been optimized with Varnish and Redis cache.<\/p>\n<h2>Need Support?<\/h2>\n<p>Thank You for reading this Blog!<\/p>\n<p>For further more interesting blogs, keep in touch with us. If you need any kind of support, simply raise a ticket at <strong><a href=\"https:\/\/webkul.uvdesk.com\/en\/\">https:\/\/webkul.uvdesk.com\/en\/<\/a><\/strong>.<\/p>\n<p>You may also visit our Odoo development services and quality <strong><a href=\"https:\/\/store.webkul.com\/index.php\/Odoo.html\">Odoo Extensions<\/a><\/strong>.<\/p>\n<p>For further help or queries, please <strong><a href=\"https:\/\/cloudkul.com\/contact\/\">contact us<\/a><\/strong> or raise a <a href=\"https:\/\/webkul.uvdesk.com\/en\/customer\/create-ticket\/\"><strong>ticket<\/strong><\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Varnish and Redis are great tools for increasing the performance of your Magento2 store. Varnish <a class=\"text-primary\" title=\"read more\" href=\"https:\/\/cloudkul.com\/blog\/configure-varnish-and-redis-magento-2\/\">[&#8230;]<\/a><\/p>\n","protected":false},"author":43,"featured_media":1697,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[32,2,87,20,25],"tags":[90,24,27,780,865,68],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to configure Varnish and Redis in Magento 2 - Cloudkul<\/title>\n<meta name=\"description\" content=\"Varnish is an HTTP accelerator that is used to increase the speed of the site by caching the static contents.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/cloudkul.com\/blog\/configure-varnish-and-redis-magento-2\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to configure Varnish and Redis in Magento 2 - Cloudkul\" \/>\n<meta property=\"og:description\" content=\"Varnish is an HTTP accelerator that is used to increase the speed of the site by caching the static contents.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/cloudkul.com\/blog\/configure-varnish-and-redis-magento-2\/\" \/>\n<meta property=\"og:site_name\" content=\"Cloudkul\" \/>\n<meta property=\"article:published_time\" content=\"2016-09-28T15:17:13+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-10-07T07:09:21+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2016\/09\/download-1.png\" \/>\n\t<meta property=\"og:image:width\" content=\"848\" \/>\n\t<meta property=\"og:image:height\" content=\"422\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Vishwanath Acharya\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/cloudkul.com\/blog\/configure-varnish-and-redis-magento-2\/\",\"url\":\"https:\/\/cloudkul.com\/blog\/configure-varnish-and-redis-magento-2\/\",\"name\":\"How to configure Varnish and Redis in Magento 2 - Cloudkul\",\"isPartOf\":{\"@id\":\"https:\/\/cloudkul.com\/blog\/#website\"},\"datePublished\":\"2016-09-28T15:17:13+00:00\",\"dateModified\":\"2024-10-07T07:09:21+00:00\",\"author\":{\"@id\":\"https:\/\/cloudkul.com\/blog\/#\/schema\/person\/5468024685361b49b2a71b63a119554b\"},\"description\":\"Varnish is an HTTP accelerator that is used to increase the speed of the site by caching the static contents.\",\"breadcrumb\":{\"@id\":\"https:\/\/cloudkul.com\/blog\/configure-varnish-and-redis-magento-2\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/cloudkul.com\/blog\/configure-varnish-and-redis-magento-2\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/cloudkul.com\/blog\/configure-varnish-and-redis-magento-2\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/cloudkul.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to configure Varnish and Redis in Magento 2\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/cloudkul.com\/blog\/#website\",\"url\":\"https:\/\/cloudkul.com\/blog\/\",\"name\":\"Cloudkul\",\"description\":\"Host your eCommerce Store on AWS with Optimized Performance\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/cloudkul.com\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/cloudkul.com\/blog\/#\/schema\/person\/5468024685361b49b2a71b63a119554b\",\"name\":\"Vishwanath Acharya\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/cloudkul.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/249a5381871f8598d0966d406a74d102?s=96&d=https%3A%2F%2Fs.gravatar.com%2Favatar%2F6148c37469011bc2f8e491ca8f5de495%3Fs%3D80&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/249a5381871f8598d0966d406a74d102?s=96&d=https%3A%2F%2Fs.gravatar.com%2Favatar%2F6148c37469011bc2f8e491ca8f5de495%3Fs%3D80&r=g\",\"caption\":\"Vishwanath Acharya\"},\"url\":\"https:\/\/cloudkul.com\/blog\/author\/vishwanathacharya-cloud336\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to configure Varnish and Redis in Magento 2 - Cloudkul","description":"Varnish is an HTTP accelerator that is used to increase the speed of the site by caching the static contents.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/cloudkul.com\/blog\/configure-varnish-and-redis-magento-2\/","og_locale":"en_US","og_type":"article","og_title":"How to configure Varnish and Redis in Magento 2 - Cloudkul","og_description":"Varnish is an HTTP accelerator that is used to increase the speed of the site by caching the static contents.","og_url":"https:\/\/cloudkul.com\/blog\/configure-varnish-and-redis-magento-2\/","og_site_name":"Cloudkul","article_published_time":"2016-09-28T15:17:13+00:00","article_modified_time":"2024-10-07T07:09:21+00:00","og_image":[{"width":848,"height":422,"url":"https:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2016\/09\/download-1.png","type":"image\/png"}],"author":"Vishwanath Acharya","twitter_card":"summary_large_image","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/cloudkul.com\/blog\/configure-varnish-and-redis-magento-2\/","url":"https:\/\/cloudkul.com\/blog\/configure-varnish-and-redis-magento-2\/","name":"How to configure Varnish and Redis in Magento 2 - Cloudkul","isPartOf":{"@id":"https:\/\/cloudkul.com\/blog\/#website"},"datePublished":"2016-09-28T15:17:13+00:00","dateModified":"2024-10-07T07:09:21+00:00","author":{"@id":"https:\/\/cloudkul.com\/blog\/#\/schema\/person\/5468024685361b49b2a71b63a119554b"},"description":"Varnish is an HTTP accelerator that is used to increase the speed of the site by caching the static contents.","breadcrumb":{"@id":"https:\/\/cloudkul.com\/blog\/configure-varnish-and-redis-magento-2\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/cloudkul.com\/blog\/configure-varnish-and-redis-magento-2\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/cloudkul.com\/blog\/configure-varnish-and-redis-magento-2\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/cloudkul.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to configure Varnish and Redis in Magento 2"}]},{"@type":"WebSite","@id":"https:\/\/cloudkul.com\/blog\/#website","url":"https:\/\/cloudkul.com\/blog\/","name":"Cloudkul","description":"Host your eCommerce Store on AWS with Optimized Performance","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/cloudkul.com\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/cloudkul.com\/blog\/#\/schema\/person\/5468024685361b49b2a71b63a119554b","name":"Vishwanath Acharya","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/cloudkul.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/249a5381871f8598d0966d406a74d102?s=96&d=https%3A%2F%2Fs.gravatar.com%2Favatar%2F6148c37469011bc2f8e491ca8f5de495%3Fs%3D80&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/249a5381871f8598d0966d406a74d102?s=96&d=https%3A%2F%2Fs.gravatar.com%2Favatar%2F6148c37469011bc2f8e491ca8f5de495%3Fs%3D80&r=g","caption":"Vishwanath Acharya"},"url":"https:\/\/cloudkul.com\/blog\/author\/vishwanathacharya-cloud336\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/cloudkul.com\/blog\/wp-json\/wp\/v2\/posts\/1145"}],"collection":[{"href":"https:\/\/cloudkul.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cloudkul.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cloudkul.com\/blog\/wp-json\/wp\/v2\/users\/43"}],"replies":[{"embeddable":true,"href":"https:\/\/cloudkul.com\/blog\/wp-json\/wp\/v2\/comments?post=1145"}],"version-history":[{"count":83,"href":"https:\/\/cloudkul.com\/blog\/wp-json\/wp\/v2\/posts\/1145\/revisions"}],"predecessor-version":[{"id":18209,"href":"https:\/\/cloudkul.com\/blog\/wp-json\/wp\/v2\/posts\/1145\/revisions\/18209"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/cloudkul.com\/blog\/wp-json\/wp\/v2\/media\/1697"}],"wp:attachment":[{"href":"https:\/\/cloudkul.com\/blog\/wp-json\/wp\/v2\/media?parent=1145"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cloudkul.com\/blog\/wp-json\/wp\/v2\/categories?post=1145"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cloudkul.com\/blog\/wp-json\/wp\/v2\/tags?post=1145"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}