Note:
- This tutorial requires access to Oracle Cloud. To sign up for a free account, see Get started with Oracle Cloud Infrastructure Free Tier.
- It uses example values for Oracle Cloud Infrastructure credentials, tenancy, and compartments. When completing your lab, substitute these values with ones specific to your cloud environment.
Configure OCI Load Balancing for Oracle Cloud VMware Solution applications
Introduction
This tutorial is a step-by-step guide to deploy and configure Oracle Cloud Infrastructure (OCI) Load Balancer to load balance applications hosted inside Oracle Cloud VMware Solution. The Load Balancer service provides automated traffic distribution from one entry point to multiple servers reachable from your virtual cloud network (VCN). Cloud Load Balancing is highly available in nature and regional in scope.
The OCI Load Balancer can be placed in different types of VCN topologies, for example, Single Network Architecture, Hub and Spoke Network Architecture. In most production deployments, Public Load Balancers are seen placed in Hub VCN which is used for shared services and tools. In this tutorial, we use a Single VCN topology as deployment remains same and only difference appears in backend routing i.e. From Load Balancer to backend servers.
Objective
Leverage Oracle Cloud native load balancers to handle traffic management for applications inside Oracle Cloud VMware Solution SDDC environment.
Pre-requisites
- Oracle Cloud VMware Solution environment.
- Required applications for load balancing on VMware vSphere SDDC.
Task 1: Set up OCI Load Balancer
-
Login to the OCI Console. From the main menu select Networking and then click Load Balancers.
-
Click Create Load Balancer and select the Flexible Load Balancer. The selected Load Balancer is of type application load balancer. An application load balancer improves application performance and facilitates scaling. It operates at L4/L7 and includes SSL tunneling like features. As the backend application is HTTP based we use L7 load balancer.
-
Provide the Load Balancer name
oci-lb-vmw
. This Load Balancer is of public type (External Load Balancer) as it allows traffic from internet to public facing applications. We choose Ephemeral IP address for the listener and are not using reserved IP address at this time. Choose Flexible shapes as it provides options to choose minimum and maximum bandwidth which is cost effective other than predefined shape sizes. -
Select virtual cloud network and public subnet where load balancer instances will be deployed. Oracle recommends to create and use regional subnet for load balancer. With a regional subnet, the Load Balancer service creates a primary load balancer and a standby load balancer, each in a different availability domain, to ensure accessibility even during an availability domain outage.
-
Select the appropriate load balancing policy. Weighted Round Robin is the default policy and selected for simple demo. For now backend servers are not added, it will be added after deploying the Load Balancer service.
-
Select appropriate health check protocol in health check policy. HTTP is selected for simple webserver traffic on port 80.
-
Provide the backend set name. Backend set consists of backend servers, load balancing policies and health check policies. The backend set determines how the load balancer directs traffic to the collection of backend servers.
-
Configure listener protocol as HTTP for ingress traffic. Oracle Cloud VMware Solution webservers are configured with Apache web service which listens on port 80.
-
It is recommended to enable error and access logs. Select either existing or create new log groups for easy identification in logging UI. This helps capture information about requests for monitoring and troubleshooting purposes.
-
Click Finish and Load Balancer service provisioning begins. Once provisioned, it shows as Active.
-
The Load balancing configuration is missing backend set as it hasn’t been added yet. Let’s navigate to backend sets in the load balancing and add webservers hosted in Oracle Cloud VMware Solution.
-
Click Add Backends and select IP addresses. Provide IP addresses of the backend servers. It will not recognize the Oracle Cloud VMware Solution webservers in OCI compute instance inventory as servers are hosted inside the VMware vSphere Platform.
-
Click Add and you can see health check shows OK after adding it. Health checks are able to probe and reach backend servers successfully.
-
The Load Balancer resides in the public subnet and this route table is associated with the Load Balancer subnet. As the Load balancer is public, internet gateway is needed for ingress traffic. For the backend servers (hosted inside Oracle Cloud VMware Solution) to connect private IP route is added. 192.168.1.0/24 is the NSX segment and 10.0.0.130 is the NSX Edge endpoint.
-
Security List and/or NSG needs to be allowed for frontend and backend communications. It’s time to test the load balancer public VIP – 129.159.46.11 and it works! It is able to get us both the webservers in round robin fashion as requests getting submitted.
-
Navigate to access logs and click on lb-logs-access. Here, see the entries of round robin requests.
-
On Oracle Cloud VMware Solution stack, here showing both webservers Load Balancer-backend-1 and Load Balancer-backend-2 are consuming NSX Overlay Segment – 192.168.1.0/24
-
Below screenshots show the webservers hosted in VMware vSphere and their associated IP addresses.
Related Links
The following links can be used for Load Balancing feature enhancements.
Acknowledgements
- Author - Nitesh Walia (Principal Cloud Architect)
More Learning Resources
Explore other labs on docs.oracle.com/learn or access more free learning content on the Oracle Learning YouTube channel. Additionally, visit education.oracle.com/learning-explorer to become an Oracle Learning Explorer.
For product documentation, visit Oracle Help Center.
Configure OCI Load Balancing for Oracle Cloud VMware Solution applications
F80385-01
April 2023
Copyright © 2023, Oracle and/or its affiliates.