Skip to main content
Security Engine version:
Version: Next

WAF Component Benchmark

What the Application Security Component costs per request.

Test bed
InstanceAWS c6i.4xlarge, v1.8.2 — engine on 4 physical cores
CPUXeon Platinum 8375C @ 2.90 GHz
Hub206 vpatch rules, the full CRS

In-band time is measured using cs_appsec_inband_parsing_time_seconds.

Rule sets​

Rule setIn-bandOut-of-band
vpatchcrowdsecurity/virtual-patching-
CRScrowdsecurity/crs-inband-
vpatch + CRS out-of-bandcrowdsecurity/virtual-patchingcrowdsecurity/crs

Request processing time​

Measured inband rules evaluation time at a sustainable rate, 4 routines.

Rule setIn-band meanp50p95p99
vpatch0.233 ms0.33 ms1.39 ms2.15 ms
CRS1.058 ms1.15 ms3.44 ms5.57 ms

Throughput ceiling​

Rule set4 routines8 routinesEngine busy at 8CPU per request
vpatch13 317 req/s16 030 req/s98%0.491 ms
CRS3 377 req/s4 287 req/s99%1.855 ms

Scaling with routines​

RoutinesvpatchCRS
15 8921 199
28 577 (1.46x)2 114 (1.76x)
413 317 (2.26x)3 377 (2.82x)
816 030 (2.72x)4 287 (3.58x)
1615 679 (2.66x)4 059 (3.38x)

These are saturation ceilings. Don't set routines above the cores you give the engine, they will just make each other slower.

Request bodies​

In-band mean, 4 routines, urlencoded form bodies:

Rule setclean GETPOST 1 KBPOST 4 KBPOST 16 KB
vpatch0.287 ms0.384 ms0.416 ms0.500 ms
CRS1.167 ms7.27 ms21.8 ms79.5 ms

The cost of processing request bodies with CRS is significantly higher than with vpatch rules.

Cost of malicious traffic​

Same GET stream with 10% attack payloads, 4 routines:

Rule setClean10% maliciousIn-band meanBlocked
vpatch13 31712 856 req/s (-3%)0.287 → 0.285 ms2.1%
CRS3 3772 816 req/s (-16%)1.167 → 1.235 ms9.4%

In-band or out-of-band​

Out-of-band rules run after the verdict is returned: the client never waits, and the triggering request is not blocked. All three at a fixed 2 000 req/s, 4 routines:

ConfigIn-bandOut-of-bandp95p99Engine busy
vpatch in-band0.229 ms-0.56 ms1.11 ms11%
CRS in-band1.087 ms-4.13 ms6.22 ms36%
vpatch + CRS out-of-band0.291 ms1.201 ms1.69 ms4.04 ms48%
warning

Out-of-band evaluation is bounded by a queue. If it fills, requests are skipped silently and your out-of-band rules stop seeing traffic. Watch cs_appsec_outofband_dropped_total.

Sizing guidance​

  1. Run virtual patching in-band unconditionally (0.23 ms). CRS in-band suits GET-heavy traffic only; out-of-band costs you blocking on the first request.
  2. Divide routines by your own in-band time for your ceiling.
  3. Set routines to the cores you give the engine, no more.
  4. Per physical core: 1 000 CRS req/s, 4 000 vpatch.
  5. Add headroom for remediation: blocked requests cost more than finding them.

Reproducing​

Harness, seeded request-stream generator and raw per-run CSVs: crowdsec-benchmark.

CrowdSec Docs
We use cookies

This site uses cookies to help us improve your experience. You can accept or decline below.