---
title: How to set up a load balancer
description: Unexpected traffic spikes can crash your website, but Cloudflare Load Balancing helps keep your apps online and fast. In this step-by-step tutorial, learn how to create a public load balancer in just five steps - select a hostname, add an origin pool, attach a health monitor, choose a traffic steering method, and configure custom rules. We'll also explain the difference between public and private load balancers and guide you through using session affinity, fallback pools, and proxy modes.
image: https://developers.cloudflare.com/cf-twitter-card.png
---

> Documentation Index  
> Fetch the complete documentation index at: https://developers.cloudflare.com/videos/llms.txt  
> Use this file to discover all available pages before exploring further. 

[Skip to content](#%5Ftop) 

# How to set up a load balancer

Unexpected traffic spikes can crash your website, but Cloudflare Load Balancing helps keep your apps online and fast. In this step-by-step tutorial, learn how to create a public load balancer in just five steps - select a hostname, add an origin pool, attach a health monitor, choose a traffic steering method, and configure custom rules. We'll also explain the difference between public and private load balancers and guide you through using session affinity, fallback pools, and proxy modes.

Chapters

* ![Introduction to Load Balancing](https://customer-1mwganm1ma0xgnmj.cloudflarestream.com/ce39fdf599aed3661f60e8f780761808/thumbnails/thumbnail.jpg?fit=crop&time=0s)  

 **Introduction to Load Balancing** 0s
* ![Step 1 - Select Hostname and Basic Settings](https://customer-1mwganm1ma0xgnmj.cloudflarestream.com/ce39fdf599aed3661f60e8f780761808/thumbnails/thumbnail.jpg?fit=crop&time=44s)  

 **Step 1 - Select Hostname and Basic Settings** 44s
* ![Step 2 - Add or Attach an Origin Pool](https://customer-1mwganm1ma0xgnmj.cloudflarestream.com/ce39fdf599aed3661f60e8f780761808/thumbnails/thumbnail.jpg?fit=crop&time=82s)  

 **Step 2 - Add or Attach an Origin Pool** 01m22s
* ![Step 3 - Attach a Health Monitor](https://customer-1mwganm1ma0xgnmj.cloudflarestream.com/ce39fdf599aed3661f60e8f780761808/thumbnails/thumbnail.jpg?fit=crop&time=105s)  

 **Step 3 - Attach a Health Monitor** 01m45s
* ![Step 4 - Configure Traffic Steering](https://customer-1mwganm1ma0xgnmj.cloudflarestream.com/ce39fdf599aed3661f60e8f780761808/thumbnails/thumbnail.jpg?fit=crop&time=123s)  

 **Step 4 - Configure Traffic Steering** 02m03s
* ![Step 5 - Add Custom Rules \(Optional\)](https://customer-1mwganm1ma0xgnmj.cloudflarestream.com/ce39fdf599aed3661f60e8f780761808/thumbnails/thumbnail.jpg?fit=crop&time=144s)  

 **Step 5 - Add Custom Rules (Optional)** 02m24s
* ![Review and deploy](https://customer-1mwganm1ma0xgnmj.cloudflarestream.com/ce39fdf599aed3661f60e8f780761808/thumbnails/thumbnail.jpg?fit=crop&time=159s)  

 **Review and deploy** 02m39s

```json
{"@context":"https://schema.org","@type":"TechArticle","@id":"https://developers.cloudflare.com/videos/load-balancing/#page","headline":"How to set up a load balancer | Cloudflare Docs","description":"Unexpected traffic spikes can crash your website, but Cloudflare Load Balancing helps keep your apps online and fast. In this step-by-step tutorial, learn how to create a public load balancer in just five steps - select a hostname, add an origin pool, attach a health monitor, choose a traffic steering method, and configure custom rules. We'll also explain the difference between public and private load balancers and guide you through using session affinity, fallback pools, and proxy modes.","url":"https://developers.cloudflare.com/videos/load-balancing/","inLanguage":"en","image":"https://developers.cloudflare.com/cf-twitter-card.png","publisher":{"@type":"Organization","name":"Cloudflare","url":"https://www.cloudflare.com/"},"isPartOf":{"@type":"WebSite","@id":"https://developers.cloudflare.com/#website","name":"Cloudflare Docs","url":"https://developers.cloudflare.com/"}}
```
