Skip to content

Cloudflare Load Balancing vs self-hosted multi-region LB: when the managed service is the right tool

A managed global LB removes a lot of plumbing. It also removes a lot of control. Here is the cutover line we use on real customer environments.

You decide to go multi-region. You have two options on the table: turn on Cloudflare Load Balancing on your existing CF zone and point a hostname at your regional pools, or stand up your own anycast LB fleet across the regions you operate. The Cloudflare option goes from decision to live in an afternoon. The self-hosted option takes a quarter — BGP peering, anycast IP allocation, health-check propagation, observability plumbing — and forever to operate. The right answer depends on which problems you’d rather own.

What’s happening

Cloudflare Load Balancing sits on Cloudflare’s anycast edge, monitors your origin pools with their probes, and steers traffic to the nearest healthy pool. You configure pools (sets of origin servers), monitors (HTTP checks), and a load balancer (rules for which pool gets which traffic). Traffic enters via Cloudflare’s IPs, terminates at CF, and proxies to the chosen origin. Failover decisions happen at CF’s edge; the time-to-detect plus time-to-steer is measured in seconds. Pricing is per-LB plus per-DNS-query for steering — the numbers are scoping, not list price, but the model is predictable.

The tradeoffs: you can’t see what CF sees. Your health checks are theirs, your steering decisions are theirs, your debugging is reading their dashboard. When something is weird, the answer is often “wait for support to confirm” rather than tcpdump. The traffic also has to traverse CF’s edge — a regional pool sitting in Montreal serving Montreal users via a CF POP in Toronto is not always the shortest path.

Self-hosted multi-region LB typically looks like an anycast IP advertised from each of your regions, HAProxy/Envoy at each region terminating connections, and health checks within the region promoting/demoting backends. You own the BGP relationships (either direct or via an upstream that lets you announce your own /24), the LB software, the observability, and the post-mortem when something goes wrong. The control is total. The operational burden is also total.

Most “self-hosted multi-region LB” in B2B SaaS is actually a halfway house: per-region anycast for failover, with DNS-layer geo-steering between regions, because real BGP relationships are still uncommon at the SMB-SaaS scale.

How to verify

Three checks for which side of the line your workload sits on:

# 1. What's the latency penalty of routing through CF vs direct?
# From a probe in each target region:
curl -sw "%{time_starttransfer}\n" -o /dev/null https://app-cf.example.com/healthz
curl -sw "%{time_starttransfer}\n" -o /dev/null https://app-direct.example.com/healthz

# 2. Failover detection time — how fast does CF notice a dead origin?
# Block the origin from CF's IP ranges (test environment!):
sudo iptables -I INPUT -s 173.245.48.0/20 -j DROP
# Then measure how long until CF steers away from this origin.

# 3. Does the workload need WAF / Bot Management / rate limiting?
# These are CF-side products. If you'd buy them separately, the LB cost is partly absorbed.
curl -sI https://app.example.com/ | grep -i 'cf-ray'

# 4. Does the workload need to expose non-HTTP services?
# CF LB is HTTP/HTTPS only (with Spectrum as a paid add-on for TCP).
# Self-hosted handles arbitrary TCP/UDP from day one.

If your regional pools live in places where CF doesn’t have a POP nearby (uncommon but real for some jurisdictions), the latency hit is meaningful. If your application is HTTP-only and you already use CF for DNS + CDN, the LB is mostly turning on a feature.

The fix

The cutover line we use on customer environments:

  1. You already use Cloudflare for DNS, CDN, WAF, and you’re HTTP-only: Cloudflare Load Balancing. The marginal complexity is trivial; you get failover, health checks, and steering in the same pane of glass. This is the right answer for most B2B SaaS that didn’t start with a Kubernetes mindset.
  2. You operate non-HTTP services (custom TCP protocols, raw gRPC without HTTP/2, mail, anything Spectrum doesn’t cover at a price you accept): self-hosted. CF LB is HTTP-shaped.
  3. You have strict data-residency or sovereignty rules (Canadian customer data must not transit foreign infrastructure as a matter of contract or regulation): self-hosted with regional anycast and DNS-layer geo. CF terminates TLS at the edge in their POPs; for some contracts that’s a non-starter.
  4. You operate at scale where CF’s per-query and per-LB pricing becomes the dominant line item, AND you already have anycast capability: self-hosted starts making economic sense. Below that scale, the engineering time to operate it is the bigger line.
  5. You need a sophisticated traffic-shaping strategy (canary by header value, A/B by user attribute, complex multi-step failover): self-hosted, because the LB software is something you can iterate on. CF LB has steering rules, but they’re a fixed product surface.

Two architectural patterns we run for customers:

  • Hybrid: CF in front for DNS, WAF, and global anycast termination. Self-hosted LB tier inside the VPC for intra-region routing and backend pool management. The two layers do different jobs.
  • CF-only: Single LB at CF, regional origin pools that are themselves single-instance behind a regional LB (or directly addressable). Simple, predictable, ops-friendly for teams that don’t want to operate global infrastructure.

The honest summary: managed global LB is the right call when the operational savings exceed the cost of giving up control of the failover decision. For most B2B SaaS at most scales, that’s true. For workloads where the LB decision is the business, it isn’t.


Stack Harbor designs both managed-LB and self-hosted multi-region architectures on managed cloud compute, including the hybrid pattern most teams actually need. If you’re weighing the two for a specific workload, book a scoping call.