Create a Linode account to try this guide with a $ credit.
This credit will be applied to any valid services used during your first  days.

Load balancers work by distributing traffic to a pool of servers. For NodeBalancers, these servers are Linode Compute Instances and they are configured as back-end nodes. Each Compute Instance operating as a back-end node needs to be located within the same data center as the NodeBalancer and be assigned a private IPv4 address. See Managing IP addresses for instructions on adding a private IP address to an existing Compute Instance.

Note
While only a single back-end node is required, at least two back ends need to be configured to make use of load balancing functionality.

Add, Edit, and Remove Back-end Nodes

Back-end nodes can be defined through a NodeBalancer’s Configurations, which contain all the settings and parameters for a particular inbound port.

  1. Log in to Cloud Manager, click NodeBalancers in the left menu, and select the NodeBalancer you wish to edit. See Manage NodeBalancers.

  2. Navigate to the Configurations tab. This displays a list of all ports that have been configured.

  3. Open the port configuration you wish to edit or create a new one by clicking the Add Another Configuration button.

  4. Scroll down to the Back-end Nodes section to see a list of back ends that have already been added.

    • Adjust any of the existing fields to edit the back end.
    • Click the Add a Node button to add a new back end.
    • Click the Remove link to remove the back end.
  5. Click the Save button to save the configuration.

Note
Removing a back end from the NodeBalancer configuration does not delete the associated Compute Instance. It only removes that instance from operating as a back end for this particular NodeBalancer.

Back end Configuration Options

Each back-end node contains the following configuration parameters.

  • Label: Sets a label to identify the back end. While any label can be used, it’s common to use the label of the associated Compute Instance.
  • IP Address: Select the private IPv4 address of the Compute Instance you wish to use as the back end. This field has a dropdown list of all Compute Instances within the same region as the NodeBalancer that have a private IPv4 address assigned.
  • Port: Identifies the port that the NodeBalancer should use when sending traffic to the back end. This should be the port that the application is listening on within this back-end Compute Instance.
  • Weight: Sets the priority of the back end. Back ends with a higher weight are allocated more connections than back ends with a lower weight.
  • Mode: Determines if the back end accepts or rejects traffic and in what circumstances. See Mode.

Mode

By default, all back ends are allocated traffic according to the configuration settings of the NodeBalancer, provided the back ends have a status of up. To change this behavior, use the Mode setting to modify how a back end accepts or rejects traffic.

  • Accept: Accept incoming connections
  • Reject: Reject new incoming connections and discontinue health checks on this back end. Existing connections remain active, but session stickiness is not respected. Useful for taking the back end out of rotation to perform maintenance or decommission it.
  • Drain: Only accept connections from clients whose session stickiness points to this back end. Use in advance of taking a back end out of rotation for maintenance or decommissioning to gradually drain connections.
  • Backup: Only accept connections if all other back ends are down. Useful if you use front-end caching servers, such as Varnish, and want to direct traffic to the origin servers if the caching servers are down.
Note
Changes made to the Mode field are applied within 60 seconds.

Understand the Status of a Back-end Node

Each back-end node has a status of up or down.

  • Up: The back end is healthy and should be kept in rotation, provided that the Mode is allowing traffic.
  • Down: The back end is unhealthy and taken out of rotation. This means that a health check has failed or the Mode has been set to Reject.

Configure Compute Instances

When adding a Compute Instance as a Back-end Node to a NodeBalancer, you must also ensure that it has been properly configured for your application. As part of this, review the following:

  • Install all required software on the Compute Instance.

  • Verify that any required data has been properly replicated on each Compute Instance. There are many different methods of ensuring data is properly replicated between multiple servers, including rsync, Gluster, Galera, or CI/CD tooling.

  • Verify that each instance accepts traffic over the port specified in the back end’s configuration and is not blocking addresses from the NodeBalancer’s private IP address range: 192.168.255.0/24.

This page was originally published on


Your Feedback Is Important

Let us know if this guide was helpful to you.