ghost-on-heroku: Ghost does not support clustering or multiple dynos (CDN/HTTP-cache required to scale)
Hey @cobyism 👋 I’ve had a look at this Ghost/Heroku setup and unfortunately it promotes some practices that will result in broken Ghost installations.
Ghost does not support clustering in any form due to in-memory caches that will result in each instance getting out of sync with each other - there can only be 1 instance of Ghost for each site.
Can you please remove any mention of clustering, scaling up of dynos (unless advising not to do so!), and the use of node-cluster
?
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 16
Thanks for your reponse @johnonolan
I’m very happy to hear that Ghost can squeeze so much performance out of a single thread of javascript. That is clearly a testament to Ghost’s engineering practices and history to have so much confidence about this architecture.
Heroku’s dyno scaling is not just for “scaling code” but also to support rolling deployments without downtime and to load balance across healthy dynos if a server/dyno suffers hardware failure.
I always prefer operating a service that can scale horizontally, separate from whether or not the “code scales properly”.
How do you deploy new versions of a Ghost server without downtime or deal with hardware outages if Ghost does not support multiple servers?
To clarify, @mars, this issue was opened by way of an olive branch as an offer of help and guidance. We had both discussed and intended to offer to take over the project and have it officially maintained by the Ghore core team.
Unfortunately the petty hostility in this thread put an end to that idea.
All the best
I just removed
node-cluster
, added a “do not scale dynos” warning, and bumped up to the most recent 1.x release.@mars A single, single-threaded Node.js process has been more than sufficient to serve 1-5 of HN’s frontpage stories and every day for the last 6 years alongside literally tens of billions of requests without ever falling over as a result of load.
Does your code not scale properly without lots of dynos?