BenchmarkModSecurity

ModSecurity Performance in Apache nginx LiteSpeed

We wanted to know how ModSecurity impacts server performance, so we tested ModSecurity implementations on HTTP/2 from LiteSpeed, nginx, and Apache, to see how they would compare under a variety of conditions, and using either Comodo or OWASP rulesets.

Key results

At A Glance

Overview

When loading a Dynamic PHP file with ModSecurity enabled, LiteSpeed Enterprise beats nginx by up to 13X, while Apache loses to LiteSpeed Enterprise by nearly 6X!

Result

LiteSpeed Enterprise performs 13X faster than nginx and 6X faster than Apache with ModSecurity enabled when loading Dynamic PHP files.

Overview

When loading a Static HTML file with ModSecurity enabled, LiteSpeed Enterprise beats nginx by a remarkable 179X with Comodo rules! Apache loses to LiteSpeed Enterprise by over 33X.

Result

LiteSpeed Enterprise performs more than 123X faster than nginx and more than 33X faster than Apache with ModSecurity enabled when loading Static HTML.

Overview

When loading a Cached WordPress Front Page with ModSecurity enabled, LiteSpeed Enterprise beats nginx by an exceptional 220X with Comodo rules! Apache loses to LiteSpeed Enterprise by over 74X.

Result

LiteSpeed Enterprise performs over 143X faster than nginx and 74X faster than Apache with ModSecurity enabled when loading Cached WordPress.

Published benchmark · interactive view

Dynamic PHP with ModSecurity

Choose a metric to compare the results.

HIGHEST RESULT11685Litespeed Enterprise v5.4.2
No WAF0 — 11685
Litespeed Enterprise v5.4.2
11685
OpenLitespeed v1.6.4
8997
Nginx v1.17.6
8941
Apache v2.4.41
2618
1.3× vs OpenLitespeed v1.6.4 on this metricView source and methodology ↗
ServerNo WAFWAF with OWASPWAF with Comodo
Litespeed Enterprise v5.4.21168558244698
OpenLitespeed v1.6.48997806403
Nginx v1.17.68941439351
Apache v2.4.4126181021968
Published benchmark · interactive view

Static HTML with ModSecurity

Choose a metric to compare the results.

HIGHEST RESULT66321Litespeed Enterprise v5.4.2
No WAF0 — 66321
Litespeed Enterprise v5.4.2
66321
OpenLitespeed v1.6.4
52562
Nginx v1.17.6
24263
Apache v2.4.41
5200
1.3× vs OpenLitespeed v1.6.4 on this metricView source and methodology ↗
ServerNo WAFWAF with OWASPWAF with Comodo
Litespeed Enterprise v5.4.2663216151166573
OpenLitespeed v1.6.4525624669440753
Nginx v1.17.624263497371
Apache v2.4.41520012591967
Published benchmark · interactive view

Cached WordPress with ModSecurity

Choose a metric to compare the results.

HIGHEST RESULT37929Litespeed Enterprise v5.4.2
No WAF0 — 37929
Litespeed Enterprise v5.4.2
37929
OpenLitespeed v1.6.4
14980
Nginx v1.17.6
5410
Apache v2.4.41
808
2.5× vs OpenLitespeed v1.6.4 on this metricView source and methodology ↗
ServerNo WAFWAF with OWASPWAF with Comodo
Litespeed Enterprise v5.4.2379293824841020
OpenLitespeed v1.6.4149801503015649
Nginx v1.17.65410267186
Apache v2.4.41808515521
Methodology

Test Environment

Figures as published by LiteSpeed Technologies. Results depend on hardware, configuration and workload — test with your own application for the most relevant numbers.

  • Server Tested: LiteSpeed Enterprise v5.4.2 OpenLiteSpeed v1.6.4 Nginx v1.17.6 + Nginx ModSecurity connector v1.0.1 Apache v2.4.41
  • ModSecurity Rulesets Tested: OWASP ModSecurity Core Rule Set Comodo
  • Server/Client Machine: Memory Size: 1GB CPU number: 1 CPU Threads: 1 CPU Model: 3.8Ghz 6th Generation Disk: NVMe SSD
  • ModSecurity Setup: LiteSpeed Enterprise: LiteSpeed Enterprise + Internal ModeSecurity Engine OpenLiteSpeed: OpenLiteSpeed + ModSecurity engine v3.0.4 Nginx: Nginx + Nginx ModSecurity connector + ModSecurity engine v3.0.3 Apache: Apache + ModSecurity engine v2.9.2
  • Cloud VM: Vultr High Frequency Compute 1GB VM
  • Network: Traffic: 10 Gbits/sec
Ready when you are

Switch to LiteSpeed
in minutes.

Choose your edition, activate over SSH, and start serving faster. Transparent pricing, no setup fees, engineers on call 24/7.

Instant delivery15-day trialFree migrationSupport 24/7