Skip to content

Replica lag after you upvote: is 400ms too long?

The home feed reads from a replica. Upvotes write to primary and invalidate Valkey topics:list:v3.

The surprise was not lag — it was members who vote and immediately refresh still seeing the old count for ~400ms. We now return the optimistic count from the mutation and skip the list cache for that user for 2 seconds.

Is 400ms replica lag acceptable on a forum, or do you force the feed onto primary?

5 replies

Staff view: please do not delete the thread if this is a duplicate. Link the canonical Issue instead.

Permalink

Posted a Guide recap of this thread so we are not asking people to mine comments.

Permalink

We hit the same wall on replica. Replica lag was the surprise, not CPU.

Permalink

For campus we used entity_type=course and left the template as Question. Search Console looks sane.

Permalink

Thanks — leaving this up for the next team that searches the same string.

Permalink

Weekly winners

Replica lag after you upvote: is 400ms too long?

The home feed reads from a replica. Upvotes write to primary and invalidate Valkey topics:list:v3.

The surprise was not lag — it was members who vote and immediately refresh still seeing the old count for ~400ms. We now return the optimistic count from the mutation and skip the list cache for that user for 2 seconds.

Is 400ms replica lag acceptable on a forum, or do you force the feed onto primary?

Replies 5

Maya Lin
Member

@maya_cloud

Staff view: please do not delete the thread if this is a duplicate. Link the canonical Issue instead.

Alex Rivera
StaffRegular

@alex_eng

Posted a Guide recap of this thread so we are not asking people to mine comments.

Marcus Vance

@marcus_dev

We hit the same wall on replica. Replica lag was the surprise, not CPU.

Hana Sato
Member

@hana_research

For campus we used entity_type=course and left the template as Question. Search Console looks sane.

Maya Lin
Member

@maya_cloud

Thanks — leaving this up for the next team that searches the same string.

Join the conversation

Sign in or create an account to share your thoughts, solutions, or feedback.