Cloudflare load balancer for home lab services

Cloudflare LB Setup

Traffic -> Load Balancing -> Create Load Balancer (paid feature) Each tunnel you created in the first step was assigned an origin address, which you’ll use here for the two orgins in your load balancer. I’ve set each to 50%, alternating each request evenly between the two tunnels. The hostname of your load balancer will be the endpoint that you can use for other CNAMEs as you add ingress rules for local services you want to host or expose. To ensure your LB groups show as healthy, add in the healthcheck endpoint defined in your ingress rules, which should look like this https://lb-hostname.domain.net/check I find this setup to be my preference vs hosting my own Traefik proxy (or similar) since I do not need to open up any ports on my firewall.

cloudflare load balancer

Note this is a paid feature. $5/month That’s it; you are load balanced! For high availability, you’ll need at least two devices running 24/7. For example, two Raspberry Pi’s running Docker engine with swarm enabled.

What is a Weighted Pool?

Before we can answer that, let’s take a quick look at how our load balancer works and define a few terms:

Complete guide from Cludflare can also be found here

Copyright Notice

Author: selfhost.casa

Link: https://selfhost.casa/posts/cloudflare-load-balancer-for-home-lab-services/

License: CC BY-NC-SA 4.0

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. Please attribute the source, use non-commercially, and maintain the same license.

Start searching

Enter keywords to search articles

↑↓
↵
ESC
⌘K Shortcut