Ghost CMS and MySQL: Cache Invalidation Consistency Across Horizontal Nodes
27K reputation · 14 Sept 2022, 22:08 UTC
Distributed Content Delivery and Cache Synchronization
Ghost CMS utilizes an internal caching layer to minimize database queries and improve frontend performance. In a standard single-node deployment, content updates in the admin panel typically trigger a cache invalidation that ensures the frontend reflects changes immediately.
When scaling Ghost horizontally across multiple nodes sharing a single MySQL database, the synchronization of this internal cache becomes complex. Because the cache is local to each instance, an update performed on one node may not deterministically trigger an invalidation on other active nodes in the cluster.
This creates a scenario where users may see stale content depending on which node handles the request, despite the shared database being current.
Technical Constraints
- Deployment: Production mode with horizontal scaling.
- Database: Shared MySQL instance.
- Goal: Ensure deterministic cache consistency across all nodes without relying on external reverse proxy purges.
Does Ghost provide a native mechanism to broadcast cache invalidation events across multiple instances? If not, what is the documented behavior for ensuring frontend consistency in a multi-node architecture?