Load balancing on the Stack Harbor PaaS sits on two layers. The platform-level Shared Load Balancer terminates inbound requests at the edge and routes them to the right environment. Inside an environment, an environment-level load balancer distributes requests across application server replicas. This page is the entry point for the environment-level balancers.
When you scale an application tier horizontally, a balancer is added to the topology automatically. You can also add and scale a balancer manually — including in front of a single application server — when you want to terminate TLS at the balancer, run access rules, or front a stack with caching.
The supported balancer stacks
- NGINX — Layer 7 balancing with content caching. The default choice and the right one for most HTTP workloads. Modular, low overhead, well understood.
- HAProxy — Event-driven proxy for TCP and HTTP. Stable memory footprint under high concurrency, smart persistence, an admin UI with live statistics.
- Varnish — HTTP-only caching reverse proxy. On the PaaS it ships bundled with NGINX in front to terminate TLS, so it composes with custom SSL.
- Apache balancer — Module-based balancer with broad customisation hooks. Useful when you already operate Apache and want a homogeneous tier.
- LiteSpeed Web ADC — Commercial high-performance ADC with HTTP/3 / QUIC, a web application firewall, Layer 7 anti-DDoS filtering, and offload features.
Running an application tier behind a load balancer with two or more nodes is the standard production pattern — it gives you redundancy and removes the application server itself as a single point of failure.
Where each layer fits
| Layer | What it does | Where it lives |
|---|---|---|
| Shared Load Balancer | Routes inbound requests from the public internet to the correct environment | Platform-managed, in front of every environment without a public IP |
| Environment balancer | Distributes requests across application server replicas in one environment | Inside the environment, as a dedicated node |
| Public IP | Bypasses the Shared Load Balancer and binds directly to a node | Attached to any environment-level node |
You can run the environment balancer behind the Shared Load Balancer (default) or expose it directly via a public IP — see the Public IP doc for the trade-off.
Backend health checks
Each environment-level balancer ships with a default health check so a failing replica is removed from rotation:
- NGINX — TCP check on the upstream port immediately before routing a request. On failure, the next node in the layer is tried.
- HAProxy — TCP checks every 2 seconds by default; results live in an in-memory state table.
- Varnish — Probes the configured URL once a minute with a 30-second timeout, declaring the backend unhealthy after 2 failures inside a 5-probe window.
- LiteSpeed ADC — TCP check on the internal IP every second with a one-second timeout, at the Worker Group level.
- Apache balancer — No default health check; configure one through Apache’s
mod_proxy_hcheckif you need active probing.
The defaults are reasonable starting points. Tune the interval, timeout, and failure threshold from the balancer’s configuration files via the dashboard’s file manager or over SSH.
Choosing a balancer
A rough decision tree:
- HTTP application with no specific caching requirement → NGINX
- TCP / HTTP mix, high concurrency, smart session persistence, statistics UI → HAProxy
- HTTP application where edge caching of static and cacheable dynamic content is the goal → Varnish
- Apache-shop preference, advanced rewrite rules, mod-based extension → Apache balancer
- HTTP/3 from day one, WAF, ADC-class performance, commercial support → LiteSpeed Web ADC
The choice is not permanent — you can change the balancer stack later by editing the environment topology.