Date: November 28, 2026 Last Updated: November 28, 2026 Review: Expert & Architecture Review Report
Scope & Licensing Note: This article strictly covers pure open-source systems. Premium, proprietary/vendor-locked, and community-edition (open-core) systems are currently not included.
Parallel microservice delivery frequently stalls on the same integration bottleneck: upstream teams are blocked waiting for unfinished downstream APIs, teams scatter brittle mock conditionals across polyglot callers, and “big bang” cutovers turn launch day into an all-or-nothing gamble. Combining an internal East-West API Gateway (handling internal service-to-service traffic, distinct from North-South external ingress) with Hexagonal Architecture (Ports and Adapters) decouples service-to-service communication from deployment and release mechanics. A calling microservice communicates exclusively with a single stable internal gateway endpoint through an outbound adapter, while pure open-source infrastructure—such as Envoy Proxy, Apache APISIX, or Kubernetes Gateway API controllers—manages contract-driven mocking, dark-launch traffic mirroring, safe canary graduation, and full cutover without touching or redeploying the caller.
PaymentPort, InventoryPort), while a thin Outbound Adapter targets one stable internal gateway endpoint—never knowing whether a response comes from a mock server, a canary replica, or a production fleet.In Hexagonal Architecture (originally formulated by Alistair Cockburn as Ports and Adapters), the business domain sits at the center and interacts with the outside world strictly through explicit interfaces (Ports) and swappable infrastructure implementations (Adapters). When applied to internal microservice communication (East-West traffic, as opposed to North-South external client-to-cluster ingress), this separation ensures the calling service’s business logic never knows—or cares—whether a downstream dependency is a contract mock, a shadow-tested build, a canary slice, or a fully graduated production service.
flowchart LR
subgraph Caller["Calling Microservice (Hexagonal Architecture)"]
Core["Domain Core (Business Rules)"]
Port["Outbound Port (e.g., PaymentPort / InventoryPort)"]
Adapter["Outbound Adapter (HTTP / gRPC Client + Context Headers)"]
Core --> Port --> Adapter
end
subgraph GW["Internal East-West Layer (Centralized Gateway or GAMMA Mesh)"]
Router["L7 Routing Engine (Header Overrides, Mirroring, Cohort / Weighted Split)"]
end
subgraph Upstreams["Downstream Targets"]
Mock["Mock Upstream (Microcks / Prism / Direct Response)"]
Live["Live Downstream Service (Canary / Production)"]
end
Obs["Observability (OpenTelemetry Traces + Prometheus Metrics)"]
Adapter -->|"Single stable URL: https://internal-gw.mesh/v1/payments"| Router
Router -->|"Stage 0–2 / Override / Safe Read Fallback"| Mock
Router -->|"Stage 1 Mirror / Stage 2–3 Live"| Live
Router -.->|"Injects Served-By tag & trace spans"| Obs
Each layer owns a single, well-bounded responsibility:
InventoryPort or PaymentPort. No mock flags, environment switches, or canary checks leak into domain logic.https://internal-gw.mesh/v1/payments). Its infrastructure responsibilities are bounded to payload serialization, strict timeouts, idempotency key propagation, W3C distributed trace context (traceparent and tracestate), tenant/cohort identifiers, and explicit handling of non-2xx responses.In Kubernetes environments using Kubernetes Gateway API (Apache-2.0), East-West L7 routing maps to two distinct topologies—conflating them causes subtle manifest and scaling mistakes:
parentRefs: kind: Gateway): Callers send traffic to an internal Gateway resource addressed by spec.hostnames (for example, internal-gw.mesh). This topology is supported by Envoy Gateway (Apache-2.0, a Gateway-bound controller), Apache APISIX (Apache-2.0), Istio (Apache-2.0, CNCF Graduated), and Cilium (Apache-2.0, CNCF Graduated), or standalone Envoy Proxy (Apache-2.0, CNCF Graduated) fleets. It excels when teams want a single shared policy and mocking boundary—at the cost of an extra network hop and a shared gateway blast radius.parentRefs: group: "", kind: Service): Under the GAMMA (Gateway API for Mesh Management and Administration) initiative, Istio and Cilium attach HTTPRoute or GRPCRoute resources directly to a Kubernetes Service (with spec.hostnames omitted per the GAMMA specification). Local sidecar or ambient node proxies enforce routing rules inline without hairpinning traffic through a central proxy tier. (Envoy Gateway targets Gateway resources rather than GAMMA mesh Service attachments.)Section 5 compares both topologies against in-process hexagonal test doubles across latency, blast radius, cost, and operational complexity.
Without an East-West routing layer, teams often fall back to conditional logic inside the outbound adapter (if (useMock) callMockClient() else callLiveClient()). Even when backed by an application-level feature flag (see OpenFeature API Specification for when runtime application flags remain the better fit), embedding routing switches inside callers couples deployment topology to application code and forces synchronized rollouts across polyglot services.
Moving mock/live dispatch into the East-West plane keeps the outbound adapter static—yet production-hardened—across the entire lifecycle of the downstream service:
// Outbound Port (Domain boundary — zero infrastructure awareness)
export interface PaymentPort {
authorize(req: PaymentRequest, ctx: RequestContext): Promise<PaymentResult>;
}
export class PaymentGatewayError extends Error {
constructor(
public readonly status: number,
public readonly servedBy: string,
public readonly retryable: boolean,
) {
super(`Payment gateway request failed with HTTP ${status} (served-by=${servedBy})`);
}
}
// Outbound Adapter (Targets one stable East-West route forever)
export class GatewayPaymentAdapter implements PaymentPort {
// Default to HTTPS/mTLS; plaintext http:// is only safe when a local sidecar
// or ambient proxy transparently intercepts and upgrades traffic to SPIFFE mTLS.
constructor(private readonly gatewayBaseUrl = "https://internal-gw.mesh") {}
async authorize(req: PaymentRequest, ctx: RequestContext): Promise<PaymentResult> {
const headers: Record<string, string> = {
"Content-Type": "application/json",
"Idempotency-Key": ctx.idempotencyKey,
"traceparent": ctx.traceparent,
"Tenant-Id": ctx.tenantId,
};
if (ctx.tracestate) headers["tracestate"] = ctx.tracestate;
if (ctx.tenantCohort) headers["Tenant-Cohort"] = ctx.tenantCohort;
const res = await fetch(`${this.gatewayBaseUrl}/v1/payments`, {
method: "POST",
headers,
body: JSON.stringify(req),
signal: AbortSignal.timeout(ctx.timeoutMs),
});
const servedBy = res.headers.get("Served-By") ?? "unknown";
if (!res.ok) {
throw new PaymentGatewayError(
res.status,
servedBy,
res.status === 503 || res.status === 504,
);
}
return (await res.json()) as PaymentResult;
}
}
When the downstream payments service transitions from a contract mock to a dark-launched candidate, a cohort-pinned canary, and finally 100% production traffic, not a single line of GatewayPaymentAdapter changes—while strict timeouts, idempotency keys, trace context, and explicit HTTP 503 handling keep failures bounded and observable at every stage.
Placing mock implementations behind the East-West gateway unblocks upstream and frontend teams immediately after an API contract is ratified (see Design-First Partner APIs for spec-first governance)—allowing parallel integration weeks before the downstream service finishes implementation or infrastructure provisioning.
Three complementary patterns cover most mocking needs:
Generate a dedicated mock upstream directly from your OpenAPI or Protocol Buffers (.proto) specification and register it as a standard backend target in the gateway:
Apache-2.0, CNCF Incubating): Ingests OpenAPI 3.x, Protocol Buffers/gRPC, AsyncAPI, and GraphQL specifications to serve realistic, example-driven or stateful mock responses—and doubles as a contract conformance test runner against the live service later. For lightweight deployments, its single-container microcks-uber distribution minimizes operational overhead.Apache-2.0): Provides a fast, stateless HTTP mock server directly from OpenAPI documents, with dynamic example generation and built-in request validation that flags schema mismatches early during upstream integration.For lightweight stubs, health checks, or deterministic edge cases that do not justify running a separate mock container, return static or templated payloads directly from the gateway without an extra network hop:
mocking plugin, Apache-2.0): Built directly into Apache APISIX, enabling routes to synthesize JSON responses, custom status codes, headers, and simulated latency (mocking.delay or the fault-injection plugin) inside the proxy layer.direct_response & envoy.filters.http.fault, Apache-2.0): Returns inline static HTTP status codes, headers, and bodies directly from Envoy’s routing table, and injects configurable response delays or aborts via its HTTP Fault Injection filter.Calibrate Mock Latency Early: A mock server responding in 2 ms creates a dangerous illusion of speed. When Stage 2 routes traffic to a live backend with a 150 ms p99 latency, callers configured with overly aggressive timeouts or unbounded retries can trigger retry amplification storms. Inject realistic p50/p99 latency distributions during Stage 0 using Apache APISIX
mocking.delay/fault-injection, Envoyenvoy.filters.http.fault, or Microcks delay profiles so caller timeouts, circuit breakers, and connection pools are exercised realistically before live cutover.
Configure the East-West gateway to inspect explicit routing or scenario headers—standardizing on non-X- names such as Route-Target: mock and Test-Scenario: timeout in accordance with IETF RFC 6648 (supporting legacy X- aliases only during brownfield migrations where existing test harnesses require them)—before falling through to default traffic rules.
Header-based overrides let automated CI/CD suites, chaos drills, and local integration tests deterministically force mock responses, HTTP 503 / gRPC UNAVAILABLE failures, or injected latency spikes on isolated requests while regular traffic flows undisturbed to live backends.
Security Boundary: Untrusted external requests entering through a North-South Edge API Gateway must strip all internal routing and test-override headers (
Route-Target,Test-Scenario,Tenant-Cohort,Tenant-Id, and any legacyX-aliases) at the perimeter, and East-West overrides must be gated by verified workload identity. See Guardrail #4 in Section 4 for the complete perimeter and mTLS (mutual TLS) / SPIFFE & SPIRE enforcement model.
| Mocking Pattern | Best Use Case | Protocol Support | Statefulness | Extra Network Hop | Pure Open-Source Tools |
|---|---|---|---|---|---|
| Contract-Driven Mock Servers | Full multi-endpoint integration, schema validation, and reusable CI contract suites. | REST/OpenAPI, gRPC/Protobuf, GraphQL, AsyncAPI (Microcks); OpenAPI HTTP (Prism). |
Example-driven or scripted stateful (Microcks); stateless (Prism). |
Yes (gateway → mock container). | Microcks, Stoplight Prism |
| Gateway-Native Direct Responses | Lightweight stubs, health probes, maintenance responses, and calibrated delay/error stubs. | HTTP/1.1, HTTP/2 (REST/JSON). | Stateless (static or templated payloads). | No (synthesized inline at proxy). | Apache APISIX (mocking, fault-injection), Envoy Proxy (direct_response, fault filter) |
| Header-Based Overrides | Deterministic CI/CD fault injection, chaos drills, and isolated QA/canary verification on shared clusters. | HTTP headers and gRPC metadata. | Depends on target upstream (mock or live). | Depends on resolved target. | Envoy Proxy, Apache APISIX, Kubernetes Gateway API (HTTPRoute / GRPCRoute) |
Traffic graduation shifts requests progressively from the mock upstream to the real microservice as the downstream implementation matures, turning a high-risk “big bang” cutover into four observable, reversible stages governed by explicit promotion gates.
flowchart TD
S0["Stage 0: Contract Mock (100% Mock / Calibrated Latency)"] --> G1{"Gate 1: CI Schema & Contract Parity Pass?"}
G1 -->|"No (Fix Spec / Service)"| S0
G1 -->|"Yes"| S1["Stage 1: Shadow / Dark Launch (100% Mock + Sampled Mirror to Live)"]
S1 --> G2{"Gate 2: Shadow Error & Payload Parity Pass?"}
G2 -->|"No (Disable Mirror & Remediate)"| S0
G2 -->|"Yes"| S2["Stage 2: Canary (Cohort-Pinned Writes / Weighted Stateless Reads)"]
S2 --> G3{"Gate 3: Live SLOs, Latency & DB Load Within Budget?"}
G3 -->|"Regression (Instant Rollback to Mock)"| S0
G3 -->|"Yes"| S3["Stage 3: Full Graduation (100% Live + Scoped CI Override)"]
S3 -->|"Post-Cutover Incident (Non-Mutating Only)"| S0
S3 --> R["Mock Retirement (Remove Stale Routes per Sunset SLA)"]
| Stage | Traffic Split | Routing Mechanism | Primary Goal |
|---|---|---|---|
| 0. Contract Mock | 100% Mock / 0% Live | Default route to contract-driven mock server (Microcks / Prism) with realistic delay profiles. |
Unblock upstream development and exercise caller timeouts/contracts early. |
| 1. Shadow (Dark Launch) | 100% Mock (Sampled Live mirror) | Async traffic mirroring (request_mirror_policies in Envoy, proxy-mirror in APISIX, or RequestMirror in Gateway API). |
Verify live service stability, serialization, and payload parity without risking caller impact. |
| 2. Canary / Cohort Graduation | Cohort-pinned (stateful) or 10%–50% weighted (stateless) | Header-matched cohort routing for stateful APIs; weighted load balancing (traffic-split, weighted clusters, HTTPRoute/GRPCRoute weights) for stateless reads. |
Validate real latency, error rates, and database load under controlled production-like traffic. |
| 3. Full Graduation | 0% Mock / 100% Live | Default route to live service (mock retained only for explicit CI overrides or bounded read-only fallback until retired). | Complete cutover with fail-closed semantics on state-mutating paths and a clear mock sunset plan. |
With Kubernetes Gateway API (Apache-2.0), routing changes live in version-controlled CRD (Custom Resource Definition) manifests rather than application code. Both manifests below target a centralized internal Gateway (parentRefs: kind: Gateway with spec.hostnames, supported by Envoy Gateway, Apache APISIX, Istio, and Cilium).
Decentralized GAMMA Mesh Variant: If you run Istio or Cilium in GAMMA service-mesh mode instead of a centralized internal gateway, replace
parentRefswith{ group: "", kind: Service, name: payments-svc }and omitspec.hostnamesper the GAMMA specification.
During Stage 1, primary traffic still resolves from the mock upstream while a bounded percentage of safe, read-only traffic mirrors asynchronously to the live candidate using Gateway API v1.3+ requestMirror fractional sampling (GEP-3171):
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: payments-quotes-stage1-shadow
namespace: mesh-internal
spec:
parentRefs:
- kind: Gateway
name: internal-east-west-gw
hostnames:
- "internal-gw.mesh"
rules:
- matches:
- path:
type: PathPrefix
value: /v1/payments/quotes
method: GET
filters:
# Mirror 10% of read-only quote requests asynchronously to warm and test live pods
- type: RequestMirror
requestMirror:
backendRef:
name: payments-live-svc
port: 8080
percent: 10
- type: ResponseHeaderModifier
responseHeaderModifier:
set:
- name: Served-By
value: mock-microcks
backendRefs:
- name: payments-mock-svc
port: 8080
Notice how Stage 2 separates stateful payment mutations (graduated deterministically by Tenant-Cohort header to avoid write-then-read split-brain) from stateless read-only quotes (safely split by 25%/75% random weights):
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: payments-east-west-stage2
namespace: mesh-internal
spec:
parentRefs:
- kind: Gateway
name: internal-east-west-gw
hostnames:
- "internal-gw.mesh"
rules:
# Rule 1: Deterministic CI/CD override
# Note: Gateway API evaluates precedence by match specificity (path + header beats
# path-only), not by YAML list order.
- matches:
- path:
type: PathPrefix
value: /v1/payments
headers:
- name: Route-Target
value: mock
filters:
- type: ResponseHeaderModifier
responseHeaderModifier:
set:
- name: Served-By
value: mock-microcks
backendRefs:
- name: payments-mock-svc
port: 8080
# Rule 2: Stateful Stage 2 — Pin dogfood/canary cohorts 100% to live (no split-brain)
# Tenant-Id pinning follows the exact same header-match pattern for single tenants.
- matches:
- path:
type: PathPrefix
value: /v1/payments
headers:
- name: Tenant-Cohort
value: dogfood
filters:
- type: ResponseHeaderModifier
responseHeaderModifier:
set:
- name: Served-By
value: live-v1
backendRefs:
- name: payments-live-svc
port: 8080
# Rule 3: Stateless Read Stage 2 — Safe 25% Live / 75% Mock weighted canary split
- matches:
- path:
type: PathPrefix
value: /v1/payments/quotes
method: GET
backendRefs:
- name: payments-live-svc
port: 8080
weight: 25
filters:
- type: ResponseHeaderModifier
responseHeaderModifier:
set:
- name: Served-By
value: live-v1
- name: payments-mock-svc
port: 8080
weight: 75
filters:
- type: ResponseHeaderModifier
responseHeaderModifier:
set:
- name: Served-By
value: mock-microcks
# Rule 4: Default stateful fallback for remaining cohorts still in Stage 0/1
- matches:
- path:
type: PathPrefix
value: /v1/payments
filters:
- type: ResponseHeaderModifier
responseHeaderModifier:
set:
- name: Served-By
value: mock-microcks
backendRefs:
- name: payments-mock-svc
port: 8080
Gateway API Conformance & Header Notes:
ResponseHeaderModifierplaced insidebackendRefs[*].filtersis an Extended conformance feature in Kubernetes Gateway API. Always verify your controller accepted the filter by inspectingHTTPRoute.status.parents[].conditionsbefore relying on per-backendServed-Byheaders.- The manifests above use RFC 6648-aligned headers (
Route-Target,Served-By,Tenant-Cohort). If legacy test suites still sendX-Route-Target, add a parallel match block during migration rather than mixing conventions indefinitely.
request_mirror_policies appends -shadow to the Host/:authority header of mirrored requests (e.g., internal-gw.mesh-shadow), which breaks backends enforcing strict host or SNI validation. In Envoy v1.31+, explicitly set disable_shadow_host_suffix_append: true when strict virtual-host matching is active.200 status counts alone cannot prove response-body parity. Validate shadow outputs by emitting response-schema validation metrics from shadow-side OpenTelemetry instrumentation, capturing sampled request/response pairs via Envoy’s tap filter, or running an asynchronous response-diffing consumer against mirrored logs.requestMirror.percent/fraction, Apache APISIX proxy-mirror sample_ratio, or Envoy runtime_fraction—and assign dedicated connection pools and strict timeouts to the shadow cluster so a stalled live candidate cannot exhaust proxy buffers and degrade primary mock latency.GRPCRoute) & HTTP/2 Multiplexing: For internal Protobuf services, use Kubernetes Gateway API GRPCRoute (Standard channel since v1.1) instead of HTTPRoute. Standard L4 kube-proxy load balancing pins long-lived HTTP/2 TCP connections to a single pod, completely defeating weighted canary splits. An L7 East-West gateway or GAMMA mesh terminates and re-multiplexes HTTP/2 streams per RPC so GRPCRoute weights and metadata header matches (Route-Target, Tenant-Cohort) take effect accurately on every call.Apache-2.0, CNCF Graduated) and its Gateway API Traffic Router plugin. Backed by Prometheus error-rate and p99 latency queries, Argo Rollouts automatically advances weights on healthy intervals and triggers immediate rollback to the prior target on SLO breach.HTTP 503 (or gRPC UNAVAILABLE) so the calling domain can execute compensating logic safely (see The Saga Pattern).| Transition | Mandatory Entry / Exit Gates | Immediate Rollback Trigger |
|---|---|---|
| Stage 0 → Stage 1 (Shadow) | OpenAPI/Protobuf spec ratified; CI contract gates (oasdiff, self-hosted Pact Broker, Microcks) passing; Stage 0 latency profiles calibrated; shadow endpoints confirmed read-only or isolated via idempotency / shadow DB. |
Mirroring causes >10% proxy buffer/CPU spike or increases primary mock p99 latency by >15%. |
| Stage 1 → Stage 2 (Canary) | Live candidate sustains ≥99.9% non-5xx rate under sampled shadow load; shadow response-schema/payload parity diffs resolved; stateful endpoints wired with Tenant-Cohort / Tenant-Id pinning rules. |
Any split-brain state error, 5xx/gRPC UNAVAILABLE rate exceeding SLO budget, or retry amplification spike. |
| Stage 2 → Stage 3 (100% Live) | Dogfood/canary cohorts pass full business-transaction reconciliation; p95/p99 latency, DB lock contention, and downstream async events match production NFR targets; fail-closed 503/UNAVAILABLE behavior verified. |
SLO breach or elevated error budget burn on non-mutating paths (mutating paths fail closed and roll forward/hotfix rather than falling back to mocks). |
| Stage 3 → Mock Retirement | 14–30 days stable at 100% live; CI tests migrated to ephemeral contract runners; sunset ticket approved to remove permanent mock pods and stale gateway rules. | Re-enable ephemeral contract mock in CI only—never restore retired production fallback routes ad hoc. |
Decoupling routing from application code shifts complexity from the codebase into runtime contract governance, failure isolation, and traffic operations. Five operational guardrails keep mixed mock/live topologies safe and debuggable:
oasdiff CLI (Apache-2.0), self-hosted open-source Pact & Pact Broker (MIT), Microcks (Apache-2.0), Schemathesis (MIT), plus latency injection via Apache APISIX (mocking.delay / fault-injection) or Envoy Proxy (envoy.filters.http.fault).POST or DELETE requests without isolation risks double-charging customers, corrupting inventory, or firing duplicate webhooks; unbounded mirroring or slow shadow/mock upstreams can exhaust gateway connection pools and buffers, degrading primary traffic.GET / HEAD) operations unless the live service strictly enforces Idempotency-Key semantics or writes exclusively to an isolated shadow datastore (see Data Isolation Strategies). Cap mirror ratios (percent/fraction, sample_ratio, runtime_fraction), handle Envoy’s -shadow Host suffix (disable_shadow_host_suffix_append: true in v1.31+), isolate shadow connection pools and upstream timeouts, and verify shadow response parity asynchronously via telemetry or tap capture.RequestMirror with percent/fraction), Envoy Proxy (request_mirror_policies, tap filter, outlier detection), Apache APISIX (proxy-mirror), and OpenTelemetry (Apache-2.0).Served-By response header (Served-By: mock-microcks vs. Served-By: live-v1) on every route, record the resolved upstream cluster as a span attribute on distributed traces, and segment golden-signal metrics (latency, error rate, saturation) by upstream target.ResponseHeaderModifier), OpenTelemetry (Apache-2.0, CNCF Graduated), and Prometheus (Apache-2.0, CNCF Graduated).Route-Target: mock, Test-Scenario: timeout, or a forged Tenant-Cohort header, attackers could bypass live business logic, poison canary metrics, or trigger synthetic outages in production.Route-Target, Test-Scenario, Tenant-Cohort, Tenant-Id, and any legacy X- aliases) unconditionally at the North-South Edge API Gateway perimeter. Inside the East-West plane, enforce cryptographic workload identity via mTLS (mutual TLS) and gate Route-Target: mock or fault-injection rules exclusively to authorized CI/CD runner identities or dedicated non-production namespaces.Apache-2.0, CNCF Graduated) workload identities, Envoy Proxy / Apache APISIX header-sanitization filters, and Istio / Cilium L7 authorization policies.Apache-2.0, CNCF Graduated) with its Gateway API Traffic Router plugin, Prometheus (Apache-2.0), and Envoy Proxy circuit-breaking / outlier-detection policies.Combining Hexagonal Architecture with an East-West API Gateway solves real cross-team bottlenecks in medium-to-large microservice estates, but it introduces measurable infrastructure, financial, and organizational overhead. Evaluating it honestly requires comparing the available topologies side by side.
| Dimension | Centralized Internal East-West Gateway (Envoy Gateway / Apache APISIX) |
Decentralized GAMMA Service Mesh (Istio / Cilium) |
In-Process Hexagonal Test Double (Unit / Integration Harness) |
|---|---|---|---|
| Added Latency & Hairpinning | Medium (~1–3 ms extra network hop; potential cross-AZ hairpinning unless topology-aware routing is tuned). | Low (~0.2–1 ms via local sidecar or eBPF/ambient node proxy; no central hairpinning). | Zero network overhead (in-memory call within caller process). |
| Blast Radius & SPOF | High if monolithic; requires HA multi-replica fleets and domain-sharded gateways to cap Tier-0 risk. | Low per-workload blast radius (data plane distributed; control plane failure degrades config updates, not live traffic). | Isolated strictly to a single service’s test process. |
| Infrastructure & FinOps Cost | Moderate–High: HA gateway pods + mock clusters (Microcks/Prism) + self-hosted Pact Broker (MIT). |
Moderate–High: Per-node/sidecar memory & CPU overhead + mesh control plane + mock/contract tooling. | Negligible (runs inside existing CI runners only). |
| Protocol & Mocking Ergonomics | Strongest centralized policy, mocking/direct_response plugins, and unified team visibility for HTTP & gRPC. |
Strong HTTP/2 gRPC L7 splitting (GRPCRoute) & native SPIFFE mTLS; gateway-native mocking plugins are leaner. |
Full language-native flexibility, but zero live-traffic shadowing or canary graduation capability. |
| Operational Complexity | Moderate: Familiar gateway lifecycle, but requires GitOps self-service CRDs to avoid platform ticket queues. | High: Mesh upgrades, mTLS PKI lifecycle, eBPF/CNI kernel compatibility, and GAMMA spec maturity. | Low: Standard language testing frameworks; no cluster routing layer to maintain. |
FinOps & Operational Cost Reality: Running highly available East-West gateways, dedicated
MicrocksorPrismmock fleets, and a self-hosted open-sourcePact Broker(MIT) consumes real cluster CPU, memory, and engineering maintenance hours. That investment pays back rapidly when 5+ polyglot teams integrate asynchronously across shared contracts—and burns unnecessary budget when a 3-person team could test against in-process adapters instead.
Architecture patterns fail far more often on human incentives than on YAML syntax. Adopting this pattern means trading application-level code coupling for disciplined organizational and operational craft:
Served-By headers, clean dashboards, and unambiguous ownership over who owns each HTTPRoute CRD, incident triage slows to finger-pointing between platform and product teams.weight from 25 to 100 or flipping a cohort header is a production deployment. Define explicitly who is authorized to authorize live weight shifts—enforcing GitOps pull-request review, automated Argo Rollouts SLO gates, and auditable change logs rather than ad-hoc kubectl edit interventions.Teams inheriting legacy microservices cluttered with if (USE_MOCK) environment variables do not need a rewrite to adopt this pattern:
PaymentPort) in the caller and point its adapter through the East-West gateway while temporarily retaining the legacy flag behind a thin shim—verifying baseline latency, mTLS, and OpenTelemetry tracing first.Microcks or Prism) with realistic latency profiles behind the gateway, turn on CI schema parity (oasdiff + self-hosted Pact Broker), and validate Stage 1 read-only mirroring on a single low-risk endpoint.HTTPRoute / GRPCRoute manifests, confirm Served-By observability across dashboards, and permanently delete application-level mock conditionals and environment toggles.PaymentPort during unit and integration tests give you 90% of the hexagonal benefit with zero proxy or mock-fleet infrastructure to run.HTTPRoute / GRPCRoute CRDs per service team), manually filed gateway tickets will erode the very developer velocity this pattern is meant to unlock.Envoy, Apache APISIX, Istio, Cilium, and Kubernetes Gateway API GAMMA) with cryptographic identity and isolation guardrails.HTTP 503 or gRPC UNAVAILABLE.mocking, proxy-mirror, and traffic-split Plugins (Apache-2.0)proxy-mirror Plugin Documentation (Apache-2.0)traffic-split Plugin Documentation (Apache-2.0)HTTPRoute, GRPCRoute, and RequestMirror Fraction (GEP-3171) Specification (Apache-2.0)traceparent and tracestate)Idempotency-Key HTTP Header FieldEnvoy Proxy, Apache APISIX, Kubernetes Gateway API), contract-driven mocking (Microcks, Prism), 4-stage mock-to-live traffic graduation, and operational guardrails.