Load-balance web servers with HAProxy health checks

8 steps · about 1 h 41 min · Intermediate

  1. Read the four sections of an HAProxy configuration (article, HAProxy Technologies, 12 min)

    Explains global, defaults, frontend and backend before you edit any.

  2. Pick a load-balancing algorithm for your traffic (article, HAProxy Technologies, 10 min)

    Compares round robin, least connections and hashing.

  3. Remove failed servers with active health checks (reference, HAProxy Technologies, 12 min)

    Keeps users off dead backends automatically.

  4. Watch backend state on the HAProxy stats page (article, HAProxy Technologies, 10 min)

    Shows how to read up/down state, sessions and errors.

  5. Set up and read HAProxy access logs (article, HAProxy Technologies, 12 min)

    Explains timers and termination codes for debugging slow requests.

  6. Keep sessions sticky and track clients with stick tables (article, HAProxy Technologies, 15 min)

    Covers persistence and per-client counters for rate limiting.

  7. Terminate TLS at HAProxy (article, HAProxy Technologies, 10 min)

    Shows how to offload HTTPS from the web servers.

  8. Look up any directive in the configuration manual (reference, HAProxy, 20 min)

    Is the authoritative reference when a tutorial leaves a gap.