Skip to main content

API Gateway Patterns — STOA vs Kong vs Apigee (2026 Comparison)

STOA is not a general-purpose API gateway — it is a purpose-built AI-native gateway that governs tool access for LLM agents, complementing (not replacing) traditional gateways.

The API gateway landscape in 2026 spans two distinct categories: traditional gateways built for REST/GraphQL traffic management, and AI-native gateways built for Model Context Protocol (MCP) and agent-to-tool governance. Understanding these architectural patterns helps organizations choose the right gateway — or combination of gateways — for their specific needs.

Gateway Architecture Patterns​

Pattern 1: Traditional API Gateway (Kong, Apigee)​

Traditional gateways sit at the edge of your infrastructure and handle all inbound API traffic. They provide routing, rate limiting, authentication, and protocol transformation for human-built applications.

Strengths: Mature plugin ecosystems, proven at scale, broad protocol support (REST, gRPC, GraphQL, WebSocket).

Limitation: Designed for request-response patterns between applications. AI agents require tool discovery, session management, and streaming responses that traditional gateways were not built for.

Pattern 2: AI-Native MCP Gateway (STOA)​

An MCP gateway is purpose-built for AI agent communication. Instead of routing HTTP requests, it manages tool discovery, invocation, and governance for LLM agents using the Model Context Protocol.

Strengths: Native MCP protocol, per-tool OPA policies, multi-tenant tool discovery, token metering, streaming SSE responses.

Limitation: Not designed to replace traditional REST/GraphQL routing. Best deployed alongside existing gateways.

Pattern 3: Hybrid Gateway (STOA Sidecar + Traditional)​

The most common enterprise pattern: keep your existing gateway for REST/GraphQL traffic and add STOA in sidecar mode for AI agent governance.

This pattern allows organizations to add AI governance incrementally without disrupting existing API traffic or gateway configurations.

5 Key Points​

1. Different Problems, Different Gateways​

Traditional gateways (Kong, Apigee, AWS API Gateway) solve REST/GraphQL traffic management: routing, rate limiting, API key validation. STOA solves AI-agent governance: tool discovery, multi-tenant isolation, subscription-based access for LLMs.

ConcernTraditional GatewaySTOA MCP Gateway
ProtocolREST, GraphQL, gRPCMCP (tools/call, tools/list)
ConsumerApps, microservicesAI agents (Claude, GPT)
DiscoveryOpenAPI / SwaggerMCP tools/list (dynamic)
GovernanceAPI keys, OAuth scopesOPA policies per tool per tenant
Billing modelPer API callPer tool invocation
Session modelStateless request-responseStateful agent sessions
StreamingWebSocket, SSE (add-on)SSE native (MCP standard)

2. The Four Gateway Modes (ADR-024)​

STOA's unified architecture supports four deployment modes under a single codebase:

Each mode uses the same Rust binary — the mode is selected at startup via configuration. This means upgrades, security patches, and new policies apply across all deployment modes simultaneously.

3. Coexistence, Not Replacement​

STOA is designed to sit alongside your existing gateway. In sidecar mode, STOA deploys behind Kong or Apigee, adding AI governance without disrupting current API traffic:

┌─────────────┐     ┌────────────────┐     ┌──────────────┐
│ REST Apps │────►│ Kong / Apigee │────►│ Backend APIs │
└─────────────┘ └────────────────┘ └──────────────┘
│
┌─────────────┐ ┌──────▼───────┐
│ AI Agents │────►│ STOA Gateway │ (sidecar mode)
└─────────────┘ │ MCP + OPA │
└──────────────┘

4. Head-to-Head Comparison​

FeatureKongApigeeSTOA
MCP ProtocolPlugin (since 3.12)NoNative
AI Tool DiscoveryN/AN/Atools/list per tenant
Multi-Tenant IsolationEnterprise (Workspaces)YesNative (K8s namespaces)
Policy EnginePlugins (Lua)Apigee policiesOPA (Rego)
Developer PortalKong Dev Portal (Enterprise)Apigee PortalSTOA Portal (OSS)
Open SourceCore: Yes (Apache 2.0)NoYes (Apache 2.0)
REST/gRPC RoutingYesYesVia sidecar/proxy mode
DeploymentAnyGoogle CloudAny (K8s-native)
Token MeteringN/AN/APer-agent, per-tool
Circuit BreakingPluginBuilt-inBuilt-in (per-upstream)
mTLSEnterpriseYesBuilt-in (all tiers)
EU Data SovereigntyUS companyUS company (Google)European (Apache 2.0)
PricingEnterprise licensePer API callOpen-source + Enterprise

Comparison based on publicly available information as of 2026-02. All product names are trademarks of their respective owners.

5. When to Use What​

ScenarioRecommendationRationale
REST API management onlyKong or ApigeeMature ecosystems, battle-tested
AI agents need API accessSTOA (edge-mcp mode)Purpose-built for MCP protocol
Both REST apps + AI agentsKong/Apigee + STOA (sidecar)Best of both worlds
Greenfield AI-first platformSTOA (all modes)Single platform, no legacy
Regulatory compliance (DORA/NIS2)STOA (audit trail + OPA)EU sovereignty, immutable logs
Migration from legacy ESBSTOA + existing gatewayIncremental migration

Request Lifecycle Comparison​

Understanding how a request flows through each gateway architecture reveals the fundamental differences:

Traditional Gateway Request Flow​

MCP Gateway Request Flow​

Key differences: the MCP gateway adds tool discovery, per-tool policy evaluation, audit logging, and token metering — none of which exist in the traditional flow.

Security Architecture​

Each gateway pattern has different security characteristics:

Security LayerKongApigeeSTOA
AuthenticationAPI keys, OAuth2, JWT, mTLSAPI keys, OAuth2, SAMLJWT, API keys, mTLS
AuthorizationPlugin-based (ACLs, RBAC)API Products, custom policiesOPA (fine-grained Rego policies)
Policy GranularityPer-routePer-API productPer-tool, per-tenant, per-agent
Audit TrailAccess logsAnalyticsStructured audit events (OpenSearch)
Multi-Tenant IsolationEnterprise workspacesOrganizationsK8s namespace + Keycloak realm
Data SovereigntyDepends on hostingGoogle Cloud regionsSelf-hosted, EU-native

STOA's security model is specifically designed for the AI agent threat model, where:

  • Prompt injection can cause agents to call tools in unintended ways
  • Agent impersonation requires strong identity verification
  • Overprivileged access must be prevented by fine-grained per-tool policies
  • Audit requirements demand full traceability of every tool invocation

Deployment Architecture​

Kong Deployment​

Kong typically deploys as a standalone gateway or Kubernetes Ingress Controller, backed by PostgreSQL or in DB-less mode:

Kong Gateway (Nginx + Lua)
├── PostgreSQL (config store)
├── Kong Manager (Enterprise UI)
└── Kong Dev Portal (Enterprise)

Apigee Deployment​

Apigee runs on Google Cloud infrastructure. Apigee hybrid allows a partial on-premise deployment:

Apigee Management Plane (Google Cloud)
└── Apigee Runtime (hybrid: on-premise)
├── Message Processor
├── Router
└── Cassandra (config store)

STOA Deployment​

STOA follows a Kubernetes-native Control Plane / Data Plane architecture:

Control Plane (cloud or on-premise)
├── Control Plane API (Python/FastAPI)
├── Console (React admin dashboard)
├── Portal (React developer portal)
├── Keycloak (identity provider)
└── PostgreSQL (config store)

Data Plane (on-premise or edge)
├── STOA Gateway (Rust/axum)
├── OPA (embedded policy engine)
└── OpenSearch (audit logs)

The Data Plane can run independently of the Control Plane, ensuring that API traffic stays within your infrastructure even if the management layer is hosted elsewhere.

Objections & Answers​

ObjectionAnswer
"We already have Kong/Apigee, we don't need another gateway"STOA doesn't replace them. Sidecar mode adds AI governance behind your existing gateway with minimal disruption to current traffic.
"MCP is niche — our APIs are REST"Your APIs stay REST. STOA translates MCP to REST. AI agents speak MCP, backends speak REST — the gateway bridges both.
"Why not add MCP support as a Kong plugin?"Kong added MCP plugins in 3.12. For basic MCP proxying, that may be sufficient. For multi-tenant tool discovery, OPA per-tool policies, and token metering, STOA provides these as core capabilities.
"Open-source means no support"STOA offers an Enterprise tier with SLAs, support, and managed deployment — same model as Kong Enterprise vs Kong OSS.
"How does STOA handle high traffic?"The gateway is built in Rust (Tokio + axum) for high throughput and low latency. Horizontal scaling via Kubernetes replica sets handles traffic growth.
"What about service mesh?"STOA is not a service mesh. If you need east-west traffic management, use Istio or Linkerd. STOA handles north-south AI agent traffic at the application layer.

Migration Paths​

From Kong to STOA​

Kong users can adopt STOA incrementally using sidecar mode:

  1. Phase 1: Deploy STOA alongside Kong, routing only MCP traffic through STOA
  2. Phase 2: Migrate tool definitions from Kong plugins to STOA CRDs
  3. Phase 3: Gradually move API management to STOA's Control Plane

See the Kong Migration Guide for step-by-step instructions.

From Apigee to STOA​

Apigee users migrating to open-source can map Apigee concepts to STOA equivalents:

Apigee ConceptSTOA Equivalent
API ProductTool Set (CRD)
Developer AppConsumer + API Key
PolicyOPA Rego Policy
EnvironmentKubernetes Namespace
AnalyticsOpenSearch + Grafana

See the Apigee Migration Guide for the full mapping.

Further Reading​


Feature comparisons are based on publicly available documentation as of 2026-02. Product capabilities change frequently. We encourage readers to verify current features directly with each vendor. All trademarks belong to their respective owners. See trademarks.