There are two types of load balancers in OCI, but in this document we will use a network load balancer. The IP address of this network load balancer will also be used as the virtual IP address to be set later, which will be the access point for the protected service.
- Select ≡ > Networking > Load balancers.
- Select sios20-c under the Compartment and click Create load balancer.
- Select a network load balancer in accordance with the load balancer (Layer-4) used on the other platform.
- The displayed form consists of four pages: ① Add details, ② Configure listener, ③ Choose backends, and ④ Review and create. Enter the following values on each page and click Next on each page.
① Add details
Item | Value |
---|---|
Load balancer name | sios20-nlb |
Choose visibility type | Private |
Allow IPv6 address assignment | Disabled |
Choose networking | |
Virtual cloud network | sios20-vcn |
Subnet | sios20-subnet2 |
Use network security groups to control traffic | Enabled |
② Configure listener
Item | Value |
---|---|
Listener name | sios20-nlb-listener |
Specify the type of traffic your listener handles | TCP |
Ingress traffic port | Specify the port |
(*1) |
*1 : Specify the port to be used for communication with the application. In this guide, specify 1521 for Oracle and 5432 for PostgreSQL.
③ Choose backends
Item | Value | |||
---|---|---|---|---|
Backend set name | sios20-nlb-backendset | |||
Source/destination header (IP, port) preservation (network load balancer) |
Enabled | |||
Select backends | ||||
Add by compute instance | Instance | IP Address | Port | Weight |
sios20-node1 | 10.0.2.11 | (*1) | 1 | |
sios20-node2 | 10.0.2.12 | (*1) | 1 | |
Preserve source IP | Enabled (cannot be changed) | |||
Specify health check policy | ||||
Protocol | TCP | |||
Port | 12345 | |||
Items other than above | Leave all as default |
*1 : Specify the port to be used for communication with the application. In this guide, specify 1521 for Oracle and 5432 for PostgreSQL.
- After reviewing the contents on the page ④ Review and create, click Create network load balancer.
When an NLB is created, IP is automatically assigned according to the configured subnet. (You cannot assign a static IP by yourself.)
From now on, [10.0.2.21] will be used for the automatically assigned IP in this document.
The resource has now been created on the OCI.
Post your comment on this topic.