Cloudflare Load Balancing

Over-utilized or geographically distant servers add unnecessary latency and degrade the visitor experience. In many cases, unreliable or misconfigured servers drop visitor requests completely, preventing access to websites, web apps or APIs. Poor visitor experiences like these have a direct impact on revenue, reputation, and customer loyalty.

Expanding on Cloudflare’s highly available DNS infrastructure and global Anycast network, Cloudflare Load Balancing addresses these issues by providing:

  • Local and global load balancing to reduce latency by load balancing traffic across multiple servers or by routing traffic to the closest geolocation region.
  • Health checks with fast failover to rapidly route visitors away from failures.

Already a Cloudflare customer? Activate Load Balancing

load balancing hero
"The combination of Load Balancing’s geolocation steering and Cloudflare’s caching makes sure customers are getting the fastest load times possible."
Nigel Hepworth
Managing Director at Active Solutions Limited

Local and Global Load Balancing to Control Traffic

Cloudflare Load Balancing Screen

Cloudflare's Load Balancing automatically reduces latency by directing visitors to infrastructure closest to them: European customers are sent to the London datacenter, Australian customers to the Sydney datacenter etc. Cloudflare Global Load Balancing runs on Cloudflare’s global Anycast network and ensures that origin requests for dynamic content are sourced from origins that are either closest to the user or meet specific weighted requirements.

Cloudflare’s Global Load Balancing runs across Cloudflare’s entire network and supports any protocol: from HTTP(S) to TCP and UDP based services via DNS or Spectrum. This minimizes friction between any existing services deployed with other cloud providers.

"When we rolled out Cloudflare Load Balancing to route traffic across our atlas of websocket servers, we immediately got messages from customers in Asia and Oceania thanking us for the improvement."
Valérian Saliou
Chief Technology Officer at Crisp

Health Checks & Fast Failover That Circumvents DNS Propagation Delays

Cloudflare Load Balancing

Cloudflare Load Balancing includes active availability monitoring that checks the health of servers from Cloudflare’s datacenters around the globe. Through periodic HTTP/HTTPS requests, monitoring can be configured for specific URLs with customizable intervals, timeouts, and status codes. Availability monitoring checks the health of origin servers as often as every 15 seconds, with reporting via email notifications and a REST API. Seconds after an origin server is marked as unhealthy, multi-region failover intelligently routes traffic to the next available server.

Cloudflare Load Balancing is powered by Cloudflare's DDoS-resilient DNS, one of the fastest DNS providers globally. When used alongside Cloudflare's reverse proxy, Cloudflare DNS changes propagate orders of magnitude faster than public DNS services since Cloudflare can avoid waiting for public time-to-lives (TTLs) to expire.

Session Affinity Without the Need for Application Changes

session affinity

Session Affinity, often referred to as sticky sessions, directs all end-user requests of a session to a specific origin. Cloudflare’s Load Balancer maintains session affinity by setting a cookie with the initial response to the client. Session Affinity can be enabled through a simple configuration change in the Load Balancing application of Cloudflare’s dashboard.

Shopping carts within e-commerce stores benefit from session affinity. If an end-user adds an item to their cart, subsequent requests during the same session require the end-user to be directed to the same origin server to see the item in their cart, which can be achieved through Session Affinity.

load balancing event logs

Load Balancing Event Logs

Load Balancing event logs allow for the review and filtering of status changes of your Load Balancing origins and pools.

Learn More >

Multi-Cloud Reduces Lock-In and Avoids Outages

Multi-Cloud Reduces Lock-In and Avoids Outages

Cloudflare Load Balancing can be used across multiple cloud providers infrastructure to mitigate the impact of disruptions caused by a single provider or server.

Customers select a primary provider to direct all traffic to. Once a failure is detected, Cloudflare Load Balancing automatically routes traffic to backup providers or regions. For example, if a customer experiences outages or intermittent network connectivity in AWS, Google Cloud, Microsoft Azure, or even the customer's own infrastructure, Cloudflare Load Balancing automatically fails over to healthy providers or servers.

Key Features

Configurable <a href='https://support.cloudflare.com/hc/en-us/articles/230866667-Identifying-Load-Balancing-Health-Checks' class='link--bolder'>health check</a> frequencies

Configurable health check frequencies

<a href='https://support.cloudflare.com/hc/en-us/articles/115000081911-Tutorial-How-to-Set-Up-Load-Balancing-Intelligent-Failover-on-Cloudflare' class='link--bolder'>Fast failover</a> (X seconds)

Fast failover (X seconds)

<a href='https://support.cloudflare.com/hc/en-us/articles/115001771451-Load-Balancing-Session-Affinity' class='link--bolder'>Session affinity</a> (sticky sessions)

Session affinity (sticky sessions)

Detailed <a href='https://support.cloudflare.com/hc/en-us/articles/360000062871-Load-Balancing-Event-Logs' class='link--bolder'>event logs</a> of origin servers & pools

Detailed event logs of origin servers & pools

Works with <a href='/products/argo-smart-routing/' class='link--bolder'>Argo Smart Routing</a>

Works with Argo Smart Routing

Local and global <a href='https://support.cloudflare.com/hc/en-us/articles/115000081911-Tutorial-How-to-Set-Up-Load-Balancing-Intelligent-Failover-on-Cloudflare' class='link--bolder'>load balancing</a>

Local and global load balancing

Health <a href='https://support.cloudflare.com/hc/en-us/articles/115000081911-Tutorial-How-to-Set-Up-Load-Balancing-Intelligent-Failover-on-Cloudflare' class='link--bolder'>status notifications</a> through email and REST API

Health status notifications through email and REST API

Support for HTTP/S traffic

Support for HTTP/S traffic

<a href='https://support.cloudflare.com/hc/en-us/articles/115000540888-Load-Balancing-Geographic-Regions' class='link--bolder'>Geo-routing</a> to origin infrastructure

Geo-routing to origin infrastructure

Avoid DNS propagation delays

Avoid DNS propagation delays

Includes <a href='/ddos/' class='link--bolder'>DDoS protection</a>

Includes DDoS protection

Fastest managed <a href='/dns/' class='link--bolder'>DNS</a> globally

Fastest managed DNS globally

Integrated <a href='/cdn/' class='link--bolder'>content delivery network</a> (CDN)

Integrated content delivery network (CDN)

Dynamic steering

Dynamic steering

FQDN origin resolution

FQDN origin resolution

Support for layer 4 traffic with Spectrum

Support for layer 4 traffic with Spectrum

Benefits of Cloudflare Load Balancing

icon configuration purple

Simple Configuration

Easy configuration through Cloudflare’s dashboard, or automation through a powerful API.

icon ddos purple

DDoS Resilient Service

Anycast network that is over 15x bigger than the largest DDoS attack ever recorded ensures traffic continues to be routed even under stress.

icon global purple

Global DNS Network

Health checks from Cloudflare’s data centers enable fast failover unbound by DNS propagation delays.

Cloudflare Features

Cloudflare's Performance and Security Services work in conjunction to reduce latency of websites, mobile applications, and APIs end-to-end, while protecting against DDoS attack, abusive bots, and data breach.

Performance

Cloudflare Performance Services improve conversions, reduce churn, and improve visitor experiences by accelerating web and mobile performance, while keeping applications available.

  • content delivery network

    Content Delivery Network (CDN)

    With 193 data centers across 90 countries, Cloudflare’s Anycast CDN caches static content at the edge, reducing latency by delivering assets as close as geographically possible to visitors.
  • website optimization

    Website Optimizations

    Cloudflare includes a suite of web optimizations to improve the performance of Internet assets. Optimizations include the latest web standards, such as HTTP/2 and TLS 1.3, as well as proprietary enhancements for images and mobile device visitors.
  • dns

    DNS

    Cloudflare is the fastest managed DNS provider in the world. Cloudflare has multiple ways to achieve maximum performance for online assets.
  • load balancing

    Load Balancing

    Cloudflare Load Balancing provides load balancing, geo-steering, monitoring and failover for single, hybrid-cloud, and multi-cloud environments, enhancing performance and availability.
  • argo smart routing

    Argo Smart Routing

    Argo Smart Routing improves Internet asset performance on average of 30% by routing visitors through the least congested and most reliable paths on Cloudflare's private network.
  • railgun

    Railgun™

    Railgun compresses previously unreachable web objects by leveraging techniques similar to those used in the compression of high-quality video. This can result in additional performance increase.
  • cloudflare stream

    Stream

    Cloudflare Stream makes streaming high quality video at scale, easy and affordable.
  • cloudflare workers

    Workers

    Cloudflare Workers let developers run JavaScript Service Workers in Cloudflare's 193 data centers around the world.
  • mobile sdk

    Mobile SDK

    Cloudflare’s Mobile SDK provides visibility into application performance and load times across any global carrier network.

Security

Cloudflare Security Services reduce the risk of lost customers, declining revenues, and degraded brand by protecting against DDoS attacks, abusive bots, and data breach.

  • anycast network

    Anycast Network

    With 193 data centers across 90 countries and 30 Tbps of capacity, Cloudflare’s Anycast network absorbs distributed attack traffic by dispersing it geographically, while keeping Internet properties available and performant.
  • dnssec

    DNSSEC

    DNSSEC is the Internet’s non-spoofable caller ID. It guarantees a web application’s traffic is safely routed to the correct servers so that a site’s visitors are not intercepted by a hidden “man-in-the-middle” attacker.
  • web application firewall (waf)

    Web Application Firewall (WAF)

    Cloudflare’s enterprise-grade web application firewall (WAF) detects and block common application layer vulnerabilities at the network edge, utilising the OWASP Top 10, application-specific and custom rulesets.
  • rate limiting

    Rate Limiting

    Rate Limiting protects critical resources by providing fine-grained control to block or qualify visitors with suspicious request rates.
  • ssl/tls

    SSL / TLS

    Transport Security Layer (TLS) encryption enables HTTPS connections between visitors and origin server(s), preventing man-in-the-middle attacks, packet sniffing, the display of web browser trust warnings, and more.
  • secure registrar

    Secure Registrar

    Cloudflare is an ICANN accredited registrar, protecting organizations from domain hijacking with high-touch, online and offline verification for any changes to a registrar account.
  • orbit

    Orbit

    Cloudflare Orbit solves security-related issues for Internet of Things devices at the network level.
  • argo tunnel

    Argo Tunnel

    Cloudflare creates an encrypted tunnel between its nearest data center and an application’s origin server without opening a public inbound port.
  • cloudflare access

    Access

    Secure, authenticate, and monitor user access to any domain, application, or path on Cloudflare.
  • cloudflare spectrum

    Spectrum

    Spectrum protects TCP applications and ports from volumetric DDoS attacks and data theft by proxying non-web traffic through Cloudflare’s Anycast network.