Skip to content

Compared with vendors

For Envoy, APISIX, Kong and other gateways you run yourself, see Why a custom proxy.

Why run this proxy if you already have Cloudflare, AWS WAF + CloudFront, Azure Front Door, Google Cloud Armor, Fastly or Akamai?

Don't run it instead of a vendor. Run it behind one when you need application policy the vendors offer only through custom edge code or Enterprise add-ons:

  • exact rate limits shared by every node
  • limits keyed on a verified identity
  • a header contract with your services
  • tested, canaried policy changes owned by the application team

If none of those matter, a vendor alone is simpler.

Mark Meaning
โœ“ Native
โ— Partial, or only on a tier or add-on
๐Ÿ›  Only by writing edge code (Workers, Lambda@Edge, VCL, EdgeWorkers, Service Extensions)
โœ— Not available
? The vendor's docs neither confirm nor rule it out

Vendor marks link to the vendor's documentation. AFD is Azure Front Door Standard/Premium with WAF. GCA is Google Cloud Armor with Cloud Load Balancing.

Rate limiting

Capability Proxy Cloudflare AWS AFD GCA Fastly Akamai
Exact quota across all nodes โœ“ โœ— per data centre โœ— approximate โœ— per server โœ— per region โœ— per POP โ— per node or region
Algorithms โœ“ 4 โ— undocumented โ— estimate, 60 to 600s โ— fixed, 1 or 5 min โœ“ โ— 1, 10, 60s โœ“
Key: IP, header, cookie, query โœ“ โ— IP; rest Enterprise โœ“ โ— IP, geo โ— no query โ— IP, User-Agent โœ“
Key: ASN, country โœ“ โ— Enterprise โ— ASN โ— geo โœ“ ๐Ÿ›  โ— condition only
Key: verified JWT claim โœ“ โ— Enterprise โœ— โœ— โœ— ๐Ÿ›  โœ—
Penalty after exceeding โœ“ โœ“ โœ— โ— rest of window โœ“ โœ“ โœ“
Log-only mode โœ“ โ— Enterprise โœ“ โœ“ โœ“ โœ“ โœ“
Chosen behaviour when counting fails โœ“ ? โ— fails open ? ? โ— in your code ?
Per-IP backstop โœ“ โ— DDoS only โ— paid โ— Premium โ— Enterprise โ— add-on โ— add-on
Retry-After, RateLimit headers โœ“ โ— Retry-After โ— static ? โœ— ๐Ÿ›  โ— static

Auth, CORS, headers, responses

Capability Proxy Cloudflare AWS AFD GCA Fastly Akamai
JWT validation per route โœ“ โ— Enterprise ๐Ÿ›  โœ— ๐Ÿ›  ๐Ÿ›  โ— API Gateway
CORS preflight answered at the edge โœ“ ๐Ÿ›  โ— headers only โ— headers only โ— ๐Ÿ›  โ—
CORS Vary: Origin, upstream headers replaced โœ“ โ— โ— โ— ? ๐Ÿ›  ?
Header set, append, remove โœ“ โ— no append ๐Ÿ›  โœ“ โœ“ โœ“ โœ“
Header copy, rename โœ“ โœ— ๐Ÿ›  โ— โœ— ๐Ÿ›  โ—
Forward only listed headers โœ“ โœ— โœ“ โœ— โœ— ๐Ÿ›  ?
Client can't spoof edge headers โœ“ โ— cf-* only โ— โ— x-fd-* only โ— ๐Ÿ›  ?
Header values from verified claims โœ“ โ— Enterprise ๐Ÿ›  โœ— โœ— ๐Ÿ›  โ— unverified
CR/LF stripped from values โœ“ ? ? ? โ— ? ?
Locale from Accept-Language โœ“ โ— no matching ๐Ÿ›  โœ— ๐Ÿ›  ๐Ÿ›  ๐Ÿ› 
Templated error responses โœ“ โ— fixed tokens โ— static โ— one body โ— static ๐Ÿ›  โœ“
Path normalized before matching โœ“ โœ“ โ— โ— decode only โ— ๐Ÿ›  โœ“ opt-in

Rules and change safety

Capability Proxy Cloudflare AWS AFD GCA Fastly Akamai
Rule language โœ“ โœ“ โœ“ JSON โœ“ JSON โœ“ CEL โœ“ VCL โœ“ JSON
Validated before activation โœ“ ? ? ? ? โ— VCL ?
Config tests block a bad publish โœ“ โ— Trace โœ— โœ— โœ— โ— simulator ?
Versions and revert โœ“ โ— Enterprise โœ— โœ— โœ— โœ“ โœ“
Canary of rule changes โœ“ โ— Enterprise โ— up to 15% โœ— โœ— โ— not NGWAF โœ“
Automatic rollback on errors โœ“ โœ— โœ— โœ— โœ— โœ— โ— during rollout
Audit log โœ“ โœ“ โœ“ ? โœ“ โœ“ ?
Vendor neutral โœ“ โ— Terraform โ— โ— Terraform โ— โ— Terraform โ— Terraform

Perimeter

The proxy does none of this by design. Keep a vendor in front.

Capability Proxy Cloudflare AWS AFD GCA Fastly Akamai
OWASP managed rules โœ— โ— from Pro โœ“ โ— Premium โœ“ โ— by tier โœ“
Bot management โœ— โ— by plan โ— paid โ— Premium โ— โ— add-on โ— add-on
Volumetric DDoS โœ— โœ“ โœ“ โœ“ โœ“ โ— โœ“
Client TLS โœ— โœ“ โœ“ โœ“ โœ“ โœ“ โœ“

Added latency. Vendors run their rules in the POP the request already reaches. The proxy adds one network hop, plus one pipelined Valkey round trip when a rate-limit rule matches. Its own in-process work on the allow path is about 5 ยตs (BenchmarkAllowPath, no network). On a shared 2 vCPU machine the load tests measured an added p99 of 1.9 to 3.9 ms at 300 RPS.

Where each side wins

Vendors:

  • The perimeter: OWASP rules, bots, volumetric DDoS, TLS and anycast at global scale.
  • Nothing extra to run: no hop, no fleet, no Valkey, no admin service or Postgres.
  • Mature change management on some platforms: Akamai's staging network and phased rollout, Fastly's versioned services.

The proxy:

  • Exact, shared quotas. Every vendor counts per POP, server or region, and AWS, Cloudflare and Google say not to rely on it for precise limits. "5 logins per minute" means exactly 5 here.
  • Limits on verified identity. Only Cloudflare Enterprise with API Shield does this natively.
  • Explicit failure behaviour: open, closed or local, chosen per rule.
  • An upstream header contract that clients can't spoof, without edge code.
  • One policy model across clouds. Moving CDN means changing the trust preset, not rewriting rules.
  • Tested changes: a failing config test blocks publish, and the canary and guard roll back degraded policy.

Both: basic IP rate limits with penalties and log-only mode, custom error bodies, static CORS headers, simple header edits and path normalization. If your needs stop there, a vendor alone is simpler and cheaper.

Decision guide

Your situation Use
Public site, approximate limits are fine, one vendor Vendor only
Exact per-user or per-tenant quotas, or limits on verified identity Vendor in front, plus this proxy
Several clouds or CDNs, or a planned migration Vendor in front, plus this proxy as the portable policy layer
Application teams own policy and need tests, canaries and audit This proxy

Caveats

  • Proxy marks are backed by the code; the exact-quota claim by TestSharedQuotaAcrossEdges against standalone and cluster Valkey.
  • Akamai's App & API Protector guides need a login, so its marks come from its public API, Terraform and Property Manager references.
  • Fastly's JWT, CORS, locale, normalization, versions and TLS marks rest on search summaries rather than a full read of the page.
  • Vendor tiers change often. Recheck them before a purchase decision.