GCP Gateway Uploadsize

GCP GKE Gateway upload size limit — Gateway API has no native client_max_body_size, enforcement at IIP/Kong/application layer. Use when designing file-upload paths in GKE Gateway 2.0 or answering upload-size questions.

aibangjuxin Updated

File contents

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)

  1. IIP nginx .soclient_max_body_size (correct primary enforcement)
  2. Kong Gatewayrequest-size-limiting plugin (if Kong is upstream)
  3. Application/pod — application code or nginx sidecar
  4. GKE Gateway — not possible, Gateway API does not support it
  5. Cloud 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

aibangjuxin/knowledge/tree/main/skills/gcp/gcp-gateway-uploadsize commit 9fcc12c487

Frequently asked questions

npx skillmds@latest add aibangjuxin/gcp-gateway-uploadsize