Filters
Zo zoek je
  • Gewone woorden vinden namen, teksten en voorbeelden.
  • "twee woorden" vindt precies die zin.
  • --naam of -x vindt een optie.
  • #woord zoekt alleen in commando's.
  • @grep vindt lessen en labs die grep gebruiken.
  • Filters: cat:network · in:labs · in:notes · level:rhcsa · ch:8 · root:yes. Zet ! voor een woord om het weg te laten. OR tussen woorden betekent één ervan.
  • ↑ ↓ bewegen · Enter openen · Esc sluiten · / zoeken

Hoofdstuk 11Naam in de cursus: Configure load balancing and troubleshoot network connectivity

Balance load and fix connection problems

Several VMs behind one address give speed and availability. Azure Load Balancer works on layer 4 (TCP/UDP); Application Gateway on layer 7 (HTTP, with a web application firewall). Network Watcher finds out why a connection fails.

  • 5 Lessen
  • 2 Commando's

Dit deel is nog niet vertaald. Je ziet de Engelse tekst.

$ als gewone gebruiker# als root (of met sudo)

Vaardigheden in dit hoofdstuk

  • Load balancing instellen en verbindingen controleren

11.1

Choose the right load balancer

Pick by layer and by scope.

ServiceLayerScopeUse
Azure Load Balancer4 (TCP/UDP)RegionVMs, any TCP/UDP service
Application Gateway7 (HTTP/S)RegionWeb apps, path routing, TLS end, WAF
Front Door7GlobalGlobal web apps, CDN, WAF
Traffic ManagerDNSGlobalSend users to the nearest healthy region

11.2

Build a public load balancer

A Standard load balancer has a frontend IP, a backend pool, a health probe and a rule that joins them.

az network lb create -g rg-web -n lb-web --sku Standard --public-ip-address pip-lb-web --frontend-ip-name fe-web --backend-pool-name be-web
az network lb probe create -g rg-web --lb-name lb-web -n probe-http --protocol Http --port 80 --path /health
az network lb rule create -g rg-web --lb-name lb-web -n rule-http --protocol Tcp --frontend-port 80 --backend-port 80 \
    --frontend-ip-name fe-web --backend-pool-name be-web --probe-name probe-http
az network nic ip-config address-pool add -g rg-web --nic-name vm-web1VMNic --ip-config-name ipconfig1 --lb-name lb-web --address-pool be-web
az network lb show -g rg-web -n lb-web --query "frontendIPConfigurations[0].publicIPAddress.id"
PartMeaning
Frontend IPThe address clients use (public or private)
Backend poolThe VMs or scale set that do the work
Health probeChecks every VM; a failing VM gets no traffic
Load-balancing ruleFrontend port → backend port, with the probe
Inbound NAT ruleOne frontend port → one VM (for example admin access)
Outbound ruleHow backend VMs reach the internet

Onthoud

A Standard load balancer is closed by default. The NSG of the backend must allow the traffic and the probe (service tag AzureLoadBalancer).

Commando's in deze les

11.3

Build an internal load balancer

An internal load balancer has a private frontend IP — for the app or database tier.

az network lb create -g rg-web -n lb-app --sku Standard --vnet-name vnet-prod --subnet snet-app \
    --private-ip-address 10.20.2.10 --frontend-ip-name fe-app --backend-pool-name be-app

Commando's in deze les

11.4

Troubleshoot load balancing

Most problems are the probe, the NSG, or the app not listening.

  1. Is the health probe green? Portal: Load balancer → Insights / Monitoring → Health probe status.
  2. Does the app answer on the probe port and path on the VM itself? curl -I http://localhost/health.
  3. Does the NSG allow the client traffic and AzureLoadBalancer?
  4. Is the VM really in the backend pool (the right NIC and IP configuration)?

Commando's in deze les

11.5

Use Network Watcher

Network Watcher has tools that test the path and the rules without guessing.

az network watcher configure -g NetworkWatcherRG -l westeurope --enabled true
az network watcher test-connectivity -g rg-web --source-resource vm-web1 --dest-address 10.20.2.10 --dest-port 5432
az network watcher show-next-hop -g rg-web --vm vm-web1 --source-ip 10.20.1.4 --dest-ip 8.8.8.8
az network watcher test-ip-flow -g rg-web --vm vm-web1 --direction Outbound --protocol TCP --local 10.20.1.4:50000 --remote 10.20.2.5:5432
ToolAnswers
IP flow verifyWhich NSG rule allows or blocks this packet?
Next hopWhere does the route send this packet?
Connection troubleshootCan A reach B on this port, and where does it fail?
Connection monitorTest a path all the time and alert
VNet flow logsLog all traffic (to storage, analyse with Traffic Analytics)
Packet captureCapture packets on a VM

Op het werk

Check in this order: DNS → route (next hop) → NSG (IP flow verify) → the service itself.

Commando's in deze les

Alle commando's in dit hoofdstuk