We are using a load balancer with two hosts. Our hosts are perfectly healthy, there are no error messages at our end, and all requests complete in a time under 300ms. When having a web browser open with the endpoints directly, there are no errors, everything works smoothly (servers in Germany, accessing from Vienna).
However, when going through Cloudflare, we occasionally get 504 errors, always with the timeout of 10 seconds.
Here is some sample data from the specific requests that failed:
Ray ID: 43e9b5564f1159d2 2018-07-22 23:32:55 UTC
Ray ID: 43ed9078bd7659d2 2018-07-23 10:46:48 UTC
Ray ID: 43ed95d6f9e8597e 2018-07-23 10:50:28 UTC
Ray ID: 43ed99048f38597e 2018-07-23 10:52:38 UTC
The requests occur every couple of minutes, sometimes more frequent.
I’m pretty sure that we are not doing anything wrong at our end: none of these errors are registering at our end, and following exactly the same workflow while bypassing Cloudflare never fails to connect. It looks like Cloudflare occasionally fails to establish a TCP connection and times out with HTTP 504 for reasons, that are unclear to us, and I can only think that something is wrong at the Cloudflare’s end.
What’s interesting, we have two domains in our account, and it doesn’t happen with the second domain, which has an identical configuration and is routed to the same servers.