サービスメッシュ

アプリサーバーとワーカーをリンクします。各ノードの隣のサイドカーが呼び出しをリトライし、遮断し、監視します。ホップごとに+1 ms、CPUの5%を使います。

このページはまだ日本語に翻訳されていません。

The Service Mesh stands for Istio and Linkerd: a sidecar proxy beside every service.

When to place it#

  • Place it when your App Servers and Workers are too many for per-Link settings to stay manageable.

  • Place it when a retry storm is what hurts you.

  • Skip it on a Database: a Database is not a service with a sidecar.

It unlocks with Service mesh in Series B, for 20,000 ◇, after Container orchestration. It is the same trade as a Kubernetes Cluster: automation pays off at a certain size, and it has a real operational cost.

How it works#

In the real product the proxy sits in the same pod as the service and takes over its network calls. Link App Servers and Workers into it. They have to run in a Kubernetes Cluster first, because the sidecar rides in the pod. Each one gets a sidecar, and every Link out of it changes:

GivesCosts
Retries at once, and a circuit breaker that opens on failure5% of the member's CPU
Per-Link metrics, and 20% more Insight on the traffic watched+1 ms on every hop
Mutual TLS between services5% of the member's Burn, as the sidecar's share
0.5 engineers of Platform Dev Hours, or a Platform team

The retries and the breaker need no research of their own: the sidecar runs them for you. A Link whose player set its own policy keeps it, because the mesh is a default, not an override. The 1 ms, the 5% and the 20% are the figures the mesh uses.

How it fails#

  • Naive retries amplify. A failing dependency gets its failed calls again, up to three times. On a bad day that is a retry storm, and the mesh is part of why.

  • The breaker hides the truth. While it is open the Link fails fast and sends nothing, so the calls that depend on it fail as refused, not as slow.

  • The 5% is always paid. A sidecar costs its share of the box whether the traffic is heavy or light, and the mesh bills it on its own line.

  • The 1 ms is per hop. A checkout that makes six calls pays 6 ms on top of its work.

  • Platform Dev Hours. Each mesh takes half an engineer from the product teams unless a Platform team runs it.

Region outage#

  • Signs: Every Node in one region goes grey at once, and that region's board goes grey with them.

  • Do now: Press Fail over on the banner. It needs Multiple zones and a second open region, and starts the Node again in the nearest other region, cold, for the price of a replacement. Otherwise it comes back when the incident ends: 180 sim seconds in the catalog, 60 once the error budget counts.

  • Prevent: Research Multiple regions and GeoDNS, then run a copy of it in a second region.

Tips#

  • Put the mesh on the services that call each other most, not on every Node.

  • Research Circuit breakers so a Link can set its own breaker and retry policy. The mesh then supplies only the metrics and the millisecond.

  • Watch the Insight line: a mesh on the services Analytics already samples earns 20% more, and that pays for the sidecars.

ルール#

  • 追加のコピーは 1 つ前より 25% 高くなります。
  • 売却すると、最後のコピーの価格の 50% が戻ります。
  • サイズは 1 つだけです。
  • トラフィックは受け取りません。ノードをここにリンクすると、その管理下に入ります。

一緒に使えるもの#

Kubernetesクラスター