nginx – Reduced resource consumption for ModSecurity
I recently learned and implemented ModSecurity with the OWASP CRS rule set. I am implementing ModSec integration on Nginx in a K8s environment. The problem I encountered was that the ModSec integration caused the Nginx pod to consume a lot of CPU and RAM. If there are a large number of requests (about 100,000 requests), CPU consumption can go up to 2 cores and RAM can go up to 2GB per pod.
I’m just using some rules related to SQLi and XSS, LFI.
I tried the configuration according to ModSecurity Performance Recommendations
but the result still does not reduce resource consumption too much.
Can someone tell me how to configure ModSec to reduce resource consumption? I would like each of my pods to only consume about 1 core and less than 2GB of RAM.
We look forward to your help and sincerely thank everyone for their comments!
Read more here: Source link
