Summary
There are two (2) types of load balancers: Application (Layer 7) and Network (layer 3 and 4). A load balancer can be private or public.
Reference
- Load Balancer Concepts
- OCI Network Load Balancer Types, Use Cases, and Best Practices
- Load Balancing SSL Traffic in OCI
- Load Balancer Types
Key Concepts
Load balancing in Oracle Cloud Infrastructure (OCI) is a critical component for distributing incoming application traffic across multiple backend servers to ensure high availability, reliability, and scalability of applications. Here are the key concepts associated with load balancers in OCI:
Backend Server
A backend server is an application server that generates responses to incoming TCP or HTTP traffic. Each backend server is identified by a unique combination of a private IPv4 address and port number (e.g., 10.10.10.1:8080).
Backend Set
A backend set is a logical grouping of backend servers, defined by a load balancing policy and a health check policy. The backend set determines how traffic is directed to the backend servers. SSL configuration is optional.
Certificates
For HTTPS or SSL traffic, an SSL server certificate (X.509) must be associated with the load balancer. This certificate allows the load balancer to terminate the connection and decrypt incoming requests before passing them to the backend servers.
Health Check
A health check is a test to confirm the availability of backend servers. It can be a request or a connection attempt. The load balancer continuously monitors backend servers based on a specified time interval. If a server fails the health check, it is temporarily removed from rotation until it passes the health check again.
Listener
A listener is a logical entity that checks for incoming traffic on the load balancer's IP address. Listeners are configured with a protocol (HTTP, HTTP/2, TCP, HTTPS) and a port number. Multiple listeners can be configured to handle different types of traffic.
Load Balancing Policy
This policy dictates how the load balancer distributes incoming traffic to the backend servers. Common policies include round robin, least connections, and IP hash.
Path Route Set
A path route set contains rules to route traffic to the correct backend set without using multiple listeners or load balancers.
Regions and Availability Domains
The load balancer service manages application traffic across availability domains within a region. A region is a localized geographic area, and an availability domain is one or more data centers within that region.
Session Persistence
Session persistence ensures that all requests from a single client are directed to the same backend server, maintaining session continuity.
Shape
The shape determines the load balancer's total pre-provisioned maximum capacity (bandwidth). Available shapes include 10 Mbps, 100 Mbps, 400 Mbps, and 8000 Mbps. The 10 Mbps shape is eligible for the Always Free tier.
Virtual Cloud Network (VCN)
A VCN is a private network that you set up in OCI, within which you can deploy your load balancers and other resources
Types of Load Balancers
Flexible Load Balancer
The flexible load balancer operates at both Layer 4 (transport layer) and Layer 7 (application layer) of the OSI model. It provides automated traffic distribution, SSL termination, and end-to-end SSL tunneling. It is suitable for applications requiring advanced proxy features and high availability.
Network Load Balancer
The network load balancer is optimized for latency-sensitive workloads and long-running connections. It operates at Layer 3 (network layer) and Layer 4, supporting TCP/UDP/ICMP protocols. It is a non-proxy solution, ensuring low latency and high availability by directing traffic only to healthy servers.
Differences Between Layer 4 and Layer 7 Load Balancing
- Layer 4 Load Balancing: Operates at the transport layer, forwarding network packets without inspecting the content. It uses TCP connections and is suitable for basic traffic distribution.
- Layer 7 Load Balancing: Operates at the application layer, inspecting the content of messages. It makes routing decisions based on HTTP/HTTPS headers, URL types, and cookies, providing more advanced traffic management.