How to automatically scale?


I would like to use Caddy for our SaaS to implement a “custom domain” feature. However, I’m having a hard time to find out how to deploy the server. We are using GCP for all our services and my initial thought was to run Caddy as Cloud Run service but I was wondering if that can work. I guess every time a container gets destroyed or a second container spins up, issues with the certificates can occur.

Therefore I was wondering how Caddy can be deployed on GCP with automatic scaling?


You’d definitely want to avoid frequent startups and shutdowns because there is a not insignificant amount of overhead there, best to try to keep them running as long as possible.

If all the Caddy instances share storage (either via filesystem with something like gluster or ceph, or with the redis or consul storage plugins) then Caddy can coordinate certificate management via the storage via locks.

That said, I find your question hard to answer since it’s quite vague, it all depends on what scaling problem you’re trying to solve.

This topic was automatically closed after 30 days. New replies are no longer allowed.