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
-
Connect to OCI and configure a load balancer:
- Open a browser to Oracle cloud at https://cloud.oracle.com/ and sign in.
- Select Networking > Load Balancers.
- Click Create Load Balancer.
- In the Select Load Balancer type dialog, select Load Balancer. Click Create Load Balancer.
- In the Add Details step specify:
Field or section
Value
Name
Enter a meaningful name (for example, AccessGatewayExternalLB).
Visibility type
Select Public.
Assign a public IP
Select Ephemeral or Reserved IP, as appropriate.
Shapes
Modify the minimum and maximum bandwidth to support expected traffic.
Choose networking
For Virtual cloud network ..., select the virtual cloud network that contains the Access Gateway worker nodes.
For subnet in ..., select the subnet assigned to the Access Gateway worker nodes.
- Click Next.
- 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.
Shapes
Modify minimum and maximum bandwidth to support expected traffic.
Choose networking
For Virtual cloud network..., select the virtual cloud network that contains the Access Gateway worker nodes.
For subnet in ..., select the subnet assigned to the Access Gateway worker nodes.
Specify Health Check Policy
For URL Path (URI), enter /status
Leave all other values unchanged.
- Click Next.
- In the Configure listener step specify:
Field or section
Value
Name
Enter a meaningful name (for example, OAG LB listener).
Traffic type
Select HTTP.
- Click Next.
- In the Manage logging step, click Submit.
Oracle Cloud Infrastructure will then create your load balancer, which can take between 1 and 5 minutes.
-
Register the load balancer with your DNS service provider. The following steps may vary by DNS provider:
- In the OCI console go to Networking > Load Balancers.
- Note the IP address of the load balancer.
- 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
- Return to the OCI console.
-
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.
- Return to or sign in to the Access Gateway Admin UI console.
- Select the Applications tab.
- Click Add.
- Select Sample Header.
- In the Essentials tab, specify the following:
Field Value Name
A meaningful name for the application (for example, Load Balancer Header Test).
Public Domain
www.[external domain] (for example, www.oag-external.com)
Groups
Everyone
- Click Next. The Attributes tab opens.
- Click Next. The Policies tab opens.
- Click Done.
- Open a new browser or an Chrome incognito window.
- Enter the URL associated with the application.
- The Access Gateway sample header app page should display.