Service mesh and gateway: VPC Lattice here, Istio evaluated
Service mesh and gateway: VPC Lattice here, Istio evaluated
Target, not deployment. Nothing in this repository is meshed, and the Istio manifests that used to sit undersearch-platform/k8s/mesh/have been removed: the repo now carries the AWS-only edge insearch-platform/k8s/lattice/instead. The Istio shapes below were validated against Istio 1.30.3 and Gateway API CRDs on thekind-repro-testlab ( ljluestc/k8s ), which runs Istio with its ingress gateway, Kiali, Bookinfo, an ambient network policy, Envoy Gateway, NGINX Gateway Fabric, Linkerd and Kuma side by side. That lab is where every claim below was, or can be, tried. Sources are listed inslurps/README.md.AWS-only target. The target is built from AWS-managed services only: the ALB stays at the edge, and east-west traffic goes through Amazon VPC Lattice via the AWS Gateway API Controller once a second service exists. The Istio sections below are the alternative that was evaluated in the lab and rejected for the target, kept because they explain what Lattice does and does not replace.
Why this page exists
Two things on the SRE page cost application code: per-hop latency and error metrics, and trace propagation. Istio in Action opens with the argument that these are horizontal concerns, "not differentiating", and belong in infrastructure. Istio: Up and Running defines the mesh as policy-based network services that hold up under changing topology. Both are true; neither says a three-pod demo needs one. This page shows what a mesh would do for this app, what it would not, and the order in which to add it if the answer is yes.
One search call through the mesh
The ALB stays. It terminates the public TLS with the ACM certificate and forwards,
target-type: ip , to the gateway's Service instead of to the app pods. Everything to the right of the gateway is where the mesh applies policy:hop | sidecar mode | ambient mode |
|---|---|---|
gateway to pod | Envoy in the pod: mTLS, timeout, retry, metrics | ztunnel on the node: mTLS and L4 metrics; a waypoint only if the namespace asks for L7 |
pod to MySQL and OpenSearch | egress through the sidecar; the ServiceEntry names the host so it is metered and timed | ztunnel passes TLS through; no L7 view of the SigV4 call |
cost per pod | about 50 m CPU and 60 to 100 MiB per sidecar; three app pods plus the sync pod on three t3.medium nodes is a visible share | no per-pod cost; one ztunnel per node, one waypoint per namespace |
change to the Deployment | injection label, and the pod restarts | none: the namespace label is enough |
If a mesh were chosen over Lattice, ambient would be the mode, for that last row alone: the
search-platform Deployment and its Flyway Job keep working unchanged, and the sync replica's single-pod guarantee is not disturbed by an injected container.The control plane, and the first thing to check when it misroutes
The Envoy configuration deep-dive on jimmysong.io is the clearest account of this: a sidecar's effective configuration is four sections (bootstrap, listeners, clusters, routes), of which only bootstrap is static, and the rest arrive from istiod over the xDS stream. Two consequences for the on-call engineer:
-
istioctl proxy-statusis the first command, before any log. A proxy that isSTALEorNOT SENTon any of LDS, RDS, CDS or EDS is serving old routes, and no amount of reading the VirtualService explains what it is doing.
-
istioctl proxy-config routes <pod>andconfig_dumpare the second. The 6,000-line dump is what the proxy believes; the YAML is what you asked for.
Add both to the triage order on the SRE page as step 0 when the mesh is in.
Who owns what: the application, or the proxy next to it
This is the chart that decides whether the mesh is worth having for this codebase. Reading it against the tips:
- Timeouts and retries ( Tip 12 ): the mesh can own them for the read path, and the
VirtualServicedoes so for/api/search. It must not own them for the bulk index or the admin upsert, because a proxy retry of a non-idempotent call is a duplicate write. The app's timeouts stay; the proxy's are added in front.
- Circuit breaking: Tip 12 deferred a breaker. Outlier detection in the
DestinationRuleis that breaker, with no library in the app, and it ejects a single bad pod rather than tripping the whole client.
- Identity ( Tip 9 ): STRICT mTLS and an
AuthorizationPolicydecide which ServiceAccount may call which path. The tenant is still a claim inside a bearer token that only the app can read. The mesh answers "who is calling"; the app answers "whose rows".
- Correlation ( Tip 16 ): the mesh produces a span per hop only if the app forwards
traceparentandx-request-idon its outbound calls. The correlation filter already echoes the id; forwarding it into the OpenSearch client is the remaining line.
- Metrics:
istio_requests_totalandistio_request_duration_millisecondsgive the availability and latency SLIs from the SRE page per source and destination with no Prometheus registry in the app. The outbox backlog, the Hikari pool and the JVM remain the app's to export.
The fallacies of distributed computing, as the InfoWorld article translated on cloudnative.jimmysong.io maps them, against what this app does today:
fallacy | what Istio offers | what this app does today |
|---|---|---|
the network is reliable | outlier detection, load balancing | nothing between pods; the ALB health-checks targets |
latency is zero | timeouts, retries | Tip 12's connect and read timeouts on the ES client |
bandwidth is infinite | rate limiting via Envoy filters | none |
the network is secure | mutual TLS | plain HTTP inside the VPC; TLS only at the ALB and to the managed services |
topology does not change | service discovery through EDS | Kubernetes Service and the ALB target group |
there is one administrator | RBAC on mesh resources, AuthorizationPolicy | one Terraform state, one kubeconfig |
transport cost is zero | gRPC and protobuf | JSON over HTTP/1.1 |
the network is homogeneous | dynamic routing, canary, A/B | RollingUpdate with a readiness gate |
Adoption path: gateway first, mesh second, sidecars last
The order comes from the Envoy Gateway article on zhaohuabing.com, whose observation is organisational rather than technical: meshes stall because the operations team pushes them onto developers who see no benefit, while a gateway lands because developers want routing and the operators get Envoy's telemetry for free. Its migration paths are what make the order reversible here:
- an
HTTPRoutewritten against Envoy Gateway binds unchanged to Istio's ingress gateway, because both implement the Gateway API, so the edge does not have to be rewritten when the mesh arrives;
- Envoy Gateway can also stay as the north-south edge with Istio doing east-west, which is the shape the lab runs with both installed.
On AWS the same gateway-first order holds, with the gateway being managed rather than run: the AWS Gateway API Controller reads the same
HTTPRoute objects and programs VPC Lattice, so the route manifests stay Gateway API and portable, and there is no in-cluster Envoy to patch. Lattice auth policies then answer "who is calling" with an IAM principal instead of a mesh-issued certificate.For this repository the honest answer to the first question on the chart is "no": one service sits behind the edge, so the ALB Ingress is enough today. The page exists so that when
search-platform and whereami share a cluster, or a second consumer of the search API appears, the next step is already drawn.How the options compare
Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article