Skip to content

SYSTEM Cited by 1 source

ServiceRouter (Meta service mesh)

Definition

ServiceRouter is Meta's hyperscale service mesh: the discovery and routing substrate through which services locate and reach one another. It provides service discovery (regional tiers register and are discovered so callers stay near their target), request routing by weighted consistent hashing, and controlled cross-region routing. It is documented publicly in Meta's "ServiceRouter: Hyperscale Service Mesh at Meta" talk. (Source: sources/2026-09-03-meta-zgateway-learnings-from-putting-a-proxy-in-front-of-zippydb)

Canonical wiki role

ServiceRouter is the substrate ZGateway rides on, and the ZGateway post is the first canonical wiki disclosure of it. Three ServiceRouter properties shape ZGateway's design:

  1. Regional discovery — ZGateway is deployed as regional tiers discovered through ServiceRouter, keeping every client near its gateway.
  2. Weighted consistent hashing — ServiceRouter routes by weighted consistent hashing, so the lever for balancing load across heterogeneous ZGateway hosts (~26 to ~126 cores) is the weight per host. A ZGateway control-plane balancer computes weights from recent per-host CPU. On cache tiers, moving a weight moves keys, so weight changes are throttled to the most-imbalanced hosts.
  3. Cross-region routing — because ZGateway sits on ServiceRouter, routing can cross region boundaries in controlled ways: global routing (a routing table spanning regions), mega-regions (grouping geographically close regions so overflow spills nearby), and rings (declaring which regions back each other up and in what proportion). Each is gated per tier/region behind a percentage knob.

ServiceRouter also participates in overload protection: a hot ZGateway host turns into error-rate spikes and ServiceRouter throttling, which is precisely what the weight-based balancer exists to prevent. (Source: sources/2026-09-03-meta-zgateway-learnings-from-putting-a-proxy-in-front-of-zippydb)

Relationship to other meshes

ServiceRouter is Meta's peer to Envoy/Istio-style service meshes — a control + routing plane for service-to-service traffic — but is Meta-internal and specifically noted for weighted-consistent-hash routing and hyperscale (millions of hosts). TLS termination for ZippyDB traffic lives in the Thrift/ServiceRouter stack (see systems/fbthrift).

Seen in

Caveats

  • Stub — scoped to what the ZGateway post discloses. ServiceRouter's own internals (control plane, config distribution, protocol) are covered in Meta's dedicated talk but not yet canonicalized here. Expect expansion as more Meta infra posts are ingested.
Last updated · 766 distilled / 2,225 read