Hey @francislavoie, I don’t think this one’s a support request
Howdy @mikestopcontinues, welcome to the Caddy community.
You probably don’t want a hosting provider, you probably want infrastructure. AWS, Azure, GCP, Linode, Vultr, et all. Hosting providers are usually pretty narrow in terms of what you can run on their platform, and Caddy won’t fit.
As for whether you want multiple app instances, that depends more on your NodeJS app than on Caddy. That said, if you go with multiple instances, Caddy makes it pretty easy. Just configure a storage backend - or even just have all of them map their file system storage (the Caddy data folder, specifically) to the same NFS share through a private network/tunnel/etc. As long as all the Caddy servers have the same storage, they basically work together like magic.
As for the CDN, you can pair this with or without multiple app instances. Depending on how deep you cache the end result (you can cache full HTML or just assets), this might reduce the need for multiple app instances. That said, probably the simplest way by far is to configure a “pull” zone, and then have your app rewrite URLs for assets to your CDN’s zone URL.
I ran a few sites like this for a while on KeyCDN. My site was www.example.com
and the zone was key.example.com
. Past initial setup I didn’t need to configure the CDN at all; I just had my site issue asset links like key.example.com/image.jpg
and the CDN would pull it dynamically from my server and then cache it. I didn’t use this for HTML caching, though - to ensure speed there, globally, I set up a few strategic geographical deployments, 2-4 in total. Not for load balancing, just for latency (CDN handled asset load).