Load Balancing & Delivery参照資料確認: 2026-09-11

L4 vs L7 Load Balancing Decision

AzureのL4/L7配信を、protocol transparency、TLS、Host/path routing、WAF、client IP、regional/global、DNS proxy境界で選定する。

この記事の目次

L4 vs L7 Load Balancing Decisionを理解するための前提

Azure Load Balancer/Gateway Load BalancerはL4 flowを扱い、Application Gateway/Front DoorはHTTP(S)等のproxyとしてL7 requestを扱う。 L4はTLSをbackendまでpass-throughでき、backendがoriginal client source IPを見られる一方、HTTP host/path/WAF等は理解しない。

L7 proxyはclient/backend connectionを分離し、TLS termination、Host/path routing、WAF、rewrite等を提供する。original client IPは通常X-Forwarded-For等で渡す。 Application Gatewayはregional/VNet-integrated L7、Front Doorはglobal edge L7、Traffic ManagerはDNS steeringでdata pathに入らない。

stateful NVA insertionはHA Ports/Gateway Load Balancerなどapplication load balancingとは別problem。 選定は「globalかregionalか」より先に、protocol、proxy許容性、TLS ownership、application-aware controlが必要かを固定する。

通信や判断の流れを追う
ClientEdge / Load balancerRouting / HealthBackend

Control plane / Data plane / Observability

L4

TCP/UDP flow。payloadを理解しない。

L7 proxy

HTTP(S) request。TLS/Host/path/header/WAFを扱う。

DNS steering

Traffic Manager。endpoint選択だけでpacket pathには入らない。

判定原則L4 flow、L7 proxy、DNS steering、NVA chainingを同じ「load balancing」として扱わず、clientが最終的にどのIPへ接続し、どこでconnectionが終端/再生成されるかを最初に固定します。

Client-to-backend path

  1. protocolがHTTP(S)かraw TCP/UDPかを固定する。
  2. proxy terminationを許容できるかを確認する。
  3. TLS termination/end-to-end/mTLS ownershipを決める。
  4. Host/path/WAF/rewrite/cache等のL7機能要否を決める。
  5. regional/global/DNS-only placementを決める。
  6. client IP、origin security、health model、egressを最後にservice固有設計へ落とす。

仕組みを分解する

「443だからL7」「globalだからFront Door」と短絡しないことが重要です。443でもTLS pass-throughのraw TCPならL4要件です。逆にregionalでもHost/path routingやWAFが必要ならApplication Gatewayです。Traffic Managerはglobalですがproxyではないため、TLS/WAF/cacheを提供しません。

運用時はresource configurationだけで完了判定せず、実clientからの名前解決、TCP/TLS handshake、HTTP status、backend側のsource IP/Host/header、health telemetryを同じtimestampで揃えます。load balancer/proxyがhealthyでもapplication dependencyが壊れている場合があり、逆にbackend applicationが正常でもhealth probe条件やrouting ruleが不整合ならtrafficは到達しません。

設計判断

判断軸設計方針
Raw TCP/UDPStandard Load Balancer。NVA chainingならGateway LB/HA Portsを比較。
Regional HTTP(S)Application Gateway v2。WAFならWAF_v2。
Global HTTP(S)Front Door Standard/Premium。managed WAF/Private Link originならPremium。
DNS-only steeringTraffic Manager。endpoint側serviceと組み合わせる。

確認手順

Read-only verification

  • protocol/portだけでなくactual handshakeとHTTP semanticsをpacket captureで確認する。
  • backendがsource IPをpacketで必要か、headerでよいかをapplication ownerと固定する。
  • TLS termination pointとcertificate/private key ownerをdiagramに記載する。
  • health probeがL4/L7のどのfailureを検知するかtestする。

Evidence to keep

  • resource ID / subscription / region / frontend / backend targetを保存し、同名resource取り違えを防ぐ。
  • DNS answer、source IP、destination IP/port、Host/SNI、health status、timestampを同じincident recordへ残す。
  • 変更前後で同じclient journeyをnew connectionとして再実行する。
  • Portal表示だけでなくCLI/PowerShell/APIまたはlogsを併用し、観測面の一時差を識別する。
Azure CLI — read-only first
az network lb list -o table
az network application-gateway list -o table
az afd profile list -o table
az network traffic-manager profile list -o table
PowerShell — read-only first
Get-AzLoadBalancer
Get-AzApplicationGateway
Get-AzFrontDoorCdnProfile
Get-AzTrafficManagerProfile

障害切り分け

症状第一候補証拠次の確認
HTTP route不可L4 service選択service typeAppGW/Front Door比較
client IP必要proxy/L4要件未整理backend source/headerL4 or XFF trust
global failover遅いDNS steering TTLTTL/connection pathFront Door proxy比較
mTLS壊れるTLS termination pointhandshake/certpass-through/feature確認
NVA asymmetryapp LBとservice chain混同packet pathGWLB/HA Ports

変更時の確認と rollback

  • service migrationはDNS/VIP切替をseparate phaseにする。
  • TLS termination変更はcertificate/hostname/client behaviorをbefore/after保存する。
  • proxy導入時はHost/XFF/redirect/cookie回帰を行う。
  • rollback pathはold endpointをTTL期間維持する。
Change safety: health probe、DNS、TLS certificate、WAF/routing rule、backend poolを同時に変えるとfailure domainを判別できません。1 hypothesisずつ変更し、各段階で同じobservable journeyを再実行します。

Current notes — 2026-09-11

Current behavior / guidance

2026時点でもservice boundaryは明確: Load Balancer=L4、Application Gateway=regional L7、Front Door=global edge L7、Traffic Manager=DNS steering。

Official sources

動作、retirement、feature availability、health/TLS behaviorはMicrosoft Learnのcurrent documentationを基準に確認しています。production変更時は対象subscription/region/SKUの最新documentationとresource provider stateを再確認してください。