Configure OCI load balancers

During this task you will: configure a load balancer, register the load balancer with DNS, and test.

Before you begin

Ensure that you have:

  • A previously configured Access Gateway high availability cluster with at two or more worker nodes.
  • The external domain for the load balancer. For example oag-external.com.

Steps

  1. Connect to OCI and configure a load balancer:

    1. Open a browser to Oracle cloud at https://cloud.oracle.com/ and sign in.
    2. Select Networking > Load Balancers.
    3. Click Create Load Balancer.
    4. In the Select Load Balancer type dialog, ensure Load Balancer is selected and click Create Load Balancer.
    5. In the Add Details step specify:

      Field or section

      Value

      Name

      Enter an appropriate name such as AccessGatewayExternalLB.

      Visibility type

      Ensure Public is selected.

      Assign a public IP

      Select Ephemeral or Reserved IP as appropriate.

      ShapesModify minimum and maximum bandwidth to support expected traffic.
      Choose networkingIn Virtual cloud network ... select the virtual cloud network which contains the Access Gateway worker nodes.
      In subnet in ... select the subnet assigned to the Access Gateway worker nodes.
    6. Click Next.
    7. In the Choose Backends step specify:

      Field or section

      Value

      Load balancing policy

      Select IP Hash.

      Backends

      Click Add Backends and select the appropriate instances of Access Gateway.

      You can define a load balancer without backend resources and then assign them later.


      Assign a public IP

      Select Ephemeral or Reserved IP as appropriate.

      ShapesModify minimum and maximum bandwidth to support expected traffic.
      Choose networkingIn Virtual cloud network ... select the virtual cloud network which contains the Access Gateway worker nodes.
      In subnet in ... select the subnet assigned to the Access Gateway worker nodes.

      Specify Health Check Policy

      in the URL Path (URI) field enter /status
      Leave all other values the unchanged
    8. Click Next.
    9. In the Configure listener step specify:

      Field or section

      Value

      Name

      Enter an appropriate name such as OAG LB listener.

      Traffic type

      Select HTTP.

    10. Click Next.
    11. In the Manage logging step, click Submit.

    Oracle Cloud Infrastructure will then create your load balancer, which can take between 1 and 5 minutes.

  2. Register load balancer with DNS service provider:

    Steps to associate a load balancer with DNS will vary by DNS provider.

    1. In the OCI console go to Networking > Load Balancers.
    2. Note the IP address of the load balancer.
    3. Connect to your DNS Service provider and add a CNAME record mapping the front end IP address to
      the external name.
      For example, CNAME host: www.[your external name], target: load balancer ip address.
    4. Return to the OCI console.
  3. Test:

    Load balancers can be tested using a header based application. Complete this section if an application does not already exist for www.[external domain].com.

    1. Return to or sign in to the Access Gateway Admin UI console.
    2. Select the Applications tab.
    3. Click Add.
    4. Select Sample Header.
    5. In the Essentials tab, specify the following:
      FieldValue
      NameAn appropriate name for the application, such as Load Balancer Header Test
      Public Domainwww.[external domain]. For example www.oag-external.com.
      GroupsEveryone
    6. Click Next. The Attributes tab will open.
    7. Click Next. The Policies tab will open.
    8. Click Done.
    9. Open a new browser or an Chrome incognito window.
    10. Enter the URL associated with the application.
    11. The Access Gateway sample header app page should display.

Related resources

About load balancers

Oracle OCI Load Balancers