How to setup 503 page if backend app is down

I am looking for a way to set up 503 page which triggers automatically in case backend app is down.
I am not able to find useful detail online.
I looked at worker solution but that requires manual trigger. I would like to set something which is automatically detecting backend app functionality and if it throws 503, user must be presented custom page.

May I ask how would that result? What would be the trigger? :thinking:
With some 5xx error from the origin, or network interruption?

The closest what I could find out so far yet, using Cloudflare Workers here:

You modify the Worker code and redirect to a custom URL:

Or you can modify the Worker code to display custom HTML code, if that so:

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