Load Balancer Triggering Falsely

Hi. I’ve been using Cloudflare for several months now and I have been paying for the Load Balancer feature ever since I signed up, but it has never been working right. Randomly, even though my primary server is up and connected, the Load Balancer will trigger and switch to my second server. It’s a real pain and the customers on my site have been complaining to me about it for quite some time. I’ve tried playing around with the settings and all, but nothing seems to help. It makes zero sense to me why it triggers. Sometimes it triggers for 3 seconds and switches back. It’s got to the point where it’s really pissing me off and I’m wasting my money on this service from Cloudflare. Does anyone have any suggestions or ideas on how to debug and solve this? Thanks.

Can you describe how you have setup the Cloudflare load balancer?

Do you have any data in “Load Balancing Analytics”?

For the scenario you are describing, I would create two pools, with one server in each. The first “primary” has your main server, with a suitable monitor to check the server health. The second pool contains your backup server, and does not need a monitor at all.

The setup should look like this:

You can adjust the monitor settings to accurately detect when your primary origin is unavailable.

I don’t have any data because it requires me to upgrade my plan. It’s a bit silly of Cloudflare to have you buy the Load Balancer and then not offer any analytics for it.

Here is my current setup. It looks fine to me.

Is the issue that some traffic is getting sent to melbourne?

To only use melbourne if Sydney is failed, then it should be in a different pool, and order the pools in the order you want failoven to happen. Weighted load balancing is not exact:

A significant amount of traffic is required for the distribution to converge on the expected values

.

1 Like

Yes, sometimes it re-routes to ‘melbourne’ even though the ‘sydney’ server is up and running and is set to 0.99% weight.

Ah, right. So I should have two pools. What do I then set the weight percentages to? :slightly_smiling_face:

Leave them blank and it will be fine.

I’m curious how your customers know? Is the backup server not actually a backup?

1 Like

It’s not a backup server. It simply shows that the main server is down with a basic HTML page.

Are you sure? I think the primary server should be set to a weight of 1 and the secondary should be 0.

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.