Azure Load Balancer vs. Application Gateway – Vergleich 2025

Layer 4 vs. Layer 7 Load Balancing in Azure

S
SeeColors IT
11. Juni 20264 Min. Lesezeit122 Aufrufe

Azure Load-Balancing-Portfolio

Dienst Layer Scope Typischer Einsatz
Load Balancer 4 (TCP/UDP) Regional VM-Pools, interne LB
Application Gateway 7 (HTTP/HTTPS) Regional Web-Apps mit WAF
Front Door 7 (HTTP/HTTPS) Global Multi-Region, CDN
Traffic Manager DNS Global DNS-basiertes Routing

Azure Load Balancer (Layer 4)

# Public Load Balancer erstellen
az network lb create \
  --name lb-webapp \
  --resource-group rg-firma-prod \
  --sku Standard \
  --public-ip-address pip-lb-webapp \
  --frontend-ip-name frontend-lb \
  --backend-pool-name backend-pool

# Health Probe
az network lb probe create \
  --lb-name lb-webapp \
  --resource-group rg-firma-prod \
  --name health-probe-http \
  --protocol Http \
  --port 80 \
  --path /health

# Load Balancing Rule
az network lb rule create \
  --lb-name lb-webapp \
  --resource-group rg-firma-prod \
  --name lb-rule-http \
  --protocol Tcp \
  --frontend-port 80 \
  --backend-port 80 \
  --frontend-ip-name frontend-lb \
  --backend-pool-name backend-pool \
  --probe-name health-probe-http

# VM zum Backend-Pool hinzufügen
az network nic ip-config update \
  --name ipconfig1 \
  --nic-name nic-vm01 \
  --resource-group rg-firma-prod \
  --lb-name lb-webapp \
  --lb-address-pools backend-pool

Application Gateway (Layer 7)

Application Gateway versteht HTTP/HTTPS und ermöglicht:

  • URL-basiertes Routing (/api/* → Backend A, / → Backend B)
  • SSL-Terminierung (Zertifikate zentral)
  • Web Application Firewall (WAF)
  • Session Affinity (Cookie-basiert)
  • Redirect HTTP → HTTPS
az network application-gateway create \
  --name agw-firma \
  --resource-group rg-firma-prod \
  --vnet-name vnet-firma-prod \
  --subnet snet-agw \
  --capacity 2 \
  --sku WAF_v2 \
  --public-ip-address pip-agw \
  --priority 100

URL-basiertes Routing

# Backend Pool für API
az network application-gateway address-pool create \
  --gateway-name agw-firma \
  --resource-group rg-firma-prod \
  --name backend-api \
  --servers 10.0.2.10 10.0.2.11

# Routing Rule: /api/* → backend-api
az network application-gateway url-path-map create \
  --gateway-name agw-firma \
  --resource-group rg-firma-prod \
  --name path-map \
  --paths "/api/*" \
  --address-pool backend-api \
  --http-settings api-settings \
  --default-address-pool backend-web \
  --default-http-settings web-settings

Entscheidungshilfe

Brauchen Sie globales Load Balancing (Multi-Region)?
  JA → Azure Front Door
  NEIN ↓

Ist es HTTP/HTTPS Traffic?
  JA → Application Gateway (+ WAF für öffentliche Web-Apps)
  NEIN → Azure Load Balancer (TCP/UDP)

Kosten

Dienst Preis/Monat (geschätzt)
Load Balancer Standard ~20 € + Daten
Application Gateway WAF_v2 ~200–400 €
Front Door Standard ~30 € + Daten

FAQ

Kann ich Application Gateway als Ingress für AKS nutzen?
Ja – AGIC (Application Gateway Ingress Controller) ist das empfohlene Setup für AKS.

Wann reicht Load Balancer, wann brauche ich Application Gateway?
Load Balancer für interne Services und nicht-HTTP-Protokolle. Application Gateway für externe Web-Apps – besonders wenn WAF oder URL-Routing benötigt wird.

Fazit

Für externe Web-Apps: Application Gateway mit WAF. Für interne VM-Pools und nicht-HTTP: Load Balancer. Für globale Deployments: Front Door.

Azure Load Balancing Architektur für KMU in Heidelberg, Mannheim und der Rhein-Neckar-Region. Beratung anfragen.

Artikel teilen

War dieser Artikel hilfreich?

Dein Feedback hilft uns, bessere Inhalte zu erstellen.

Kommentar hinterlassen

Verwandte Artikel