Create a TCP load balancer
It is possible to create a load balancer for almost any kind of TCP service.
Last updated
Was this helpful?
It is possible to create a load balancer for almost any kind of TCP service.
It is also possible to load balance TCP traffic that is not HTTP, such as PostgreSQL servers.
To set up a load balancer for TCP, create a new listener and select tcp under Mode. Enter the TCP port the listener should listen on. Then, add the targets and their TCP ports.
In the example below, we use PostgreSQL servers behind the load balancer.

Use the loadbalancer/create endpoint in the API to create a load balancer.
To add a listener to the load balancer, use the loadbalancer/addfrontend endpoint.
To add a target (server) to the load balancer, use the loadbalancer/addbackend endpoint.
To add a certificate to the listener for SSL traffic, use the loadbalancer/addcertificate endpoint.
Additional load balancer endpoints are available in the loadbalancer module.
Last updated
Was this helpful?
Was this helpful?