CDN says host down yet it's up

If you are getting Cloudflare IP addresses, then try this:

https://support.cloudflare.com/hc/en-us/articles/200170786-Restoring-original-visitor-IPs

I truly cannot confirm this statement.
I host or maintain about 80 Websites all of them are using Cloudflare since 2018, none of them has had any issues so far (LEMP stack).
True, there was the 521 error only when the physical switch failed once at the datacenter.

Could you post here what is your ticket number? Maybe @cloonan could take a look.