<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Thilinda kaushan on Medium]]></title>
        <description><![CDATA[Stories by Thilinda kaushan on Medium]]></description>
        <link>https://medium.com/@thili.app?source=rss-7936c35bc455------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*RoNsqCOv5Q7g0NmEg_ilrQ.jpeg</url>
            <title>Stories by Thilinda kaushan on Medium</title>
            <link>https://medium.com/@thili.app?source=rss-7936c35bc455------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 03:37:02 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@thili.app/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Mastering Load Balancing on OCI]]></title>
            <link>https://medium.com/@thili.app/mastering-load-balancing-on-oci-6d4712c0ce66?source=rss-7936c35bc455------2</link>
            <guid isPermaLink="false">https://medium.com/p/6d4712c0ce66</guid>
            <category><![CDATA[cloud-networking]]></category>
            <category><![CDATA[oci-networking]]></category>
            <category><![CDATA[oci]]></category>
            <category><![CDATA[load-balancer]]></category>
            <dc:creator><![CDATA[Thilinda kaushan]]></dc:creator>
            <pubDate>Wed, 25 Nov 2026 10:22:50 GMT</pubDate>
            <atom:updated>2026-11-25T10:25:20.834Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>1. Balancing the Load in the Cloud</strong></h3><p>Welcome! If you are building applications in Oracle Cloud Infrastructure (OCI), one of the most critical challenges you will face is managing incoming network traffic efficiently. Whether you are running a straightforward web application or a complex, multi-region enterprise platform, relying on a single compute instance to process all incoming user requests is a fast track to unexpected downtime and performance bottlenecks.</p><p>That is where load balancing comes into play. In simple terms, a load balancer sits in front of your compute instances within a Virtual Cloud Network (VCN) and acts as an automated traffic director. It receives incoming client requests and distributes them across multiple backend servers to maximize resource usage, scale application performance seamlessly, and deliver high availability even if individual backend instances experience hardware or software failures.</p><p>OCI provides two distinct traffic management services: the <strong>OCI Load Balancer</strong> and the <strong>OCI Network Load Balancer</strong>. While both exist to keep your applications running reliably, they operate at different layers of the network stack, offer distinct capabilities, and fulfill very different architectural requirements.</p><p>Let’s take a look at how these two tools work, how to pick the right one for your specific workload, and how you can combine them with OCI’s high-availability patterns to build a resilient cloud architecture.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/666/0*lxtbPsUJA6AZDBhJ.png" /><figcaption>Load Balancer</figcaption></figure><h3>2. How Cloud Load Balancing Works</h3><p>Before comparing the two services, let us build a shared vocabulary by looking at the building blocks of OCI load balancing.</p><ul><li><strong>Listeners:</strong> A listener is the entry entity that sits at the front door of your load balancer. It continuously listens for incoming connection requests on a specific IP address and port (such as port 80 for HTTP web traffic or port 443 for encrypted HTTPS traffic).</li><li><strong>Backend Sets:</strong> A backend set is a logical group of backend servers that receives traffic passed along by a listener. Every backend set is governed by two rules: a <em>load balancing policy</em> (which determines how traffic is spread across servers) and a <em>health check policy</em> (which monitors server status).</li><li><strong>Backend Servers:</strong> These are the actual compute instances or application servers processing client requests in your VCN.</li><li><strong>High Availability (HA) Architecture:</strong> To make sure your load balancer itself never becomes a single point of failure, OCI builds high availability into its core design. When you create a <strong>public load balancer</strong>, you assign it to <strong>two subnets, each located in a different Availability Domain (AD)</strong>. The load balancer runs actively in one subnet with its provisioned bandwidth and public IP address; if an unexpected outage affects that primary Availability Domain, your service automatically fails over to the secondary subnet without dropping out of reach. If you create a <strong>private load balancer</strong>, it requires only a single subnet.</li></ul><h3>3. Traffic Distribution Policies &amp; Health Checks</h3><p>Load balancers rely on distribution policies to allocate incoming requests and health check policies to monitor your application’s operational health.</p><h4>3.1. Load Balancing Policies</h4><p>Load balancing policies define the mathematical logic used to split traffic among healthy servers in a backend set:</p><ol><li><strong>Round Robin (or Weighted Round Robin):</strong> Distributes incoming traffic sequentially across servers in your backend set. You can assign numeric weights to servers to send more traffic to larger instances.</li><li><strong>IP Hash:</strong> Hashes the incoming request’s source IP address to consistently route non-sticky client traffic to the same backend server as long as that server remains healthy.</li><li><strong>Least Connections:</strong> Directs incoming traffic to whichever backend server is currently handling the fewest active connections.</li></ol><h4>3.2. Health Check Policies</h4><p>A health check is an automated test that runs continuously in the background. If a backend server stops responding or encounters an error, the load balancer temporarily stops sending traffic to it until it recovers.</p><p>When setting up or updating a health check policy, you can tune settings across two operational scopes:</p><h4>Universal Parameters (Applies to all Health Checks)</h4><ul><li><strong>Protocol:</strong> Select TCP or HTTP matching your application protocol.</li><li><strong>Port:</strong> Specify the specific port to probe (or enter 0 to default to the server&#39;s traffic port).</li><li><strong>Interval in ms:</strong> How frequently the check probes the server in milliseconds. Default is <strong>10,000 ms</strong> (10 seconds).</li><li><strong>Timeout in ms:</strong> The maximum wait time in milliseconds for a server response. Default is <strong>3,000 ms</strong> (3 seconds).</li><li><strong>Number of Retries:</strong> The number of consecutive failed (or successful) attempts required to transition a server’s state between healthy and unhealthy. Default is <strong>3</strong>.</li></ul><h4>HTTP-Specific Parameters</h4><ul><li><strong>Force Plaintext Health Checks:</strong> Sends health probes in plain HTTP without SSL encryption, even if the backend service protocol is set to HTTP with SSL enabled.</li><li><strong>Status Code:</strong> The exact HTTP status code a healthy backend server must return (such as 200).</li><li><strong>URL Path (URI):</strong> The endpoint path probed by the health checker (such as /).</li><li><strong>Response Body Regex:</strong> A regular expression used to inspect and validate text inside the backend response body.</li></ul><h3>4. Choosing the Right Tool: OCI Load Balancer vs. OCI Network Load Balancer</h3><p>The important thing to understand when choosing between OCI’s load balancing options comes down to network architecture: do you need your load balancer to inspect, terminate, and manage application layer traffic, or do you need a ultra-low latency pass-through service that forwards raw network packets at maximum speed?</p><h4>4.1 OCI Load Balancer (Layer 7 &amp; Layer 4 Reverse Proxy)</h4><p>The standard <strong>OCI Load Balancer</strong> operates as a full <strong>reverse proxy</strong>. When a client connects, the load balancer terminates the client connection at the entry point and opens a separate connection to the backend server. Because it acts as an intermediary, it hides the client’s IP address from backend servers and hides backend IPs from the client.</p><p>Here is where this becomes useful: operating at Layer 7 (HTTP, HTTPS, and gRPC) as well as Layer 4 (TCP), the OCI Load Balancer can inspect request payloads and apply intelligent application-level traffic rules.</p><p>Key capabilities and specifications include:</p><ul><li><strong>Provisioned Throughput:</strong> Bandwidth shapes provisioned up to 8 Gbps per load balancer.</li><li><strong>Application Management:</strong> Full integration with Web Application Firewall (WAF), backend autoscaling, and advanced HTTP request routing.</li><li><strong>Security &amp; Session Management:</strong> Offloads CPU-intensive SSL termination/decryption, supports HTTP session stickiness, and enables IP-based session stickiness.</li><li><strong>Free Tier Inclusion:</strong> Oracle includes one free Load Balancer instance in its tier, capped at 10 Mbps bandwidth.</li></ul><p><strong>Ideal Use Cases:</strong> Web applications, mobile application backends, environments requiring centralized SSL handling, and microservices requiring WAF security filtering or HTTP routing.</p><h4>4.2 OCI Network Load Balancer (Non-Proxy)</h4><p>The <strong>OCI Network Load Balancer (NLB)</strong> is engineered for raw speed, extreme throughput, and minimal packet processing overhead. Unlike the standard load balancer, the NLB is a <strong>pass-through, non-proxy solution</strong>. It routes network packets directly to backend target instances without modifying IP header details, preserving the original client source and destination IP addresses and ports end-to-end.</p><p>Operating at Layer 4 (supporting TCP, UDP, ICMP, and IP protocols), the NLB is directly integrated into the network fabric. It easily handles volatile network traffic spikes and millions of concurrent network flows.</p><p>Key capabilities and specifications include:</p><ul><li><strong>Throughput &amp; Scale:</strong> Capable of scaling beyond 8 Gbps. Default concurrent connection limits are set to 330,000 connections per Availability Domain (AD), reaching up to 1 million concurrent connections in 3-AD regions.</li><li><strong>Long-Running Flows:</strong> Optimized for long-lived connections lasting days or months, ensuring an active network flow consistently hits the same backend target.</li><li><strong>Protocol Versatility:</strong> Full support for TCP, UDP, ICMP, and raw IP forwarding.</li><li><strong>Free Tier Inclusion:</strong> Included as part of OCI’s Always Free tier offerings.</li></ul><p><strong>Ideal Use Cases:</strong> Scaling Network Virtual Appliances (NVAs) like third-party firewalls and SD-WAN routers, real-time audio/video streaming, Voice over IP (VoIP), Internet of Things (IoT) ingestion, databases, and high-frequency trading platforms.</p><h3>5. Side-by-Side Comparison</h3><p>To quickly identify which service matches your technical requirements, let’s look at how their key capabilities compare side-by-side:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*f2Zjw6JYelnAhpluyYnKjQ.png" /><figcaption>Flexble Loab Balaner ns Network Load Balancer</figcaption></figure><h3>6. Common Beginner Mistakes</h3><ul><li><strong>Missing Inter-Subnet Security Rules:</strong> Provisioning the load balancer and backend servers but omitting security list rules that permit traffic flow between the load balancer subnet and backend subnets.</li><li><strong>Host OS Firewall Blocks:</strong> Opening OCI Security Lists while neglecting to open local host-level firewalls (e.g., firewalld or iptables) on backend compute instances.</li><li><strong>Misconfigured Health Check Paths &amp; Status Codes:</strong> Defining HTTP health check URI paths to endpoints that do not exist, or expecting an HTTP 200 OK code when an application returns a 301 Redirect or 404 Not Found.</li><li><strong>Subnet Visibility Mismatch:</strong> Placing a Public Load Balancer into a Private Subnet, preventing internet access due to the absence of public routing and public IP allocation.</li><li><strong>Single AD Provisioning for Public LBs:</strong> Deploying a Public Load Balancer into only one Availability Domain subnet instead of two, compromising regional high availability.</li><li><strong>Ignoring Asymmetric Routing for NLB Source Preservation:</strong> Enabling NLB source IP preservation without updating backend VCN route tables to manage asymmetric packet return paths.</li><li><strong>Selecting the Wrong Service Type:</strong> Deploying a standard Load Balancer for low-latency UDP/VoIP traffic (which requires NLB) or choosing an NLB when Layer 7 path routing, HTTP header manipulation, or SSL offloading is required.</li></ul><h3>7. Quick Quide</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/740/1*8SLxcYXzPXS1pn_c3rmLtg.png" /><figcaption>Quick decision guide</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6d4712c0ce66" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>