Q: Hi, Is it possible to make caddy retry reverse proxy calls to the application server if they fail the first time?
I have something like this:
But this returns a blank page when the server goes down for even a couple seconds.
What I would like to happen is when app goes down, caddy attempts to reverse proxy the request about 3 to 5 times with a delay of 1 second between the retries, before finally returning 5xx to the client(the client would just have a loading circle in the meantime), but any other way to achieve a similar thing is ok too.
I need this for hot reloading. My setup is single-node, but if the solution necessitates running multiple replicas it’s okay too.
So far I’ve tried setting
lb_try_duration, didn’t seem to work. Please point me in the right direction.
No errors. Blank page is returned
I omitted the rest of the template as it has almost nothing to do with my current configuration or compose.