Menu

Earn Premium with Referrals

Invite your friends and earn Premium rewards through our referral program.

See how it works and start inviting friends.

Service Discovery in the Mesh
HLD

Service Discovery in the Mesh

How meshes know about endpoints — platform integration, EDS flows, and multi-cluster federation.

The Mesh as Discovery Consumer

 meshes don't replace discovery platforms — they CONSUME them:

 kubernetes: watches Services/Endpoints/EndpointSlices
   → builds its internal service registry
 cloud/VM estates: integrate via registry adapters or
   WorkloadEntries (declared external endpoints)

 flow:
 [k8s API: pods change]──watch──►[control plane]
                                      │ computes config (EDS)

                        all proxies updated in seconds

 proxies then load-balance across CURRENT healthy endpoints
 without DNS round-robin staleness problems.

What Mesh Discovery Adds Over Plain K8s

 □ UNIFORM ACROSS CLUSTERS/CLOUDS: one namespace view
   spanning k8s + VMs + other clusters (federation)
 □ HEALTH-AWARE LB built-in: passive outlier ejection +
   active health checks beyond kubelet probes
 □ LOCALITY AWARENESS: region/zone/subzone routing priority:
     same-zone first → same-region fallback → anywhere
   (latency AND cross-zone cost optimization, declaratively)
 □ RICH SUBSETS: route to version-labeled endpoint groups
   (v1/v2 splits are discovery-level, not app-level)

Multi-Cluster Federation Patterns

 three trust/topology models:

 SINGLE network: clusters share one flat network;
   endpoints directly routable. simplest.
 MULTI-network: east-west gateways bridge clusters;
   traffic crosses via tunnels; identity preserved.
 CENTRALIZED control plane watching many remote APIs vs
 EACH cluster with local control plane + trust exchange:
   
   scale/intuition: local control planes per cluster +
   trust bundles exchanged = fewer catastrophic couplings.

 split-horizon gotchas worth naming:
 - service NAME collisions across clusters
 - locality labels must be truthful or zone-affinity lies
 - endpoint propagation lag between clusters (seconds)
NeedMesh feature
VMs and k8s one meshworkload entries / auto-registration
Zone-cost reductionlocality-aware LB weighting
Blue/green at fleet levelsubsets + routing
Cross-region DRfailover priority configuration

Interview Framing

“How does your 3-cluster mesh keep proxy state current?” scored shape: platform-watch→control-plane→xDS-push pipeline drawn, federation model chosen with reasoning (multi-network + local control planes for scale), locality-aware routing named with WHY (latency+cost), subset-based canaries tied back to discovery. Mesh-discovery questions test whether you see the mesh as a distributed SYSTEM over registries rather than a magic box.

My Private Notes

Notes are auto-saved locally to this device.