Magento 2 Performance Benchmark https://download.litespeedtech.com/images/logos/litespeed/litespeed-logo.png 2019-11-19 16:23:40 Which loads Magento 2 faster via HTTP/2: LiteSpeed Web Server, nginx or Apache? We ran a series of Magento 2 HTTP/2 benchmarks, to compare LSWS + LiteMage, nginx + Varnish, and Apache + Varnish. LiteSpeed Magento 2 is 3X faster than nginx and 4X faster than Apache!

LiteMage Makes Magento 2
up to 4 Times Faster!

Magento 2 loads up faster with LiteSpeed Web Server + LiteMage than any other HTTP/2 server and cache solution!

We took LiteSpeed Web Server, nginx, and Apache, paired them with caching solutions, and tested how their HTTP/2 implementations compared when loading a Magento 2 shop with sample data. LiteSpeed Web Server with LiteMage Cache was up to 3 times faster than nginx with Varnish, and 4 times faster than Apache with Varnish.

Our verifiable results can be repeated following the methodology found on http2benchmark.org.


Summary

HTTP/2 Test Results

h2load -n 10000 -c 10 -t 1 -T 5 -m 10 -H 'Accept-Encoding: gzip,deflate' https://domain.com/magento/
Server Requests / Sec MB / Sec Failures Header Compression
LiteSpeed 9273.2 114.93 0 96.43%
Nginx 3337.1 42.69 0 20.56%
Apache 2429.7 30.47 0 96.22%

Please note: we usually run the h2load test with -c 100, but in this case there were too many errors occurring with nginx and Apache. We reduced -c to 10 for this reason.

LiteSpeed Web Server performs 3X faster than Nginx and 4X faster than Apache when loading Magento.

HTTP 1.1 Test Results

wrk -c 100 -t 1 -d 5s -H 'Accept-Encoding: gzip,deflate' https://domain.com/magento/
Server Requests / Sec MB / Sec Failures Header Compression
LiteSpeed 7638.61 98.06 N/A N/A
Nginx 2105.46 27.34 N/A N/A
Apache 3214.72 41.64 N/A N/A

LiteSpeed Web Server performs 4X faster than Nginx and 2X faster than Apache when loading Magento.


Test Environment

  • Softwares Tested:

    • LiteSpeed Web Server v5.4.1
    • LiteSpeed cache: LiteMage 2.1.3
    • Magento v2.3.2
    • nginx v1.16.1
    • Apache v2.4.41
    • Varnish 5.2.1
  • Setup:

    • LiteSpeed: LiteSpeed Web Server LiteMage
    • nginx: nginx (front proxy for HTTPS termination) Varnish nginx
    • Apache: nginx (front proxy for HTTPS termination) Varnish Apache
  • Client Machine:

    • Memory Size: 2GB
    • CPU number: 1
    • CPU Threads: 1
    • CPU Model: Virtual CPU 6db7dc0e7704
    • Disk: NVMe SSD
  • Server Machine:

    • Memory Size: 2GB
    • CPU number: 1
    • CPU Threads: 1
    • CPU Model: Virtual CPU 6db7dc0e7704
    • Disk: NVMe SSD
  • Network:

    • Traffic: 8.77 Gbits/sec
    • Latency: 0.377 ms

We welcome your feedback on our forum.