Comparing Varnish and Redis with Magento 2 using JMeter

Updated 1 September 2023

What is JMeter?

JMeter is an open-source, Java-based performance testing tool developed by the Apache Software Foundation.

It is primarily used for load testing and measuring the performance of web applications, APIs, and other server-based applications.

JMeter can simulate various user behaviors and generate a large number of concurrent requests to test the performance, scalability, and reliability of a system.

To know more about Jmeter and its installation follow this link

Benefits of using JMeter

1- Cross-Platform Compatibility: It is a Java-based tool, which means it can run on various operating systems, including Windows, macOS, and Linux.

2- User-Friendly Interface: Jmeter has a user-friendly interface that simplifies the process of creating test plans, configuring test scenarios, etc.

3- Versatility: 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.

4- Scalability Testing: With the help of jmeter we can simulate hundreds or thousands of virtual users to test how your application performs under different load levels.

JMeter Testing Usecase

In our use case, first, we tested the Magento 2 server with the Varnish service and then we tested with the Redis service as well to have a detailed comparison.
Where we tested using 3 scenarios –

  1. With the virtual traffic of 100 concurrent users.
  2. With the virtual traffic of 300 concurrent users.
  3. With the virtual traffic of 450 concurrent users.

On the basis of the above-mentioned scenarios, we have shared our findings.

What is Varnish?

Varnish is a high-performance, open-source HTTP accelerator and caching reverse proxy.

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.

Using Magento 2 with Varnish including the Jmeter Test Result

Case I – We had a virtual traffic of 100 concurrent users

Result – In this case 100% of requests were successful.

Case 2 – We had a virtual traffic of 300 concurrent users

Result – In this case, 88.34% of requests were successfully passed but 11.66% of requests got failed.

Case 3 – We had a virtual traffic of 450 concurrent users

Result – In this case, 75.12% of requests were successfully passed but 24.88% of requests got failed.

What is Redis?

Redis can be used as a cache to improve the performance of applications by storing frequently accessed data in memory.

As an in-memory data store, Redis excels at caching due to its high read and write speeds.

Using Magento 2 with Redis including the Jmeter Test Result

Case I – We had a virtual traffic of 100 concurrent users

Result – In this case 100% of requests were successful.

Case 2 – We had a virtual traffic of 300 concurrent users

Result – In this case, 63.67% of requests were successfully passed but 36.33% of requests got failed.

But in this case, varnish performed better as only 11.66% of requests failed while tested with vanish.

Case 3 – We had a virtual traffic of 450 concurrent users

Result – In this case, 64.89% of requests were successfully passed but 35.11% of requests got failed.

But in this case, varnish performed better as only 24.88% of requests failed.

Conclusion

In conclusion, testing Magento with Redis and Varnish caching mechanisms has provided valuable insights into their performance and effectiveness in improving the overall speed and responsiveness of the Magento application.

In terms of performance, Varnish generally outperformed Redis when it came to handling static content caching, providing exceptional speed and scalability. However, both caching mechanisms have their strengths and serve different purposes.

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.

Need Support?

Thank You for reading this Blog!

For further more interesting blogs, keep in touch with us. If you need any kind of support, simply raise a ticket at https://webkul.uvdesk.com/en/.

You may also visit our Odoo development services and quality Odoo Extensions.

For further help or queries, please contact us or raise a ticket.

author
. . .

Leave a Comment

Your email address will not be published. Required fields are marked*


Be the first to comment.

Start a Project






    Message Sent!

    If you have more details or questions, you can reply to the received confirmation email.

    Back to Home