Skip to Content
Open Beta — managed Kubernetes, DNS & more are live.
🔃

Load balancers

Updated 2026-11-20
On this page

Load balancers

A load balancer spreads incoming requests across a pool of instances and routes around unhealthy ones, giving you a single stable address in front of a changing set of servers.

A load balancer is built from a few parts that fit together. The load balancer itself owns a virtual IP (the VIP) on a subnet. A listener on that VIP accepts traffic for a protocol and port. The listener sends traffic to a pool, and the pool distributes it across its members, your instances, using a load-balancing algorithm. A health monitor continuously checks members and takes unhealthy ones out of rotation.

Patrii Cloud can create the whole chain, load balancer, listener, pool and members, in a single step, so you get a working front end without wiring each part by hand. You can then refine listeners, add health monitors, and layer on Layer-7 policies for content-based routing when you need it.

Give the VIP a floating IP to publish the service to the internet, and the public address stays put while you add, remove or rebuild the instances behind it.

Screenshot — A load balancer's detail page showing its VIP, listeners, pool members and their health status
A load balancer's detail page showing its VIP, listeners, pool members and their health status

Key concepts

Load balancer — The front-end object that owns a virtual IP (VIP) on a subnet.

VIP — The virtual IP address clients connect to; it stays stable as members change.

Listener — A protocol and port the load balancer accepts, e.g. HTTPS on 443.

Pool — A group of backend members plus the load-balancing algorithm used to spread traffic.

Member — One backend instance in a pool, given by its address and port.

Health monitor — A periodic check that removes unhealthy members from rotation and restores them when they recover.

L7 policy — A Layer-7 rule that routes or rejects requests based on their content (path, host header, and so on).

Before you start

  • A subnet for the VIP that is reachable by your clients.
  • For internet exposure, that subnet's network must be connected to a router with an external gateway so a floating IP can reach it.
  • Backend instances that are healthy and listening on the port you will balance.

Step by step

  1. Open Load balancers

    Go to Networking and open Load balancers.

    Screenshot — The Load balancers list with the Create button
    The Load balancers list with the Create button
  2. Choose a VIP subnet and plan
    • Create a load balancer and select the subnet where its VIP will live.
    • Pick a plan sized to your traffic; higher plans support more protocols and throughput.
    Screenshot — The Create load balancer form showing the VIP subnet selector and plan options
    The Create load balancer form showing the VIP subnet selector and plan options
  3. Add a listener

    Add a listener for your service, for example HTTPS on 443 or TCP on your application's port.

    Screenshot — The listener configuration with protocol and port
    The listener configuration with protocol and port
  4. Create a pool and add members
    • Create a pool and choose a load-balancing algorithm.
    • Add your instances as members, each with its address and port.
    Screenshot — The pool form with the algorithm selector and member list
    The pool form with the algorithm selector and member list
  5. Attach a health monitor

    Add a health monitor so only healthy members receive traffic. For web services an HTTP check against a known path works well.

    Screenshot — The health monitor form
    The health monitor form
  6. Publish it

    Attach a floating IP to the VIP to expose the service to the internet, then point your DNS at that address.

Examples

Build a load balancer part by part with the CLI
patrii loadbalancer create --name web-lb --subnet <subnet-id> --plan standard
patrii loadbalancer listener create --name web-https \
  --loadbalancer <lb-id> --protocol HTTPS --port 443
patrii loadbalancer pool create --name web-pool \
  --listener <listener-id> --protocol HTTPS --algorithm ROUND_ROBIN
patrii loadbalancer member add <pool-id> --address 10.0.1.11 --port 443
patrii loadbalancer member add <pool-id> --address 10.0.1.12 --port 443
patrii loadbalancer healthmonitor create --pool <pool-id> \
  --type HTTPS --delay 5 --timeout 3 --max-retries 3 --url-path /healthz
Add a member and check stats
patrii loadbalancer member add <pool-id> --address 10.0.1.13 --port 443
patrii loadbalancer stats <lb-id>
Build the same load balancer with Terraform
resource "patrii_lb_loadbalancer" "web" {
  name          = "web-lb"
  vip_subnet_id = patrii_subnet.app.id
}

resource "patrii_lb_listener" "https" {
  name            = "web-https"
  loadbalancer_id = patrii_lb_loadbalancer.web.id
  protocol        = "HTTPS"
  protocol_port   = 443
}

resource "patrii_lb_pool" "web" {
  name         = "web-pool"
  listener_id  = patrii_lb_listener.https.id
  protocol     = "HTTPS"
  lb_algorithm = "ROUND_ROBIN"
}

resource "patrii_lb_member" "web_1" {
  pool_id       = patrii_lb_pool.web.id
  address       = "10.0.1.11"
  protocol_port = 443
}

resource "patrii_lb_monitor" "web" {
  pool_id     = patrii_lb_pool.web.id
  type        = "HTTPS"
  delay       = 5
  timeout     = 3
  max_retries = 3
  url_path    = "/healthz"
}

Limits & specifications

Building blocks and common options:

PartOptions you choose
Listener protocolHTTP, HTTPS, TERMINATED_HTTPS, TCP, UDP.
Pool algorithmROUND_ROBIN, LEAST_CONNECTIONS, SOURCE_IP.
Health monitorHTTP, HTTPS, TCP, PING, UDP-CONNECT.
L7 policyRoute to another pool, redirect, or reject based on request content.
FailoverTrigger a failover to recover the load balancer's data plane.

Best practices

  • Always attach a health monitor; without one, traffic can be sent to a member that has already failed.
  • Point health checks at a lightweight endpoint that reflects real readiness, not just that the port is open.
  • Use TERMINATED_HTTPS to terminate TLS at the load balancer when you want central certificate handling.
  • Choose SOURCE_IP when a client must stick to the same member; otherwise ROUND_ROBIN spreads load evenly.
  • Give the VIP a floating IP and put DNS on that, so backend churn never changes your published address.

FAQ

Do I have to create each part separately?
Not in the console: it can create the load balancer, a listener, a pool and its members in a single step, then you refine the pieces afterward. With the Patrii CLI or Terraform you create each part in turn, as in the examples above.
Why is a member marked unhealthy?
The health monitor's check is failing for that member. Confirm the member is listening on the pool port, that a security group allows the check, and that the health-check path returns success.
What is the difference between HTTPS and TERMINATED_HTTPS?
With TERMINATED_HTTPS the load balancer terminates TLS and talks to members over plain HTTP; with HTTPS the encrypted connection is passed through to the members.
How do I route different paths to different pools?
Add Layer-7 policies and rules to a listener to match on request content such as the URL path or host header and send matching requests to a specific pool.

Learn more

Everything you can do here in the console is also available through the Patrii Cloud API for automation and scripting.

Was this article helpful?
Thank you for your feedback. Still stuck? Contact us