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 6 of 10 · on a machine · 4 min

A floating address

The application copies now cover for each other, but there is only one load balancer — a single point of failure. This step adds a second load balancer and a shared site address.

If nginx stops, or the whole machine with it, the site is down no matter how many application copies stand behind the load balancer. That is why load balancers come in pairs, on different machines.

For the exercise, this machine holds two: node1 is the machine itself, node2 is the lab-node2 network namespace with its own interface, site and keepalived. The machines are linked through the lab-n1 interface, and the site is opened at 192.0.2.100.

Exercise · look

Stop keepalived on node1

Look at the addresses of the lab-n1 interface and request the site at 192.0.2.100. Then stop keepalived on node1 and repeat the request and the address check.

First, predict

keepalived on node1 is stopped, nginx on node1 is running. What will the address 192.0.2.100 answer?

Now start the exercise, run the command and compare your prediction with the output.

Sign in and start The machine is available after signing in
Ubuntu 24.04
Loading…