How it works
Define service-level signals across the complete path: post commit success, event handoff failures, fanout queue age, percentage of eligible followers seeing a post within the freshness target, feed first-page latency, cache hit rate, empty-feed rate, and media error rate. A healthy post API with hours of fanout lag is still a broken feed. Kafka consumer lag, for example, counts messages behind; convert it to age before comparing it with the target.
Retry workers with idempotent post-recipient keys and dead-letter handling for poison events, ones that fail on every attempt. If the inbox cache or store is unavailable, offer a bounded pull from canonical recent-post indexes for a degraded first page if capacity allows. Limit that fallback so a broad cache outage does not overload the post database.
Skew matters: a high-follower publisher can produce a burst even at a modest global posts-per-second rate. In an example, workers write 20,000 inbox entries per second. One post to 5 million followers takes 250 seconds, and other authors sharing that partition wait behind it for over four minutes. Partition work, cap concurrency, and monitor per-author hotspots.
Reconcile sampled inboxes against canonical posts to detect lost fanout or duplicate entries; sampling keeps the read cost small. A test account that posts every minute, watched by a test follower, measures the delay readers actually get. Revisit read and write fanout thresholds using observed activity, not a fixed rule from the diagram.
Publish success is 99.99%, but followers report that posts arrive an hour late. Which signal reveals the fault?
Publish-to-visible delay and the age of the oldest fanout job reveal the gap. Inspect queue backlog, worker throughput, per-author hotspots, and post-to-queue handoff before adding more web servers.
Use this as a guide for self review; written answers are not graded.Keep in mind
- Observe user-visible freshness and latency, not only API status.
- Retries, bounded fallback, and reconciliation make derived feeds recoverable.