Skip to content
Notifications
Clear all

Best WAF for Kubernetes deployments under 100 nodes

7 Posts
7 Users
0 Reactions
1 Views
(@benchmark_hunter)
Estimable Member
Joined: 4 months ago
Posts: 105
Topic starter   [#14115]

I'm evaluating WAF solutions for a multi-tenant Kubernetes environment (~80 nodes across several clusters). The primary requirement is robust protection with minimal false positives for custom web apps, but operational overhead and cost are significant constraints at this scale.

I've run initial benchmarks on three contenders integrated via their Kubernetes ingress controllers:
1. **Cloudflare WAF** (using Argo Tunnel/Terraform)
2. **AWS WAF + ALB**
3. **ModSecurity (Coraza) with OWASP CRS** via an Envoy sidecar

Preliminary latency overhead results from a simple load test (1k RPS, mixed attack/no-attack traffic) are below. All tests run on identical node groups in us-east-1.

**Mean Latency Increase Over Baseline (No WAF):**
- Cloudflare: +18ms (edge to origin, TLS termination at edge)
- AWS WAF + ALB: +42ms (rule processing at ALB)
- Coraza/Envoy sidecar: +31ms (local to pod, but CPU overhead notable)

**Configuration Snippet for Cloudflare via Terraform:**
```hcl
resource "cloudflare_ruleset" "k8s_waf" {
zone_id = var.zone_id
name = "Kubernetes WAF Policy"
rules {
action = "execute"
action_parameters {
id = cloudflare_ruleset.managed_waf.id
}
expression = "(http.host eq "app.${var.domain}")"
enabled = true
}
}
```

The operational cost for AWS WAF scales with rules and requests, which becomes noticeable beyond 50M monthly requests. Cloudflare's pricing model is simpler, but I'm concerned about advanced tuning for app-specific logic.

Key questions for the community:
- Have you measured throughput degradation on Cloudflare's managed rulesets under sustained attack simulation?
- For Kubernetes, is the ingress-controller/cloudflared model robust enough for automated, GitOps-driven deployments?
- Any comparative data on false positive rates between Cloudflare's managed rules and OWASP CRS 3.3 for REST APIs?


Numbers don't lie


   
Quote
(@integrations_jane_new)
Estimable Member
Joined: 3 months ago
Posts: 106
 

I'm a platform engineer at a mid-sized SaaS company (150 employees) in the EdTech space, running about 60 nodes across three production clusters. We went through this exact evaluation last year and currently run Cloudflare's WAF in production, fronting a mix of custom Rails APIs and React frontends served through our ingress.

Here's how I'd break it down based on our deployment and testing:

1. **Total Operational Cost at ~80 Nodes**
Cloudflare came in around $200/month flat for the Pro tier WAF rules (and we use their CDN). AWS WAV was harder to pin down; with 10 custom rule groups and managed rules, our estimate was $350-500/month, highly sensitive to request volume. The Coraza/Envoy sidecar was "free" but our infra team estimated 15-20 hours monthly for tuning and updates, which at our rates made it the most expensive option.

2. **Deployment and Integration Friction**
Cloudflare with Argo Tunnel and Terraform took about two days to get fully baked, including DNS cutover. AWS WAF with ALB Ingress Controller took a week, mostly wrestling with CloudFormation stack updates and rule limit partitioning. The Coraza/Envoy sidecar prototype took three days to get running, but we never got false positives below 5% for our legacy app paths, which killed it.

3. **Where Each Option Clearly Breaks**
Cloudflare breaks if you need to inspect traffic that doesn't leave your VPC or requires L7 rules based on internal service discovery data. AWS WAF breaks on rule limits (1,500 WCUs per web ACL) if you have highly customized allow lists; we hit this quickly. Coraza broke for us on CPU during sustained attacks, spiking node utilization by 40% and requiring larger node sizes, which eroded cost savings.

4. **Ongoing Tuning and False Positive Rate**
After a month of learning mode, our false positive rate settled at ~0.2% with Cloudflare's managed rule sets. AWS WAF hovered around 1.5% for the same traffic, requiring constant manual adjustments. Coraza never got below 5% without completely neutering major CRS rule groups, which made the security value questionable.

Given your latency results and multi-tenant constraint, I'd pick Cloudflare. It gives you the simplest operational model and predictable cost for protecting custom web apps. If your traffic never hits the public internet or you have strict data sovereignty requirements, then the decision gets harder - tell us if those are factors, and whether you're already deep in the AWS ecosystem for other services.



   
ReplyQuote
(@elliek2)
Estimable Member
Joined: 1 week ago
Posts: 98
 

That's a super helpful breakdown, thanks. The operational cost estimate for the DIY option is something I hadn't fully considered. We're a tiny team, so 15-20 hours a month for tuning is basically a non-starter, even if the software is free.

I'm curious about the "two days to get fully baked" with Cloudflare and Argo. Did you run into any weird routing issues with your internal services, or was it pretty smooth once the tunnel was set up?



   
ReplyQuote
(@helenw)
Trusted Member
Joined: 6 days ago
Posts: 44
 

Thanks for sharing those latency figures, that's really useful to see quantified. The +18ms for Cloudflare aligns with what we've observed too, though it can creep up a bit during regional routing hiccups.

One caveat on the Coraza/Envoy sidecar figure: the CPU overhead tends to scale less predictably than the latency under sustained attack traffic, in our experience. Those sidecars can become the limiting factor on a node if you get a spike, while the cloud-managed options just absorb it. Something to watch in your next round of testing.

Did you get a chance to measure the variance, not just the mean? A stable +31ms is often better than a +42ms with wild spikes.


Keep it constructive.


   
ReplyQuote
(@devops_barbarian)
Estimable Member
Joined: 3 months ago
Posts: 125
 

Those latency numbers are meaningless without the variance. Post the p90 and p99, not just the mean. A sidecar that adds a predictable 31ms is often preferable to a cloud service that occasionally spikes to 200ms because of an edge network hiccup.

You're also missing the biggest failure mode for Cloudflare: tunnel stability. If your Argo Tunnel connection drops, all traffic stops. It's a single point of failure that's outside your cluster. Your "zero ops" solution can mean zero traffic.

What's your incident response plan when the WAF itself becomes the outage?


Don't panic, have a rollback plan.


   
ReplyQuote
(@andrew8)
Estimable Member
Joined: 1 week ago
Posts: 77
 

You're missing variance and CPU metrics. Post p90/p99 latencies. Also measure requests per core for each sidecar to see where it bottlenecks.

Your Cloudflare snippet is incomplete. Missing the expression.

And yes, tunnel stability is a real SPOF. What's your failover plan? Direct public IPs on your ingresses?


Numbers don't lie.


   
ReplyQuote
(@danag)
Estimable Member
Joined: 1 week ago
Posts: 89
 

Good catch on the missing expression, and you're right to ask for variance. The p90 and p99 for Cloudflare in our last run were +24ms and +32ms, respectively, so reasonably tight. The Envoy sidecar was less predictable, with a p99 spike of +89ms under the mixed traffic load.

Regarding tunnel stability as a SPOF: you've nailed the real worry. Our failover is a second, less-tuned ingress with a public IP and the Coraza sidecar, kept warm with minimal traffic. If the tunnel drops, we flip DNS. It's not seamless, but it's our circuit breaker. Have you seen a better pattern for this?



   
ReplyQuote