DEV Community

daniel jeong
daniel jeong

Posted on • Originally published at manoit.co.kr

Complete Guide to API Gateway Design Patterns in 2026 — Multi-Protocol Strategy and the Rise of MCP Gateways

Complete Guide to API Gateway Design Patterns in 2026 — Multi-Protocol Strategy for REST/GraphQL/gRPC and the Rise of MCP Gateways

In 2026, the question in API architecture has shifted from "which protocol should we choose?" to "how do we manage multiple protocols together?" REST remains the standard for public APIs, GraphQL dominates client-facing data orchestration, and gRPC is the de facto standard for inter-service communication. With the emergence of the Model Context Protocol (MCP) for AI agents as a new axis, API gateways are evolving from simple traffic proxies into protocol orchestrators.

Gartner projects that by 2026, 75% of API gateway vendors will integrate MCP features, and 40% of enterprise applications will embed autonomous AI agents. This guide covers multi-protocol API gateway design patterns through to MCP gateway architecture for the AI agent era — practical strategies you can apply directly in production.

Multi-Protocol API Architecture — REST, GraphQL, gRPC Coexistence

In 2026 production environments, systems using a single protocol are nearly extinct. Each protocol has unique strengths, and the key design principle is placing the right protocol at the right layer.

Criteria REST GraphQL gRPC
Best Layer Public API, partners Client data orchestration Internal service communication
Serialization JSON (text) JSON (text) Protobuf (binary)
Protocol HTTP/1.1, HTTP/2 HTTP/1.1, HTTP/2 HTTP/2 (required)
Streaming SSE (unidirectional) Subscriptions (WebSocket) Bidirectional streaming
Type Safety OpenAPI schema (optional) SDL schema (required) Proto definition (required)
Performance Baseline Similar to baseline 30-50% lower latency
2026 Trend AI agent external interface Federation v2 + Connectors xDS API + Envoy integration

Layered Multi-Protocol Architecture

The recommended 2026 architecture is a 3-layer protocol stack. External clients enter via REST, the client UI layer is orchestrated by GraphQL, and microservices communicate via gRPC. The API gateway centrally manages translation and routing between all three protocols.

# 3-Layer Multi-Protocol Architecture (Kong Gateway)
_format_version: "3.0"

services:
  # Layer 1: REST — Public API (external clients, partners)
  - name: public-rest-api
    url: http://api-service:8080
    protocol: http
    routes:
      - name: rest-v1
        paths:
          - /api/v1
        strip_path: false
    plugins:
      - name: rate-limiting
        config:
          minute: 60        # External API rate limit
          policy: redis
      - name: opentelemetry
        config:
          endpoint: http://otel-collector:4318/v1/traces

  # Layer 2: GraphQL — Client data orchestration
  - name: graphql-gateway
    url: http://apollo-router:4000
    routes:
      - name: graphql
        paths:
          - /graphql
    plugins:
      - name: request-size-limiting
        config:
          allowed_payload_size: 5  # MB — query complexity limit

  # Layer 3: gRPC — Internal microservice communication
  - name: grpc-internal
    url: grpc://user-service:50051
    protocol: grpc
    routes:
      - name: grpc-users
        protocols:
          - grpc
          - grpcs
        paths:
          - /user.UserService
Enter fullscreen mode Exit fullscreen mode

API Gateway Design Patterns — BFF, Federation, Protocol Orchestrator

In a multi-protocol environment, the API gateway's role extends beyond simple routing to include per-client data optimization, service integration, and protocol translation. Here are the three most widely used patterns in 2026 production.

Pattern 1: BFF (Backend for Frontend)

The BFF pattern provides a dedicated API layer per client type to optimize data shape. Mobile apps return minimal fields to save bandwidth, web dashboards deliver rich data in a single call, and third-party integrations maintain stable REST contracts.

// BFF Pattern — Per-client API optimization (Fastify)
import Fastify from 'fastify';

const app = Fastify();

// Mobile BFF — Minimal fields, compressed response
app.get('/mobile/v1/dashboard', async (req, reply) => {
  const [user, stats] = await Promise.all([
    userClient.getProfile(req.userId),    // gRPC call
    analyticsClient.getSummary(req.userId), // gRPC call
  ]);
  return {
    name: user.name,
    avatar: user.avatarUrl,
    todayScore: stats.score,  // Only essential data for mobile
  };
});

// Web Dashboard BFF — Rich data with aggregations
app.get('/web/v1/dashboard', async (req, reply) => {
  const [user, stats, activities, notifications] = await Promise.all([
    userClient.getFullProfile(req.userId),
    analyticsClient.getDetailedStats(req.userId),
    activityClient.getRecent({ userId: req.userId, limit: 20 }),
    notificationClient.getUnread(req.userId),
  ]);
  return { user, stats, activities, notifications };
});
Enter fullscreen mode Exit fullscreen mode

Pattern 2: Apollo Federation v2 — GraphQL Supergraph

Apollo Federation v2 composes GraphQL schemas from multiple microservices into a single Supergraph. As of March 2026, Router v2.10 (Federation v2.12) has been designated as LTS, while Router v1.x reached end of support on March 31, 2026. The new GraphQL Connectors feature automatically bridges REST or gRPC backends as GraphQL subgraphs, enabling Federation integration without refactoring existing services.

# Apollo Federation v2 — Subgraph schema example
# user-subgraph/schema.graphql
extend schema
  @link(url: "https://specs.apollo.dev/federation/v2.12",
        import: ["@key", "@shareable", "@external"])

type User @key(fields: "id") {
  id: ID!
  name: String!
  email: String!
  role: Role!
  createdAt: DateTime!
}

type Query {
  me: User
  user(id: ID!): User
}

# course-subgraph — Bridge gRPC backend via Connector
type Course @key(fields: "id") {
  id: ID!
  title: String!
  instructor: User!  # Federation auto-resolves from user-subgraph
  enrollments: [Enrollment!]!
}
Enter fullscreen mode Exit fullscreen mode
# Apollo Router v2.10 Configuration — router.yaml
supergraph:
  listen: 0.0.0.0:4000

telemetry:
  exporters:
    tracing:
      otlp:
        enabled: true
        endpoint: http://otel-collector:4317  # gRPC endpoint

traffic_shaping:
  all:
    experimental_http2: enable  # gRPC subgraph support
  subgraphs:
    course-service:
      timeout: 30s
      experimental_enable_http2: true

cors:
  origins:
    - https://app.example.com
  allow_headers:
    - Content-Type
    - Authorization
    - X-Request-ID
Enter fullscreen mode Exit fullscreen mode

Pattern 3: Envoy Gateway — Protocol Orchestrator

Envoy Gateway is a protocol orchestrator based on the Kubernetes Gateway API, supporting HTTPRoute, GRPCRoute, TLSRoute, TCPRoute, and UDPRoute. The gRPC-JSON Transcoder filter allows REST clients to call gRPC services using JSON, enabling frontend teams to leverage backend services without directly handling gRPC.

# Envoy Gateway — GRPCRoute (Kubernetes Gateway API)
apiVersion: gateway.networking.k8s.io/v1
kind: GRPCRoute
metadata:
  name: user-service-grpc
  namespace: production
spec:
  parentRefs:
    - name: envoy-gateway
      sectionName: grpc
  rules:
    - matches:
        - method:
            service: user.v1.UserService   # gRPC service matching
            method: GetUser                # Method-level routing
      backendRefs:
        - name: user-service
          port: 50051
---
# REST → gRPC Translation (gRPC-JSON Transcoder)
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
  name: user-service-rest-bridge
spec:
  parentRefs:
    - name: envoy-gateway
      sectionName: https
  rules:
    - matches:
        - path:
            type: PathPrefix
            value: /api/v1/users        # REST path translated to gRPC
      backendRefs:
        - name: user-service
          port: 50051
Enter fullscreen mode Exit fullscreen mode

The Rise of MCP Gateways — New Infrastructure Layer for AI Agents

The biggest shift in the 2026 API gateway landscape is the emergence of MCP (Model Context Protocol) gateways. To solve the N×M integration problem when AI agents call external tools and data sources, MCP gateways sit between agents and tool servers, centralizing authentication, routing, observability, and governance.

Criteria Traditional API Gateway MCP Gateway
Protocol HTTP/gRPC (stateless) JSON-RPC + SSE (stateful, session-based)
Tool Discovery Static routing table Dynamic tool discovery (agents explore in real-time)
Session Management Per request-response Multi-tool-call sessions (state tracking)
Authentication API keys, JWT OAuth 2.1 + per-agent permission scopes
Observability Request metrics, latency Token usage, tool call chains, cost tracking
Security Rate limiting, WAF PII filtering, prompt injection defense, guardrails

Kong AI Gateway — Multi-Protocol + AI Governance Integration

Kong AI Gateway is a leading example of integrating AI-specific features into an existing API gateway. It provides automated RAG pipelines, PII filtering across 20+ categories (supporting 12 languages), and model-level rate limiting (per-model usage limits for GPT-4, Claude, etc.). Starting with version 3.14, the AI Rate Limiting Advanced plugin supports model-based limiting to prevent excessive usage of specific models.

# Kong AI Gateway — AI service routing + governance
services:
  - name: ai-llm-proxy
    url: http://ai-gateway-upstream
    routes:
      - name: llm-route
        paths:
          - /ai/v1/chat/completions
    plugins:
      # PII Filtering — 12 languages, 20+ categories
      - name: ai-pii-sanitizer
        config:
          enabled: true
          categories:
            - email
            - phone
            - credit_card
            - ssn
      # Model-level rate limiting
      - name: ai-rate-limiting-advanced
        config:
          limit_by: model            # Per-model limits (v3.14+)
          limits:
            gpt-4:
              minute: 20
            claude-sonnet-4-6:
              minute: 30
      # Automated RAG pipeline
      - name: ai-rag
        config:
          embeddings_provider: openai
          vector_store: weaviate
          top_k: 5                   # Inject top 5 document contexts
Enter fullscreen mode Exit fullscreen mode

Production Gateway Selection Guide — 2026 Open Source Comparison

The right gateway depends on protocol requirements, AI integration level, and operational complexity. Here's a comparison of major open-source API gateways in 2026.

Gateway REST GraphQL gRPC MCP/AI K8s Gateway API
Kong 3.14 Yes Yes (plugin) Yes Yes (AI Gateway) Yes
Envoy Gateway Yes No (external) Yes (native) No Yes (native)
Traefik 3.x Yes No Yes No Yes
Apollo Router v2 Yes (Connectors) Yes (native) Yes (JSON Bridge) No No
APISIX 3.x Yes Yes (plugin) Yes Partial Yes

Production Architecture — Multi-Protocol + AI Integrated Gateway Stack

In practice, a single gateway rarely meets all requirements. The recommended 2026 architecture layers Edge Gateway + Protocol Gateway + AI Gateway with separated responsibilities.

# Production Multi-Gateway Stack (Kubernetes)
#
# +---------------------------------------------+
# |              Edge Gateway (Kong)             |
# |  TLS termination, auth, rate limit, WAF     |
# +----------+----------+------------+-----------+
# | /api/v1  |/graphql  | /grpc      | /ai       |
# |  REST    |GraphQL   | gRPC       | MCP/LLM   |
# +----------+----------+------------+-----------+
# | REST     | Apollo   | Envoy      | Kong AI   |
# | Services | Router   | Gateway    | Gateway   |
# +----------+----------+------------+-----------+
# |           Microservices (gRPC mesh)          |
# |         Istio Service Mesh (mTLS)            |
# +---------------------------------------------+

apiVersion: gateway.networking.k8s.io/v1
kind: Gateway
metadata:
  name: edge-gateway
  namespace: gateway-system
  annotations:
    konghq.com/gateway-operator: "enabled"
spec:
  gatewayClassName: kong
  listeners:
    - name: https
      protocol: HTTPS
      port: 443
      tls:
        mode: Terminate
        certificateRefs:
          - name: wildcard-tls
    - name: grpc
      protocol: HTTPS          # gRPC over TLS
      port: 8443
      tls:
        mode: Terminate
        certificateRefs:
          - name: wildcard-tls
Enter fullscreen mode Exit fullscreen mode

Observability — Multi-Protocol Tracing and AI Cost Tracking

In multi-protocol environments where requests flow from REST to GraphQL to gRPC, distributed tracing across protocol boundaries is essential. Use OpenTelemetry to collect unified traces from all gateways, with additional token usage and cost metrics from the AI gateway.

# OpenTelemetry Collector — Multi-protocol gateway unified collection
receivers:
  otlp:
    protocols:
      grpc:
        endpoint: "0.0.0.0:4317"       # gRPC receiver
      http:
        endpoint: "0.0.0.0:4318"       # HTTP receiver

processors:
  attributes:
    actions:
      - key: gateway.protocol           # Per-protocol classification
        action: upsert
      - key: ai.model                   # AI model tracking
        action: upsert
      - key: ai.token_count             # Token usage
        action: upsert
      - key: ai.cost_usd               # Cost tracking
        action: upsert
  batch:
    timeout: 5s
    send_batch_size: 1024

exporters:
  otlp/tempo:
    endpoint: "tempo:4317"             # Traces → Grafana Tempo
    tls:
      insecure: true
  prometheusremotewrite:
    endpoint: "http://mimir:9009/api/v1/push"  # Metrics → Mimir

service:
  pipelines:
    traces:
      receivers: [otlp]
      processors: [attributes, batch]
      exporters: [otlp/tempo]
    metrics:
      receivers: [otlp]
      processors: [batch]
      exporters: [prometheusremotewrite]
Enter fullscreen mode Exit fullscreen mode

Migration Checklist — Transitioning to a Protocol Orchestrator

A practical checklist for transitioning from a single-protocol (REST) gateway to a multi-protocol orchestrator:

Phase Task Validation Criteria
1. Protocol Audit Map protocols per service, analyze traffic ratios All services classified by protocol
2. Schema Standardization Define OpenAPI (REST), SDL (GraphQL), Proto (gRPC) All contracts registered in Schema Registry
3. Gateway API Migration Migrate Ingress to HTTPRoute/GRPCRoute 100% existing traffic routing correctly
4. Federation Adoption Split GraphQL subgraphs, deploy Router Supergraph schema composition successful
5. AI Gateway Integration Set up LLM routing, PII filters, cost tracking 100% AI requests under governance
6. Observability Deploy OTel Collector, link cross-protocol traces End-to-end request traces verified

Conclusion — The Evolution of API Gateways in 2026

API gateways in 2026 are evolving along three axes. First, native multi-protocol support manages REST/GraphQL/gRPC from a single control plane. Second, as AI agent infrastructure, they handle MCP-based tool discovery, session management, and PII protection. Third, Kubernetes Gateway API convergence enables vendor-independent declarative routing.

The most important principle in practice is layer separation. The Edge Gateway handles security and traffic management, the Protocol Gateway performs protocol translation and orchestration, and the service mesh protects inter-microservice communication. In environments with growing AI agent workloads, introducing an MCP gateway as a separate layer to strengthen governance is recommended. Hybrid stacks reduce MTTR by up to 35%, with contract-based protocol management and unified observability as the key enablers.


AI Disclosure: This article was planned by the ManoIT technical research team, drafted with AI assistant (Claude), and technically reviewed and edited by professional engineers.

Sources: Apollo GraphQL Docs, Kong AI Gateway Docs, Envoy Gateway Docs, Kubernetes Gateway API Specification, Composio MCP Gateway Guide, Gartner API Management Forecast 2026


Originally published at ManoIT Tech Blog.

Top comments (0)