Skip to content
Skip to Content

Load balancer on or off

One replica behind a public service's addresses, or several replicas balanced by OpenPanel's edge.

Every public service is reached through OpenPanel's edge. The load balancer setting decides how many replicas stand behind it.

In the console, the setting is the Load balancer and replicas card on a service's Settings tab, and the same section in New service. The CLI, the API and MCP do the same.

Load balancerWhat runs
Off (the default)One replica. Every request and connection goes to it.
On1 to 100 replicas, on one server or several. The edge spreads the traffic over the ones that are ready.

How the edge spreads traffic

The edge sends each HTTP request to the ready replica with the fewest requests in flight, on whichever server it runs. A TCP port is balanced the same way per connection, and a UDP port per client address. A replica is ready when its container runs and passes its health check; one that fails it gets no traffic until it passes again.

Two requests from one visitor can reach two different replicas. Keep sessions and uploads somewhere every replica can read, such as a database, not in a replica's memory or disk.

Turn it on

Open the project, click the service on the canvas, and go to its Settings tab. In Load balancer and replicas, turn Load balancer on, set Replicas, and click Save. Then deploy the service from its Overview tab.

Turn it off

A public service without the load balancer runs one replica, so set both at once:

openpanel services update web --project shop --no-balancer --replicas 1

In the API, send {"balancer": false, "replicas": 1}.

Which services can use it

ServiceLoad balancer
PublicYes
PrivateNo: a private service runs one replica
With no addressNo: it can run several replicas without it, reached only by the project's other services on the same server
With a volumeNo: it always runs one replica; see The single-instance rule

The messages for each case are listed in Service settings.