Adding a Load Balancer Backend Server

Describes how to add a backend server to a load balancer.

Note

  • If the load balancer has no backend sets, you must create one before you can specify a backend server. See Creating a Load Balancer Backend Set for more information.

  • To ensure reachability between the public load balancer and its public IP address based backends, configure a NAT Gateway. See NAT Gateway for more information.

Using the Console

  1. Open the navigation menu, click Networking, and then click Load Balancers.

  2. Select the Compartment from the list.

    All load balancers and network load balancers in that compartment are listed in tabular form.

  3. (optional) Select a State from the list to limit the load balancers displayed to that state.

  4. (optional) Uncheck Network Load Balancer under Type to only display load balancers.

  5. Click the load balancer to which you want to add a backend server.

    The Load Balancer Details page appears.

  6. Click Backend Sets under Resources.

    The Backend Sets list appears. All backend sets are listed in tabular form.

  7. Click the name of the backend set to which you want to add one or more backend servers.

    The Backend Set Details page appears.

  8. Click Backends under Resources.

    The Backends list appears. All backend servers are listed in tabular form.

  9. Click Add Backends.

    The Add Backends dialog box appears.

    Tip

    You cannot add a backend server marked as Backup to a backend set that uses the IP Hash policy.

  10. Choose how to add backend servers: Specify how you want to add backend servers to the backend set:

    • Compute Instances: Choose this option to select from a list of available compute instances.

      • Instances in <compartment>: Select (check) the instances you want to include in the backend set.

        To select instances from a different compartment, use the Change Compartment link and choose a compartment from the list.

        Tip

        You can choose instances from one compartment at a time. After you add instances from one compartment, you must repeat the Add Backends process to add instances from another compartment.

        After you select an instance to add to the backend set, you can specify:

        • Port: Required. The backend server port to which the load balancer must direct traffic. Whether or not your backend server uses SSL (HTTPS) is determined by the backend set configuration.

        • Weight: The load balancing weight assigned to the server. For more information, see Load Balancing Policies.

      • Choose to manually configure subnet security list rules that allow the intended traffic or let the Load Balancing service create security list rules for you. To learn more about these rules, see Parts of a Security Rule.

        • Manually configure security list rules after the load balancer is created: When you choose this option, you must create your own rules after adding the backend servers.

        • Automatically add security list rules: When you choose this option, the Load Balancing service creates security list rules for you.

          The system displays a table for egress rules and a table for ingress rules. Each table lets you choose the security list that applies to the relevant subnet. You can then choose whether to apply the proposed rules for each affected subnet.

    • IP Addresses: Choose this option to enter the IP addresses of the backend servers (Compute instances) to add.

      • IP Address: Required. Specify the IP address of a backend server you want to add to the backend set.

      • Port: Required. Specify the server port to which the load balancer must direct traffic.

      • Weight: Required. Specify the load balancing weight to apply to this server. For more information, see Load Balancing Policies.

      You can click the plus + icon to add another server to the list or click the X icon to remove a list item.

  11. Click Add.

Using the CLI

Use the oci lb backend create command and required parameters to add a backend server to a load balancer:

oci lb backend create --backend-set-name backend_set_name --load-balancer-id load_balancer_id --ip-address ip_address --port port [OPTIONS]

For a complete list of flags and variable options for CLI commands, see the Command Line Reference.

Using the API

Run the CreateBackend method to add a backend server to a backend set for a load balancer.