Adding a Load Balancer Backend Server

Add a backend server to a load balancer.

For prerequisite information, see Backend Servers for Load Balancers.

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.

    1. Open the navigation menu, click Networking, and then click Load balancers. Click Load balancer. The Load balancers page appears.
    2. Select the Compartment from the list. All load balancers in that compartment are listed in tabular form.
    3. Select a State from the list to limit the load balancers displayed to that state.
    4. Click the load balancer to which you want to add a backend server. The load balancer's Details page appears.
    5. Click Backend sets under Resources. The Backend sets list appears. All backend sets are listed in tabular form.
    6. Click the name of the backend set to which you want to add one or more backend servers. The backend set's Details page appears.
    7. Click Backends under Resources. The Backends list appears. All backend servers are listed in tabular form.
    8. Click Add backends. The Add backends dialog box appears.

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

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

      • Compute Instances: Select 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 select a compartment from the list. You can select 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: The backend server port to which the load balancer must direct traffic. Whether 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 Balancer Policies.

        • Select to manually configure subnet security list rules that allow the intended traffic or let the Load Balancer 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 select this option, the Load Balancer 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 select 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: Select this option to enter the IP addresses of the backend servers (Compute instances) to add.

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

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

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

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

    9. Click Add.
  • 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 parameters and values for CLI commands, see the CLI Command Reference.

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