How does Cloudflares Loadbanacing working exactly?
I have set up cloudflares loadbalance for my web application for a URL. It works fine, the traffic is balanced accordingly to the weight given to the servers. The application is a Laravel application served by NginX.
Healthcheck is set to see both servers main page and see what is the status code. This also works fine.
Now here is where my understanding stops. If I’m not mistaken a loadbalancer is supposed to check if the servers are accessable and if one is not, then all the traffic will be routed to the working servers, right? In my case, if ANY of my servers go down, the server stays in as active and still receives traffic despite not working. Is this the normal working method?
If it is, then is it my “job” to create an API call to cloudflare in case of a healthcheck fail to remove the failed origin server from the loadbalance and re-enable it when healtcheck checks out again? If yes, then where exactly can I do this?