ロードバランサー
トラフィックをアプリサーバーに振り分け、死んだホストを次のヘルスチェックで外します。
このページはまだ日本語に翻訳されていません。
The Load Balancer spreads requests across your App Servers, or queries across a Database and its Read Replicas, as a reverse proxy such as NGINX or HAProxy does.
When to place it#
Place it when you need a second App Server.
Place it when hosts behind DNS have mixed sizes.
Resize it when its card shows it near its throughput limit.
Leave sticky sessions off until a cache or a Hub gains from them.
How it works#
It spans every zone, so a zone outage does not take it down. Every request kind comes in and goes on, and an L4 one also passes on every query kind, so it can sit in front of a Database and its Read Replicas. An L7 one reads HTTP and refuses queries. It adds a little latency, and each size step doubles its throughput limit.
By default it splits traffic by each target's capacity, so a large App Server gets a larger share. It drops a dead host at its next health check. It sends every kind it receives to every target, so an API Gateway in front is what sends page views and API calls to different server groups.
Options#
| 設定項目 | 設定値 | 表示条件 |
|---|---|---|
| バリアント | L7 / L4 | 常時 |
| ポリシー | 重み付き / ラウンドロビン / 最小接続数 / 2択 / コンシステントハッシュ | 常時 |
| セッション | 分散 / 固定 | 常時 |
| スロースタート | オフ / オン | 常時 |
| ヘルスチェック | 2 s / 10 s / 30 s | 常時 |
| 深いチェック | 浅い / 深い | 常時 |
Variant: L7 terminates HTTP, so it can retry a failed call and check health. L4 forwards TCP and passes queries too, so it can sit in front of a Database and its Read Replicas. L4 carries far more traffic, adds less latency, and bills less, and it gives up retries and HTTP awareness. See Layer 4 and layer 7 load balancing.
Policy: how it picks a target. Weighted, the default, shares by each target's capacity, so a larger App Server gets a larger share. Round robin gives every target an equal turn. Least connections suits mixed sizes or runtimes. Two choices handles more traffic with a little imbalance. Consistent hash keeps a key on its target, and a target that leaves moves only its own keys. See Load balancing algorithms.
Sessions: Sticky keeps a user on the target it first reached, so an in-process cache or a realtime client finds its memory. It also unbalances the load, because pinned users do not move when you add a copy, and a target that dies takes its sessions with it. See Sticky sessions.
Slow start: a target that just joined takes a growing share of traffic instead of its full share. A new JVM copy then never answers at its cold speed, and the JVM warmup under load incident is much less likely. See Cold start.
Health checks: how often the Load Balancer asks each target whether it is alive. A shorter interval drops a dead target sooner and adds checks. A Deep check also asks about the Database behind the target, so a slow Database can remove every target at once. An interval other than the default and a deep check both need Health checks. See Drop dead nodes with health checks.
How it fails#
Overloaded, it drops requests before they reach any App Server.
A deep check takes out every App Server whose Database is down or overloaded. If that is all of them, the Load Balancer has nowhere to send traffic, so a slow Database becomes a full outage.
Instance failure#
Signs: The Load Balancer card goes grey and its callout reads "The host under this VM died. It still bills." Requests sent to it are stranded.
Do now: Select the Node and click Replace. It costs Cash and comes back cold.
Prevent: Run a second Load Balancer. A short health check interval stops it routing to a dead App Server behind it, and a long one keeps sending that host its share. Health checks sets the interval.
Certificate expired#
Signs: The Certificate expired banner appears, and every request through the Load Balancer fails, as through every other TLS Node.
Do now: Click Renew in the banner.
Prevent: Research Certificate automation and place a Secrets and Certificates Node, which renews the certificates before they run out.
Region outage#
Signs: One region's board goes grey and the Load Balancer in it goes down.
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, keep a copy in a second region, and add GeoDNS to send users there.
Tips#
Use least connections when App Servers have mixed sizes or runtimes.
Route slow kinds, such as exports, to their own App Servers.
ルール#
- 追加のコピーは 1 つ前より 25% 高くなります。
- 売却すると、最後のコピーの価格の 50% が戻ります。
- サイズは 6 段階です。1 段ごとに容量と支出が倍になります。
一緒に使えるもの#
ユーザー、アプリサーバー、データベース、DNS、コネクションプーラー、リードレプリカ、サーバーレス関数、APIゲートウェイ、リアルタイムハブ、オートスケーラー、シークレットと証明書
次に取るリサーチ#
ロードバランシングを手に入れると、次のリサーチがそれを土台に進みます。
セキュリティ#
これらの脆弱性がこのコンポーネントを狙います。猶予期間が終わる前にパッチを当てます。
- CVE-2026-1337, CVSS 9.8