You Don't Need a WAF (Yet)
$0 until requests change something the number that matters here
By Stan K.
A static site behind Cloudflare Free plus ten lines of nginx rate limiting carries real traffic at $0 — DDoS absorption included, unlimited requests. A WAF earns its price only when dynamic endpoints with users show up. The honest thresholds for when to start paying.
The shipping reflex is to bolt a WAF onto everything. But most things shipped are static: a built site, files, an origin that cannot be injected into because there is nothing to inject into. For that world, $0 is not a compromise — it is the correctly-sized answer. And the moment it stops being enough is knowable in advance.
The $0 tier, honestly specified
Static site proxied through Cloudflare Free: unmetered DDoS absorption on layers 3, 4 and 7 (official language: “unmetered and unlimited… to all customers on all plans”), the Free Managed Ruleset, 5 custom rules, 1 rate-limiting rule, Turnstile, and AI-bot blocking. Nothing in that stack bills per request — it holds at 50K requests a month and at 50M.
For anything self-hosted, nginx limit_req adds a last line of defense at the same price. The documented behavior is a per-key leaky bucket — nginx “limits the request processing rate per a defined key” and “excessive requests are terminated”:
limit_req_zone $binary_remote_addr zone=api:10m rate=10r/s;
server {
location /api/ {
limit_req zone=api burst=20 nodelay;
limit_req_status 429;
}
}
What nginx cannot stop (our analysis, consistent with the module’s per-key design — not an nginx-documented limit): volumetric L3/L4 floods (the pipe dies before a request reaches nginx), distributed low-and-slow campaigns where every IP stays politely under the rate, and NAT collateral (one office IP shares one bucket, and humans start eating 429s). The first case is exactly what Cloudflare Free in front absorbs — a flood stopped at the edge is a flood your server never sees.
What actually triggers “now I need a WAF”
Not traffic. Features. The honest thresholds:
- A login or session exists — you need real rate-limiting windows: Pro at $20/mo billed annually brings the full Managed Ruleset, OWASP Core, two rate rules and 1-minute windows.
- A POST mutates state — payments, databases, user data: managed OWASP protections start earning their keep.
- You need regex or 100 rules — Business, $200/mo billed annually.
- Raw TCP/UDP attack surface — Spectrum or Magic Transit, Enterprise quotes.
- You must insure against attack-driven scaling bills — the cost-protection credits exist in exactly one product: Shield Advanced, $3,000/mo with a 1-year commitment and a paid Support plan attached.
- You need bot analytics, not just bot blocking — Bot Management, an Enterprise add-on with no published price.
The order we would actually spend
$0 (Cloudflare Free + nginx) until the first dynamic endpoint. $20/month (Pro) when users and sessions arrive — the entire realistic spend for most working APIs. $39–89/month on AWS WAF if your stack already lives there and per-rule metering fits. $200/month for regex. Everything above that — Shield Advanced, Imperva, Akamai, Fastly quotes — is procurement, not self-serve engineering.
Ask one question: can a request change anything on the server? If every answer is “it just reads files”, you need a CDN and a rate limit, not a WAF. The day the first POST writes a database row for a logged-in user is the day $20/month becomes obviously cheap. Before signing anything meter-based, read WAF Fine-Print Traps — CAPTCHA actions and WCU surcharges move bills without traffic moving. The full pricing tables are in the API Security hub.