How it works
A user may unfollow, mute, block, change a post’s audience, or delete it after fanout. Existing inbox entries and caches can lag. The read service must enforce the current authorization policy against canonical relationship and post state before returning content. Background invalidation removes stale pointers and reduces future work, but it is not the privacy boundary.
Walk through one block. At 10:00 fanout places a post ID in Ana’s inbox. At 10:05 the author blocks Ana. At 10:06 Ana refreshes; the ID is still there, but the read check finds the block and drops the post. At 10:20 a cleanup job removes the entry. If access relied on cleanup, Ana would have had 14 more minutes of access.
Set distinct guarantees: post creation can appear eventually in a follower’s feed; deletion or a privacy change may require much faster suppression. Tombstones, durable markers that a post was deleted, prevent it from reappearing when a delayed worker retries. Versioned audience or relationship data helps workers detect work produced under an older rule. The cost is a batched permission lookup on every page, and any cache of those permissions needs a short expiry or it recreates the same lag.
A post may already be on a device or in a CDN cache. Document the practical revocation window and purge mechanism for media; no server-side cache policy can erase a screenshot or a client’s previously downloaded bytes. “Delete” needs a product-specific retention and audit policy as well as an API behavior.
A private post was fanned out, then the author removes a follower while a queue is delayed. What must hold at read time?
The removed follower must fail the current audience check even if an old fanout job writes the post ID into their inbox. Tombstones or version checks can clean derived entries, but read-time authorization closes the privacy gap.
Use this as a guide for self review; written answers are not graded.Keep in mind
- Feed cache entries never override current access rules.
- Creation and revocation may need different consistency targets.