GCP Gateway Upload Size Limit
Key Fact
GKE Gateway (Gateway API HTTPRoute) has no native body-size filter. HTTPRoute Filter types: RequestHeaderModifier, ResponseHeaderModifier, RequestRedirect, ResponseRedirect, URLRewrite, RequestMirror. No client_max_body_size equivalent.
Enforcement Layers (correct to wrong)
- IIP nginx .so —
client_max_body_size(correct primary enforcement) - Kong Gateway —
request-size-limitingplugin (if Kong is upstream) - Application/pod — application code or nginx sidecar
GKE Gateway— not possible, Gateway API does not support itCloud Armor— WAF rules, not precise upload control
Layered Strategy
Set a loose upper bound at IIP (e.g., 500M) as a security guard, then precise business limits at Kong/Runtime (e.g., 10M per team/service).
Reference
- Full analysis:
/Users/lex/git/knowledge/gateway/no-gateway/gke-gateway-uploadsize.md - Gateway API HTTPRoute spec: https://gateway-api.sigs.k8s.io/reference/api-types/httproute/#filters
- Kong
request-size-limiting: https://docs.konghq.com/hub/kong-inc/request-size-limiting/