Geo-distributed cache with read-your-writes

DesignHard45 minMeta style

Your task

Design geo-distributed caching for a social profile service with users and read replicas in 3 regions. A user in EU edits their profile (write goes to the EU primary, replicates async to US/APAC). The cache in each region serves reads. The problem: after the EU user updates their bio, their own next read (possibly routed anywhere) must show the new value (read-your-writes), and a cross-region cache must not serve the old bio indefinitely. Design the cache + replication interaction, how you provide read-your-writes for the author, and how you bound staleness for other regions' readers.

It covers

  • Geo distributed
  • Read your writes
  • Replication