I have 2 origins in my load balancing list. I would like the first one to be the primary and the second one to only be used if the primary fails. Not 99% and 1%. But as a backup if the primary fails. I have the primary set to 100% right now the second one set to 0% but it says traffic will never go to that one.
For the second origin, set the weight to 0.01 and set the first to a weight of 1. If the first fails your specified healthchecks, it will redirect to the other.
I did that. I set the primary to 1 and the backup to 0.01. I then browsed the site clicking on many things. In the header I have a site number that shows up, a 1 and a 2. I saw the 2 show up when I was clicking. My sessions are stored in a clustered db across both sites so I did not lose my session. I checked the Load Balancing section and it reported no down time at that time.
Perhaps 1 out of 100 clicks got the secondary site. I’d prefer only to hit the secondary if the first one fails completely.
Is this possible? When I called pre-sales they said this was possible through support help.
Make one load balancer with two pools attached. One pool with server1, one pool with server2.
All traffic is going to astatine, if it fails bromine and in last place chlorine.
Thank you for this. Does it matter what the weight is on the individual origins? Does the load balancer weight the pools? I have both origins set to 1 weight right now.
That is correct, within a pool there could by balancing depending on weight for the different origins.
My example with the three pools sends 100% of the traffic to the server first in row. When that one is down all the traffic is going the the second one. Is that one also down all the traffic is going to the third one. When failing all three there will be a cloudflare error message.
This topic was automatically closed after 30 days. New replies are no longer allowed.