Add a Load Balancer

You can add a load balancer to an existing Oracle WebLogic Server for OCI domain that was originally created without a load balancer.


You cannot use this procedure on a domain that was created before June 29, 2020.

If you enabled autoscaling for your domain and did not configure the load balancer on stack creation, you must add the load balancer when you edit the stack.

Oracle WebLogic Server for OCI configures the new load balancer to distribute application traffic to the managed servers in your domain.

Edit the load balancer variables for the stack and then run an Apply job.

  1. Sign in to the Oracle Cloud Infrastructure Console.
  2. Click the navigation menu Navigation Menu icon, select Developer Services. Under the Resource Manager group, click Stacks.
  3. Select the Compartment that contains your stack.
  4. Click the name of your stack.
  5. Click Variables.
  6. Click Edit Variables.
  7. Select Add Load Balancer.
  8. Configure the load balancer network.
    • If you chose to use an existing regional subnet for WebLogic Server, then select an existing regional subnet from the list of regional and availability domain-specific subnets. A load balancer can have only one regional subnet, which is shared between both nodes.


      This option is not applicable if you use an existing load balancer.
    • If you chose to create a regional subnet for WebLogic Server, then specify a CIDR for the new load balancer subnet.
  9. Configure load balancer:
    • Select Create Load Balancer.
    • Select Use Existing Load Balancer.


      You can select an existing load balancer for an existing VCN and existing subnet only.

      The existing load balancer should be in the same compartment as the stack compartment, and should be in the same VCN as the existing VCN chosen for the stack.

      1. Specify the OCID for the existing load balancer.
      2. Enter the name of the backend set for the existing load balancer that has a routing policy associated with the backend set. The backend set should not have any backends.
    • If you create a new load balancer, select Private Load Balancer, if you do not want to assign a public IP address to the load balancer.

      If you change the load balancer for an existing domain from public to private, or change the load balancer from private to public, then you must also change the load balancer subnet CIDR.

    • If you create a new load balancer, select Load balancer with Reserved Public IP, if you want to use a public load balancer with a reserved public IP. Then, specify the OCID of the public IP for the load balancer.
  10. If you create a new load balancer, select a minimum and maximum flexible load balancer shape.

    By default, the minimum bandwidth size is set to 10Mbps and maximum to 400Mbps.


    You can update the shape to a maximum of 8000Mbps. Before you select the maximum bandwidth, ensure to check the available service limit for the flexible load balancer bandwidth.
  11. Click Next.
  12. Click Save Changes.
  13. Click Terraform Actions, and then click Apply.
  14. Enter a name for the job, and then click Apply.
  15. Periodically monitor the progress of the Apply job until it is finished.
  16. Click Outputs.
  17. Identify the IP address of the load balancer in the updated stack.

If your domain includes the sample application, you can access it using the load balancer. See Access the Sample Application.