VIPs, health checks, Nginx, certificates
Practise these as flashcards. One or two lines each; the ones you miss come back first.
Start freeL4 balances on IP and port and doesn't look inside; it's fast and works for any TCP/UDP. L7 understands HTTP, so it can route by host or path, terminate TLS, rewrite headers and run a WAF.
The LB probes each backend on a schedule, like a TCP connect or an HTTP GET expecting 200. A member that fails is pulled out of rotation until it passes again.
502: the proxy reached the backend but got a bad or refused response. 503: no healthy backends. 504: the backend took too long to answer.
Rewrites the client's source IP to the LB's own IP before sending to the backend, so the backend's reply comes back through the LB. Downside: the backend no longer sees the real client IP, so you insert X-Forwarded-For.
When the app keeps session data in local memory. Downsides: uneven load, and users lose their session if that server dies. Better fix: store sessions in Redis or a database so any server can handle any request.
Turn on the X-Forwarded-For header on the L7 load balancer and configure the web server to log it. For L4, use proxy protocol or route return traffic through the LB without SNAT.
Pool member health. Often the app team changed or removed the health check path, so every member fails the monitor even though the app runs. Fix the monitor or restore the path.
Usually the intermediate certificate isn't installed, so the chain is incomplete. openssl s_client shows it. Add the intermediate to the chain on the LB or web server.
Subject Alternative Names let one cert cover several hostnames. A wildcard like *.example.com covers one level of subdomains, not the bare domain or deeper levels.
Active-passive: one unit serves, the other waits and takes over the floating IP on failure. Active-active: both serve traffic for more capacity, but session state must be synced.
The monitor doesn't match reality: wrong path, Host header missing (send string), expects '200 OK' but gets a 302 to login, HTTPS monitor against an HTTP port, or the LB's self-IP/probe source is blocked by the host firewall or NSG. Test from the LB itself, with the exact monitor request.
Load Balancer: regional L4, any TCP/UDP. App Gateway: regional L7 with WAF, TLS offload and path routing. Front Door: global L7 edge with anycast, CDN and WAF for internet apps. Traffic Manager: DNS-based global routing and failover for any protocol. Pick by global vs regional and HTTP vs not.