Design Cache Invalidation for User Profile Data Across Google Services

Last updated: November 29, 2026

Quick Overview

Design how many Google services that cache a user's profile (name, photo, display settings) learn about changes quickly, so that an updated profile photo appears everywhere within seconds without every service hammering the profile store.

Google
System Design
Software Engineer
Google
November 29, 2026
Software Engineer
System Design Round
System Design
Medium

0

0

0 solved


Design how many Google services that cache a user's profile (name, photo, display settings) learn about changes quickly, so that an updated profile photo appears everywhere within seconds without every service hammering the profile store.

Profile data is read by almost every Google product, so caching is unavoidable and consistency becomes the real question. The interviewer checks whether you can design an invalidation fan-out that is reliable, ordered enough, and safe when messages are lost.

What the Interviewer Expects
  • Explain why TTL alone gives poor freshness or high load
  • Publish change events with versions from the source of truth
  • Invalidate rather than push full data, and explain why
  • Handle lost or reordered invalidations with versions and bounded TTLs
  • Avoid stampedes when a popular profile is invalidated
Key Topics to Cover
cache invalidation
change data capture
versioning
read-your-writes
fan-out
How to Approach This
  1. Start by clarifying functional and non-functional requirements with the interviewer.
  2. Estimate the scale: QPS, storage, bandwidth. This drives your design decisions.
  3. Draw a high-level architecture first, then deep dive into 1-2 critical components.
  4. Discuss trade-offs explicitly (e.g., consistency vs availability, SQL vs NoSQL).
  5. Address failure scenarios, monitoring, and how the system handles 10x traffic spikes.
Possible Follow-up Questions
  • How do you guarantee a user sees their own change immediately?
  • How do you handle a race between a read-fill and an invalidation?
  • How many subscribers can this fan-out support?
  • What if one subscriber falls hours behind?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Practice System Design Problems
Sample Answer
Requirements
  • Profile store is the source of truth; hundreds of services cache profiles locally or in memcache tiers.
  • After a change, all caches should reflect it within a few seconds; the user who changed it m...
High-Level Design
  1. Profile store writes the change with a monotonically increasing per-user version.
  2. A change stream (CDC from the store's commit log) publishes (user_id, version) invalidation events to a pu...

Submit Your Answer
Markdown supported