1. Caddy version (caddy version
):
TBD based on answers, but probably the latest and greatest.
2. How I run Caddy:
Probably by service using systems
a. System environment:
Will be a recent Linux, probably Ubuntu Server, so systemd and probably not using docker.
b. Command:
N/A
c. Service/unit/compose file:
N/A
d. My complete Caddyfile or JSON config:
N/A
3. The problem I’m having:
So I am evaluating using caddy as a reverse proxy to another HTTP application running in the background. For historical reasons there can only ever be a single instance of this application running. I want to get to as close as possible 0 downtime deployments for it.
The service restarts in a few seconds, but of course doing so drops all connections.
One idea suggested was to have the reverse proxy hold the incoming connections for 10 seconds before sending to the backend. Ideally by allowing the deployment to instruct the proxy to start doing this, wait a bit for current connections to drain, update the service and then instruct the proxy to go back to normal.
I had a look around and it seems Caddy might be a good candidate for this since it can be scripted against.
However no idea if this is even possible in Caddy and a look over the documentation didn’t really help there. Just looking to get some pointers (perhaps a link to the correct place in the documentation), and if it’s even possible.
4. Error messages and/or full log output:
N/A
5. What I already tried:
We have tried nothing man, and we’re all out of ideas!
6. Links to relevant resources:
N/A