Load Balancing allows you to define multiple backends with which to receive the traffic directed at your X4B Service. Load Balancing is supported for both the Layer 4 (TCP/UDP) and Layer 7 (HTTP/HTTPS).

Load Balancing at Layer 7

There is multiple methods of balancing available for balancing connections to HTTP(s) services. All defined backends must be either HTTP or HTTPS.

Balancing Methods: - Default: Connections distributed 'fairly' using a weighted round-robin algorithm.

  • IP Hash: We will attempt to route connecting clients to a consistent server based on their connecting IP address.

  • Least Connections: The connecting client will be routed to the server with the least number of active connections.


An option is provided to cache and refresh DNS names outside the request loop. This cache will have slots for a certain number of DNS hosts (up to 4) and be refreshed at a rate not exceeding the record ttl. Each of these records will behave like a server in a round robin load balancing strategy. Stale records may be used in case of failed or slow requests.

The "DNS Cache Hosts" can be set to "0" to disable the DNS cache. DNS cache must be enabled for keepalive to function on DNS backends. If not enabled a DNS request will be made for each HTTP(s) request.


  • Weight: Some balancing methods have a weight property. A higher value here will result in more requests being sent to this backend.
  • Number of failures & Failure Timeout: After a number of failures we will remove a backend from the pool temporarily
  • Type: Backup backends are used if primary backends are offline


Statistics are provided in regard to the distribution of requests between backends in total and for a 30 day period.

Load Balancing at Layer 4

Sessions are balanced in a round-robin manner with best effort fairness. In the context of TCP one session is one connection. In the context of UDP one session is one unique tuple (srcip,srcport,dstip,dstport) in this way it is much the same as TCP connection.