Usually in the range of 30-60 seconds, it reboots on first request, and then stays up for a bit before shutting down (see westmichigancopts.org). It’s almost there in terms of being feasible enough to run in that environment, but it could be that there is not enough cpu power or ram.
Edit: I will look into setting up cloudflare and see if that helps.
Hey, did you get to a state where you were happy with Ghost running in CloudRun? I’m at a similar point to you I think: It’s all running nicely but of course CloudRun shuts the instance down when inactive (good for costs), but the 20-30 second startup time means new requests get “we’ll be right back” for quite a while.
I could use Google CDN with “serve while stale” I suppose, but hoping there’s a cleaner solution?
Good advice, thanks. Yes I think CloudRun’s CPU allocation takes some of the blame - it allocates CPU during the request, but if that request is just Ghost’s “503 I’m not ready yet” then the container is very hobbled trying to start up.
I really prefer serverless/ephemeral approaches but looks like Ghost isn’t well suited to this at the moment.