Paths Subjects Questions Quizzes Pricing Search
Advanced Open Pro

Naming the Consistency Guarantee

A social app's post-creation flow: POST /posts writes to a primary Postgres database inside a SERIALIZABLE transaction that also increments the author's post count. Reads (GET /posts) are served from an asynchronously replicated read replica that can lag by up to 2 seconds.

  1. Is the write path linearizable? Is it serializable? Justify both answers separately.
  2. A user posts, then immediately refreshes their feed (routed to the replica) and does not see their new post. Which consistency property is violated, and is this a bug given the architecture as described?
  3. What single architectural change would make the read path linearizable, and what does it cost?

Share this question

← Back to Distributed Transactions, Consensus & Coordination practice

We use cookies for product analytics to improve OmniAtlas. See our Privacy Policy.