Linux Labs

SRE practices: SLOs, incidents, redundancy / Stage 7 of 8

A load balancer and health checks

Not running Starting usually ~20 s
Leave the lesson

Step 10 of 10 · summary · 1 min

Summary

  • An upstream block hands out requests to copies in a circle; $upstream_addr and $upstream_status show who answered.
  • Passive health checks: a failure listed in proxy_next_upstream sends the request to another copy, and max_fails failures take a copy out for fail_timeout.
  • A 500 answer and a long silence become failures once you name them: http_500 and a short proxy_read_timeout.
  • The load balancer gets a backup too: keepalived moves the floating address to a standby machine within seconds.
  • The site answered 500 every other time: copy 8082 was sick, and by default nginx treated its 500 as an ordinary answer and passed it to every second client.
Ubuntu 24.04
Loading…