Skip to main content

Chapter 17: Publishing Through Oracle Cloud Network Load Balancer

A Network Load Balancer (NLB) helps distribute traffic across multiple backend servers, ensuring high availability, redundancy, and scalability for your application. In this chapter, you’ll learn how to create a basic NLB setup to forward traffic to a backend service (e.g., Ghost).

Creating an NLB in OCI

1. Navigate to Networking → Load Balancers

In the Oracle Cloud Console:

  • Go to Networking
  • Click Network Load Balancers
  • Click Create Network Load Balancer


2. Basic Configuration

  • Name: e.g., hexacats-nlb
  • Compartment: Choose your compartment
  • VNIC Selection: Use existing subnet (preferably public subnet)
  • IP Address Type: Public (or private if internal-only)


3. Listener Configuration

  • Name: e.g., http-listener
  • Port: 80 (for HTTP) or 443 (for HTTPS)
  • Protocol: TCP
  • Backend Set: Create new (next step)


4. Backend Set Configuration

  • Name: e.g., ghost-backend
  • Policy: Round Robin or IP Hash
  • Health Check Protocol: TCP
  • Port: 8080 (or the internal port your app uses)
  • Interval/Timeout: default (or lower for faster detection)


5. Add Backend Servers

  • Add your instance(s) by IP address or instance OCID
  • Port: 8080 (assuming that's where Ghost is running internally)


6. Security Configuration

  • Make sure the network security groups or security list allow:
    • Inbound traffic on port 80 or 443 to the NLB subnet
    • Inbound traffic from NLB to backend servers on port 8080


7. Create and Test

Click Create Network Load Balancer. Once provisioned:

  • Access your public IP to test:
    http://<nlb-public-ip>
    It should forward traffic to your Ghost container.

If you're using a Network Load Balancer and want to use Nginx as a reverse proxy, continue to the next chapter.