Back to Blog
Load Balancers in Oracle Cloud Infrastructure

Load Balancers in Oracle Cloud Infrastructure

   Mariusz Antonik    Oracle Cloud (OCI)    3 min read    1,204 views

Load Balancers in Oracle Cloud Infrastructure (OCI): Types, Differences, and How to Configure

Distribute traffic, improve uptime, and scale easily with OCI load balancers. Learn the differences between HTTP(S) Load Balancer (Layer 7) and Network Load Balancer (Layer 4), and how to configure each.

1. Why Load Balancing Matters

  • High availability: failover when a server goes down.
  • Scalability: add/remove backends behind the balancer.
  • Performance: route users to healthy, responsive servers.
  • Security: hide backend IPs; terminate TLS centrally.

2. Load Balancer Types

Type Layer Traffic Key Features Ideal For
Network Load Balancer (NLB) L4 TCP/UDP High throughput, low latency, pass-through Non-HTTP protocols, DB proxying, custom TCP/UDP
HTTP(S) Load Balancer L7 HTTP/HTTPS SSL termination, URL routing, headers, cookies Websites, REST APIs, web apps

3. HTTP(S) Load Balancer

Understands HTTP, can terminate TLS, route by path/host, and handle cookie persistence.

  • Use when: serving websites/APIs on 80/443, need TLS offload or path routing.
  • Pros: built-in certs, smart routing, session stickiness, native monitoring.

4. Network Load Balancer

Fast, low-latency L4 balancing for any TCP/UDP protocol. No TLS termination or content inspection.

  • Use when: custom protocols, raw performance, DB proxies, gaming/IoT.
  • Pros: extremely performant, static IPs, minimal config overhead.

5. Shared Concepts

  • Backend Set: group of backend servers.
  • Backends: individual instances.
  • Health Checks: HTTP/TCP tests for availability.
  • Listener: protocol/port definition.
  • Routing Policies: (HTTP LBs) path/host rules.
  • Shape: throughput capacity (flexible/fixed).

6. Create an HTTP(S) Load Balancer

  1. Networking → Load Balancers → Create (Public or Private).
  2. Backend Set: round robin; health check GET /health every ~10s; add backend IPs.
  3. Listener: HTTP 80 or HTTPS 443; attach certificate for TLS.
  4. Create: use the provided public IP; map DNS accordingly.

7. Create a Network Load Balancer

  1. Networking → Network Load Balancers → Create (Public/Private).
  2. Listener: TCP/UDP and port (e.g., 3306 for MySQL).
  3. Backend Set: backends + TCP health checks.
  4. Create: point clients at the NLB IP.

8. Best Practices

  • Spread backends across multiple ADs.
  • Use lightweight health checks (simple endpoints).
  • Terminate TLS at the HTTP LB for simpler cert ops.
  • Enable Monitoring & Logging.
  • Right-size shapes and automate with Terraform.

9. Example Architecture

Two web VMs across AD-1/AD-2 behind an HTTPS LB; private MySQL in a private subnet; DNS points to LB IP; health check /health every 5 seconds.

10. Summary

Choose HTTP(S) LB for web/API features (TLS offload, routing) or NLB for raw L4 performance. Either way, OCI makes high-availability and scaling straightforward.


Tags: #OCI
About the Author
Mariusz Antonik

Oracle Cloud Infrastructure expert and consultant specializing in database management and automation.

All Tags
#Advanced #alerts #Bash #bash cpu monitoring script #bash monitoring #bash scripting #Beginner #Best Practices #block volume backup #Capacity Planning #cloud backup strategy #cpu bottleneck #CPU Monitoring #cpu monitoring linux #cpu monitoring script linux #cpu trends #cpu usage trends #cpu usage trends linux #create oracle db system in oci #cron cpu monitoring #cron cpu monitoring linux #cron jobs #database monitoring #database performance #detect slow queries mysql #devops #disk capacity planning server #disk forecasting linux #disk growth trend linux #Disk Monitoring #disk usage #disk usage script linux #disk usage trends #Early Detection #easy infrastructure monitoring #free-tier #Guide #health dashboards #Health Reporting #historical server monitoring #how to monitor cpu usage linux #infrastructure #infrastructure health #infrastructure health dashboard #infrastructure health reporting #infrastructure monitoring #infrastructure monitoring report #infrastructure trends #infrastructure trends monitoring #Infrastructure Visibility #lightweight linux monitoring #lightweight monitoring #linux #linux administration #linux cpu monitoring #linux cpu usage #linux disk capacity planning #linux disk usage #Linux monitoring #linux monitoring setup #linux monitoring tools #linux performance #linux performance monitoring #linux server #linux server monitoring #linux servers #linux storage #linux tools #low maintenance monitoring #monitor cpu usage over time linux #monitor linux server health #monitor server trends #monitor small production server #monitoring without complexity #MySQL #mysql health reporting #MySQL monitoring #mysql optimization #MySQL Performance #mysql performance degradation #mysql performance monitoring #mysql performance trends #mysql query performance issues #mysql server monitoring #mysql slow queries #mysql slow query analysis #mysql slow query monitoring #mysql trends #mysql-health #networking #nsg #OCI #oci backup #oci bastion tutorial #oci block volume #oci infrastructure as code #OCI monitoring #oci networking #oci oracle database private subnet setup #oci oracle database tutorial #oci security #oci setup guide #oci terraform tutorial #oci tutorial for beginners #oci vcn terraform #oci virtual machine db system guide #oracle base database service tutorial #oracle cloud bastion #oracle cloud free tier tutorial #oracle cloud infrastructure step by step #oracle cloud infrastructure tutorial #oracle cloud storage #oracle database on oci setup #oracle-cloud #Performance #Performance Degradation #performance monitoring #performance trend monitoring #performance trends #plan disk growth server #practical server monitoring #predict disk usage growth #private instance access #query optimization #Security #security lists #server health #server health reporting #server health weekly report #server monitoring #Server Performance #server trend analysis #server-trends #simple cpu monitoring linux #simple linux monitoring #simple monitoring small business #simple monitoring system #simple ops monitoring #slow queries #slow query reporting mysql #small business infrastructure #small business IT #small business servers #small infrastructure monitoring #small server monitoring #ssh bastion #storage capacity planning linux #storage monitoring #subnets #system health reporting #terraform oci compute #terraform oracle cloud infrastructure #Trend Monitoring #trend-analysis #trends #Tutorial #vcn