Load Balancing

Load Balancing

Load balancing distributes incoming traffic and application workload across multiple backend components. In the platform, dedicated load-balancer nodes can be added automatically when application servers are horizontally scaled, and they can also be added or scaled manually through the environment topology wizard.

Load Balancing Overview

When an application-server layer is scaled to multiple nodes, the platform automatically adds a load-balancer layer to route requests between the available backends. Load balancer instances can also be selected manually when building or editing an environment topology.

Environment load balancer layer
A load-balancer layer can be added automatically or configured manually in the topology wizard.
!

Application-level and infrastructure-level balancing

This page describes load balancing inside an environment. The platform also provides Shared Load Balancers at the infrastructure level to route external requests to environments, except when applications are accessed directly through a Public IP.

Supported Load Balancer Stacks

The platform provides five managed load-balancer stacks:

NGINX

NGINX is a widely used open-source server designed for high performance and efficient resource usage. It requires no additional preconfiguration and provides built-in Layer 7 load balancing and content caching. Its scalability, security, and efficiency make it suitable for highly available application hosting.

HAProxy

HAProxy is a fast and reliable open-source proxy for TCP- and HTTP-based applications. It uses a single-process, event-driven request-handling model, maintains low and stable memory consumption, and can process many concurrent requests with persistence and DDoS-mitigation capabilities.

Varnish

Varnish is a high-performance HTTP reverse proxy and web-application accelerator focused on caching dynamic websites with heavy traffic. In the platform, it is bundled with NGINX, which acts as an HTTPS proxy and enables secure traffic processing and Custom SSL support. Its primary performance benefit comes from caching and offloading delivery of static content.

Apache Load Balancer

Apache Load Balancer is an open-source traffic-distribution server with extensive customization through its modular architecture. It can be adapted to specific environment requirements while supporting security, high availability, reliability, speed, and centralized authentication and authorization.

LiteSpeed Web ADC

LiteSpeed Web ADC is a commercial, high-performance application delivery controller. It supports technologies such as HTTP/3 and QUIC, provides Layer 7 anti-DDoS filtering and web-application firewall protection, and includes enterprise-level caching, acceleration, optimization, and offloading capabilities.

Production Recommendations

For production applications, using multiple compute nodes together with a load balancer is preferred. This architecture provides redundancy and improves the overall availability of the system.

Recommended architecture

Combine horizontal application-server scaling with a dedicated load-balancer layer to avoid a single backend becoming a point of failure.

Backend Health Checks

Each environment-level load balancer has its own default method for checking backend availability before routing traffic.

NGINX Performs a simple TCP check immediately before routing a user request. If the required server port is unavailable, the next backend node in the layer is selected.
HAProxy Runs regular TCP checks every 2 seconds by default and stores the results in an continuously updated backend-state table.
Apache Balancer Does not include a backend health-check procedure by default.
Varnish Uses configured backend probes. By default, checks run once per minute with a 30-second timeout.
LiteSpeed ADC Checks each backend through its internal IP every second, using a one-second timeout. The check is built into the Worker Group functionality.

Varnish Default Probe

Varnish backend servers are assigned the following default health-check parameters:

probe = { .url = “/”; .timeout = 30s; .interval = 60s; .window = 5; .threshold = 2; }
URLThe root path / is used for the probe request.
TimeoutThe backend has 30 seconds to respond.
IntervalThe health check runs every 60 seconds.
WindowThe most recent five probe results are considered.
ThresholdAt least two successful results are required within the probe window.

The default health-check settings can be adjusted according to application requirements through the platform file manager or by connecting to the node over SSH. Use the official documentation for the selected balancer stack when changing these settings.

!

Configuration caution

Incorrect health-check intervals, timeouts, or thresholds can route traffic to unavailable nodes or remove healthy backends prematurely. Test custom settings before applying them to a production environment.