Post caching issue: How to query the db instead?


#1

TL;DR:

Is Ghost caching newly created posts inside the filesystem rather than reading them from the database? If so, how do I make it stop? If not, what’s happening?

The setup:

We’re using Ghost 2.15, via the community-supported Docker image. We have not customised our themes or anything - it’s mostly running ‘out of the box’.

Right now, we’re deploying via AWS’s ECS and connecting to a mysql RDS endpoint, and everything was working perfectly :ok_hand:

However, for our production environment, we scaled our Ghost instances out to two(2) availability zones, though both are obviously pointed at the same database endpoint.

The Problem

Obviously, our load balancer will route us to whichever instance ‘works for it’ at the time.

When I create a blog post, everything seems fine - however, this blog post can only be viewed from the instance that it was created on.

IE, if I create a post when I have been routed to instance A, this post is only viewable when I arrive at instance A (by chance). If I’m routed to instance B, it’s invisible.

However - the post is in the database. If I restart our service, the posts are visible again in both instances. The problem repeats if I make a new post.

The Question

Is Ghost caching newly made posts in the filesystem instead of querying the database? If so, how do I turn this feature off? We don’t expect this to be very high traffic and can afford the tiny performance hit.

Otherwise, why are our instances not in sync with our DB?


#2

#3

Thank you!


closed #4

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.