What is a load balancer?

A load balancer spreads incoming requests across several instances.

What it is

A load balancer accepts requests and spreads them across several running instances of the same app. If one fails, new requests go to the others. A single instance would otherwise be the bottleneck and the only thing that can fall over: if it is gone, the site is gone.

More than one instance only helps if new requests still arrive when one of them stops answering.

What it is made of

It needs more than one address. It checks whether an instance still answers, often with a health check on a specific path. If it does not answer, the balancer takes it out of rotation, without you moving every connection by hand. When it comes back, the balancer takes it in again.

What goes wrong

Sessions are the trap. If a login hangs on one instance and the next request lands on another, the person is suddenly signed out. Either the session is readable for all instances, or the balancer sends the same person to the same instance every time. That has to be settled before the second server, not after.

What you otherwise look after yourself

A balancer is also the shared entrance for the certificate: the connection ends there, or it is passed through. Both are a decision, not an accident.

How it shows up on MainPath

MainPath takes on that distribution with the project once more than one instance is running. You do not put a separate splitter in front of every app.

All terms