Skip to content
Cloudflare Docs

Create load balancer on test domain

Instead of starting on your production domain, you likely should create a load balancer on a test or staging domain. This may involve temporary changes to your monitors and pools, depending on your infrastructure setup.

Starting with a test domain allows you to verify everything is working correctly before routing production traffic.

Create a load balancer

To create a Public or a Private load balancer in the dashboard:

Create a Public load balancer

  1. Go to Load Balancing and select Create load balancer.

  2. On the Load Balancer Setup, select Public load balancer

  3. Choose the website to which you want to add this load balancer.

  4. On the Hostname page:

    • Enter a Hostname, which is the DNS name at which the load balancer is available. For more details on record priority, refer to DNS records for load balancing.
    • From the Data Localization dropdown, select the region you would like to use on your domain.
    • Toggle the orange cloud icon to update the proxy mode, which affects how traffic is routed and which IP addresses are advertised.
    • Add a description for your load balancer.
    • If you want session-based load balancing, toggle the Session Affinity switch.
    • If you want Adaptive Routing, toggle the Adaptive Routing switch.
  5. Select Next.

  6. On the Add a Pool page:

    • Select one or more existing pools or create a new pool.
    • If you are going to set traffic steering to Off, re-order the pools in your load balancer to adjust the fallback order.
    • If needed, update the Fallback Pool.
    • If you choose to set traffic steering to Random, you can set Weights (via the API) to your pools to determine the percentage of traffic sent to each pool.
  7. Select Next.

  8. On the Monitors page:

    • Review the monitors attached to your pools.
    • If needed, you can attach an existing monitor or create a new monitor.
  9. Select Next.

  10. On the Traffic Steering page, choose an option for Traffic steering and select Next.

  11. On the Custom Rules page, select an existing rule or create a new rule.

  12. Select Next.

  13. On the Review page:

    • Review your configuration and make any changes.
    • Choose whether to Save as Draft or Save and Deploy.

Create a Private load balancer

  1. Go to Load Balancing and select Create load balancer.

  2. On the Load Balancer Setup, select Private load balancer

  3. Associate your load balancer with either a Cloudflare private IP or a specified IP address and create a description for your load balancer.

  4. On the Add a Pool page:

    • Select one or more existing pools or create a new pool.
    • If you are going to set traffic steering to Off, re-order the pools in your load balancer to adjust the fallback order.
    • If needed, update the Fallback Pool.
    • If you choose to set traffic steering to Random, you can set Weights (via the API) to your pools to determine the percentage of traffic sent to each pool.
  5. Select Next.

  6. On the Monitors page:

    • Review the monitors attached to your pools.
    • If needed, you can attach an existing monitor or create a new monitor.
  7. Select Next.

  8. On the Traffic Steering page, choose an option for Traffic steering and select Next.

  9. Select Next.

  10. On the Review page:

    • Review your configuration and make any changes.
    • Choose whether to Save as Draft or Save and Deploy.