Skip to Content
Mengty Learns
Platform tools

API Gateway Choice: Kong vs Gravitee

Decide between Kong (programmable DB-less API gateway) and Gravitee (full API management with developer portal, plans, and subscriptions).

explanationintermediateTested with kong 3.x (docs), gravitee 4.x (docs)Updated Nov 27, 2026

TL;DR

Use Nginx/Ingress for TLS termination and volumetric IP limits, and put one API gateway behind it for auth, consumer quotas, and transformations. Pick Kong (DB-less + decK/KIC) for fast, GitOps-managed internal/partner APIs; pick Gravitee APIM when APIs are external products needing a developer portal, tiered plans, and subscription workflows.

Context

An edge reverse proxy (Nginx) routes hosts and paths, but lacks consumer identity, per-client quotas, API key lifecycle, and developer onboarding. An API gateway fills that gap—provided authentication happens in one place only.

Comparison

DimensionKong Gateway (DB-less)Gravitee APIM
Sweet spotProgrammable L7 proxy & GitOps CRDsFull API Management (portal + plans + billing)
Config source of truthGit (kong.yaml via decK or KIC CRDs)Management API + MongoDB/JDBC (or Gravitee K8s Operator)
Multi-tier partner plansManual per-consumer pluginsBuilt-in Plans (STAGING → PUBLISHED → DEPRECATED) & subscriptions
Plugin executionPriority-ordered Lua/Go plugins (cors before auth)Platform → API → Plan flows with Expression Language
Zone isolationSeparate gateway deployments / namespacesSharding tags routing APIs to DMZ vs internal gateways

Decision criteria

  1. Internal/GitOps-first APIs → Kong: DB-less Kong needs no database, syncs cleanly with Argo CD or decK diff/sync, and keeps every proxy pod stateless (using Redis only for distributed rate-limit counters with fault_tolerant: true).
  2. External API product / partner portal → Gravitee: If third-party partners browse docs, subscribe to Bronze/Gold plans, and await approval workflows, Gravitee's portal and OpenAPI request-validation policy avoid building a portal from scratch.

Gotchas

  • Default retries: 5 in Kong: On non-idempotent endpoints (payments, orders), set retries: 0 so a slow upstream timeout never triggers a duplicate write.
  • Exposing Kong's Admin API (8001/8444): Keep the Admin API blocked by NetworkPolicy and unreachable off-cluster; use DB-less GitOps instead.
  • Plugin order (cors vs auth): Always verify CORS runs before JWT/key-auth so browser OPTIONS preflights are not rejected with 401.
  • Save vs Deploy in Gravitee: Saving an API in Gravitee does not push it to gateways until it is deployed; automate both in CI via the Kubernetes Operator.

Production checklist

  • Authentication (JWT/OIDC/mTLS) is enforced at the API gateway only, never duplicated at the edge proxy.
  • Non-idempotent routes explicitly set retries: 0.
  • Distributed rate limiting uses Redis with fault_tolerant: true so a Redis blip does not take down APIs.
  • Gateway config lives in Git (KIC CRDs, decK, or Gravitee Operator), not manual UI/Admin API edits.

Check yourself

Check Yourself

1. A web app works with `curl` through Kong, but browser requests fail on `OPTIONS` preflight with HTTP 401. What is the usual cause?

2. Why should you set `retries: 0` on a payment creation route in Kong?

Sources