{"id":15765,"date":"2023-08-29T05:20:13","date_gmt":"2023-08-29T05:20:13","guid":{"rendered":"https:\/\/cloudkul.com\/blog\/?p=15765"},"modified":"2024-11-15T12:23:22","modified_gmt":"2024-11-15T12:23:22","slug":"comparing-varnish-and-redis-with-magento-2-using-jmeter","status":"publish","type":"post","link":"https:\/\/cloudkul.com\/blog\/comparing-varnish-and-redis-with-magento-2-using-jmeter\/","title":{"rendered":"Comparing Varnish and Redis with Magento 2 using JMeter"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\"><strong>What is JMeter?<\/strong><\/h2>\n\n\n\n<p class=\"has-text-align-left\"><a href=\"https:\/\/cloudkul.com\/blog\/apache-jmeter-installation-and-overview\/\">JMeter is an open-source<\/a>, Java-based performance testing tool developed by the Apache Software Foundation. <\/p>\n\n\n\n<p class=\"has-text-align-left\">It is primarily used for load testing and measuring the performance of web applications, APIs, and other server-based applications.<\/p>\n\n\n\n<p class=\"has-text-align-left\">JMeter can simulate various user behaviors and generate a large number of concurrent requests to test the performance, scalability, and reliability of a system.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Benefits of using JMeter<\/h2>\n\n\n\n<p>1- <strong>Cross-Platform Compatibility: <\/strong>It is a Java-based tool, which means it can run on various operating systems, including Windows, macOS, and Linux.<\/p>\n\n\n\n<p>2- <strong>User-Friendly Interface:<\/strong> Jmeter has a user-friendly interface that simplifies the process of creating test plans, configuring test scenarios, etc.<\/p>\n\n\n\n<p>3- <strong>Versatility:<\/strong> It is not only limited to web applications, it can also be used to test various types of protocols such as HTTP, HTTPS, FTP, JDBC, JMS, LDAP, and more.<\/p>\n\n\n\n<p>4- <strong>Scalability Testing:<\/strong> With the help of jmeter we can simulate hundreds or thousands of virtual users to test how your application performs under different load levels.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">JMeter Testing Usecase <\/h2>\n\n\n\n<p>In our use case, first, we tested the <a href=\"https:\/\/cloudkul.com\/blog\/configure-varnish-and-redis-magento-2\/\">Magento 2 server with the Varnish service<\/a> and then we tested <a href=\"https:\/\/cloudkul.com\/blog\/configure-varnish-and-redis-magento-2\/\">Magento 2 with the Redis service <\/a>as well to have a detailed comparison.<\/p>\n\n\n\n<p>Where we tested using 3 scenarios &#8211;<\/p>\n\n\n\n<ol>\n<li>With the virtual traffic of 100 concurrent users.<\/li>\n\n\n\n<li>With the virtual traffic of 300 concurrent users.<\/li>\n\n\n\n<li>With the virtual traffic of 450 concurrent users.<\/li>\n<\/ol>\n\n\n\n<p>Based on the above-mentioned scenarios, we have shared our findings.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>What is Varnish?<\/strong><\/h2>\n\n\n\n<p><a href=\"https:\/\/cloudkul.com\/features\/varnish-integration\/\">Varnish is a high-performance,<\/a> open-source HTTP accelerator and caching reverse proxy. <\/p>\n\n\n\n<p>It is designed to improve the speed and scalability of web applications by caching frequently accessed content and serving it directly from memory, reducing the load on backend servers.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Using Magento 2 with Varnish including the Jmeter Test Result<\/h3>\n\n\n\n<p><strong>Case I &#8211;<\/strong> We had a virtual traffic of 100 concurrent users<\/p>\n\n\n\n<p><strong>Result &#8211;<\/strong> In this case 100% of requests were successful.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2023\/08\/varnish100.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"506\" src=\"https:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2023\/08\/varnish100-1024x506.png\" alt=\"test\" class=\"wp-image-16412\"\/><\/a><\/figure>\n\n\n\n<p><strong>Case 2<\/strong> &#8211; We had a virtual traffic of 300 concurrent users<\/p>\n\n\n\n<p><strong>Result &#8211; <\/strong>In this case, 88.34% of requests were successfully passed but 11.66% of requests got failed.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2023\/08\/varnish300.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"501\" src=\"https:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2023\/08\/varnish300-1024x501.png\" alt=\"failed\" class=\"wp-image-16413\"\/><\/a><\/figure>\n\n\n\n<p><strong>Case 3<\/strong> &#8211; We had a virtual traffic of 450 concurrent users<\/p>\n\n\n\n<p><strong>Result &#8211; <\/strong>In this case, 75.12% of requests were successfully passed but 24.88% of requests got failed.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2023\/08\/varnish450.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"497\" src=\"https:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2023\/08\/varnish450-1024x497.png\" alt=\"failed\" class=\"wp-image-16414\"\/><\/a><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>What is Redis?<\/strong><\/h2>\n\n\n\n<p>Redis can be used as a cache to improve the performance of applications by storing frequently accessed data in memory. <\/p>\n\n\n\n<p>As an in-memory data store, Redis excels at caching due to its high read and write speeds.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Using Magento 2 with Redis including the Jmeter Test Result<\/h3>\n\n\n\n<p><strong>Case I<\/strong> &#8211; We had a virtual traffic of 100 concurrent users<\/p>\n\n\n\n<p><strong>Result &#8211;<\/strong> In this case 100% of requests were successful.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><a href=\"https:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2023\/08\/redis100.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"506\" src=\"https:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2023\/08\/redis100-1024x506.png\" alt=\"passed\" class=\"wp-image-16416\" style=\"width:840px;height:415px\"\/><\/a><\/figure>\n\n\n\n<p><strong>Case 2<\/strong> &#8211; We had a virtual traffic of 300 concurrent users<\/p>\n\n\n\n<p><strong>Result &#8211;<\/strong> In this case, 63.67% of requests were successfully passed but 36.33% of requests got failed.<\/p>\n\n\n\n<p>But in this case, varnish performed better as only 11.66% of requests failed while tested with varnish.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2023\/08\/redis300.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"514\" src=\"https:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2023\/08\/redis300-1024x514.png\" alt=\"fail\" class=\"wp-image-16417\"\/><\/a><\/figure>\n\n\n\n<p><strong>Case 3<\/strong> &#8211; We had a virtual traffic of 450 concurrent users<\/p>\n\n\n\n<p><strong>Result &#8211;<\/strong> In this case, 64.89% of requests were successfully passed but 35.11% of requests got failed.<\/p>\n\n\n\n<p>But in this case, varnish performed better as only 24.88% of requests failed.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2023\/08\/redis450.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"497\" src=\"https:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2023\/08\/redis450-1024x497.png\" alt=\"fail\" class=\"wp-image-16418\"\/><\/a><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p>In conclusion, testing Magento with Redis and Varnish has shown significant improvements in speed and responsiveness, highlighting their effectiveness in optimizing performance.<\/p>\n\n\n\n<p>In terms of performance, Varnish generally outperformed Redis when it came to handling static content caching, providing exceptional speed and scalability. <\/p>\n\n\n\n<p>However, both caching mechanisms have their strengths and serve different purposes.<\/p>\n\n\n\n<p>Regular monitoring and testing are essential to fine-tune the caching setup and ensure it continues to meet the evolving needs of the application and its users.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Need Support?<\/h2>\n\n\n\n<p>Thank You for reading this Blog!<\/p>\n\n\n\n<p>For further more interesting blogs, keep in touch with us. If you need any kind of support, simply raise a ticket at&nbsp;<strong><a href=\"https:\/\/webkul.uvdesk.com\/en\/\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/webkul.uvdesk.com\/en\/<\/a>.<\/strong><\/p>\n\n\n\n<p>You may also visit our Odoo development services and quality\u00a0<strong><a href=\"https:\/\/store.webkul.com\/Odoo.html\">Odoo Extensions<\/a><\/strong>.<\/p>\n\n\n\n<p><strong>For further help or queries, please&nbsp;<a href=\"https:\/\/cloudkul.com\/contact\/\">contact<\/a>&nbsp;us or raise a&nbsp;<a href=\"https:\/\/webkul.uvdesk.com\/en\/customer\/create-ticket\/\">ticket<\/a>.<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>What is JMeter? JMeter is an open-source, Java-based performance testing tool developed by the Apache <a class=\"text-primary\" title=\"read more\" href=\"https:\/\/cloudkul.com\/blog\/comparing-varnish-and-redis-with-magento-2-using-jmeter\/\">[&#8230;]<\/a><\/p>\n","protected":false},"author":38,"featured_media":0,"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":[159,856,243,858,857,24,27,620,855],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Comparing Varnish and Redis with Magento 2 using JMeter - Cloudkul<\/title>\n<meta name=\"description\" content=\"JMeter is an open-source, Java-based performance testing tool developed by the Apache Software Foundation.\" \/>\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\/comparing-varnish-and-redis-with-magento-2-using-jmeter\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Comparing Varnish and Redis with Magento 2 using JMeter - Cloudkul\" \/>\n<meta property=\"og:description\" content=\"JMeter is an open-source, Java-based performance testing tool developed by the Apache Software Foundation.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/cloudkul.com\/blog\/comparing-varnish-and-redis-with-magento-2-using-jmeter\/\" \/>\n<meta property=\"og:site_name\" content=\"Cloudkul\" \/>\n<meta property=\"article:published_time\" content=\"2023-08-29T05:20:13+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-11-15T12:23:22+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2023\/08\/varnish100-1024x506.png\" \/>\n<meta name=\"author\" content=\"Saransh Gupta\" \/>\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\/comparing-varnish-and-redis-with-magento-2-using-jmeter\/\",\"url\":\"https:\/\/cloudkul.com\/blog\/comparing-varnish-and-redis-with-magento-2-using-jmeter\/\",\"name\":\"Comparing Varnish and Redis with Magento 2 using JMeter - Cloudkul\",\"isPartOf\":{\"@id\":\"https:\/\/cloudkul.com\/blog\/#website\"},\"datePublished\":\"2023-08-29T05:20:13+00:00\",\"dateModified\":\"2024-11-15T12:23:22+00:00\",\"author\":{\"@id\":\"https:\/\/cloudkul.com\/blog\/#\/schema\/person\/192dfa8a1a34baf98d1dcd9b9f2cbdb4\"},\"description\":\"JMeter is an open-source, Java-based performance testing tool developed by the Apache Software Foundation.\",\"breadcrumb\":{\"@id\":\"https:\/\/cloudkul.com\/blog\/comparing-varnish-and-redis-with-magento-2-using-jmeter\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/cloudkul.com\/blog\/comparing-varnish-and-redis-with-magento-2-using-jmeter\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/cloudkul.com\/blog\/comparing-varnish-and-redis-with-magento-2-using-jmeter\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/cloudkul.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Comparing Varnish and Redis with Magento 2 using JMeter\"}]},{\"@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\/192dfa8a1a34baf98d1dcd9b9f2cbdb4\",\"name\":\"Saransh Gupta\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/cloudkul.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/90cd23bb6492ae259a2882d76832579a?s=96&d=https%3A%2F%2Fs.gravatar.com%2Favatar%2F6148c37469011bc2f8e491ca8f5de495%3Fs%3D80&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/90cd23bb6492ae259a2882d76832579a?s=96&d=https%3A%2F%2Fs.gravatar.com%2Favatar%2F6148c37469011bc2f8e491ca8f5de495%3Fs%3D80&r=g\",\"caption\":\"Saransh Gupta\"},\"url\":\"https:\/\/cloudkul.com\/blog\/author\/saranshgupta-cloud712\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Comparing Varnish and Redis with Magento 2 using JMeter - Cloudkul","description":"JMeter is an open-source, Java-based performance testing tool developed by the Apache Software Foundation.","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\/comparing-varnish-and-redis-with-magento-2-using-jmeter\/","og_locale":"en_US","og_type":"article","og_title":"Comparing Varnish and Redis with Magento 2 using JMeter - Cloudkul","og_description":"JMeter is an open-source, Java-based performance testing tool developed by the Apache Software Foundation.","og_url":"https:\/\/cloudkul.com\/blog\/comparing-varnish-and-redis-with-magento-2-using-jmeter\/","og_site_name":"Cloudkul","article_published_time":"2023-08-29T05:20:13+00:00","article_modified_time":"2024-11-15T12:23:22+00:00","og_image":[{"url":"https:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2023\/08\/varnish100-1024x506.png"}],"author":"Saransh Gupta","twitter_card":"summary_large_image","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/cloudkul.com\/blog\/comparing-varnish-and-redis-with-magento-2-using-jmeter\/","url":"https:\/\/cloudkul.com\/blog\/comparing-varnish-and-redis-with-magento-2-using-jmeter\/","name":"Comparing Varnish and Redis with Magento 2 using JMeter - Cloudkul","isPartOf":{"@id":"https:\/\/cloudkul.com\/blog\/#website"},"datePublished":"2023-08-29T05:20:13+00:00","dateModified":"2024-11-15T12:23:22+00:00","author":{"@id":"https:\/\/cloudkul.com\/blog\/#\/schema\/person\/192dfa8a1a34baf98d1dcd9b9f2cbdb4"},"description":"JMeter is an open-source, Java-based performance testing tool developed by the Apache Software Foundation.","breadcrumb":{"@id":"https:\/\/cloudkul.com\/blog\/comparing-varnish-and-redis-with-magento-2-using-jmeter\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/cloudkul.com\/blog\/comparing-varnish-and-redis-with-magento-2-using-jmeter\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/cloudkul.com\/blog\/comparing-varnish-and-redis-with-magento-2-using-jmeter\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/cloudkul.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Comparing Varnish and Redis with Magento 2 using JMeter"}]},{"@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\/192dfa8a1a34baf98d1dcd9b9f2cbdb4","name":"Saransh Gupta","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/cloudkul.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/90cd23bb6492ae259a2882d76832579a?s=96&d=https%3A%2F%2Fs.gravatar.com%2Favatar%2F6148c37469011bc2f8e491ca8f5de495%3Fs%3D80&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/90cd23bb6492ae259a2882d76832579a?s=96&d=https%3A%2F%2Fs.gravatar.com%2Favatar%2F6148c37469011bc2f8e491ca8f5de495%3Fs%3D80&r=g","caption":"Saransh Gupta"},"url":"https:\/\/cloudkul.com\/blog\/author\/saranshgupta-cloud712\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/cloudkul.com\/blog\/wp-json\/wp\/v2\/posts\/15765"}],"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\/38"}],"replies":[{"embeddable":true,"href":"https:\/\/cloudkul.com\/blog\/wp-json\/wp\/v2\/comments?post=15765"}],"version-history":[{"count":66,"href":"https:\/\/cloudkul.com\/blog\/wp-json\/wp\/v2\/posts\/15765\/revisions"}],"predecessor-version":[{"id":18649,"href":"https:\/\/cloudkul.com\/blog\/wp-json\/wp\/v2\/posts\/15765\/revisions\/18649"}],"wp:attachment":[{"href":"https:\/\/cloudkul.com\/blog\/wp-json\/wp\/v2\/media?parent=15765"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cloudkul.com\/blog\/wp-json\/wp\/v2\/categories?post=15765"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cloudkul.com\/blog\/wp-json\/wp\/v2\/tags?post=15765"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}