Design Static Asset Caching and Cache Busting for Google Docs Web
Last updated: November 29, 2026
Quick Overview
Design how the JavaScript, CSS, and font bundles of the Google Docs web client are built, versioned, cached in browsers and at the edge, and rolled out so users load quickly and never get a broken mix of old and new files.
0
0
0 solved
Design how the JavaScript, CSS, and font bundles of the Google Docs web client are built, versioned, cached in browsers and at the edge, and rolled out so users load quickly and never get a broken mix of old and new files.
Frontend engineers at Google own load performance for heavy apps like Docs, and asset caching is a common screen topic. The interviewer checks content hashing, cache headers, version skew between the page and the server, and rollback.
What the Interviewer Expects
- Use content-hashed filenames with long immutable cache lifetimes
- Keep the HTML entry point short-lived so it can point to new bundles
- Handle version skew between an open tab and a newly deployed server
- Serve assets from an edge cache with compression
- Keep old bundles available during and after rollout
Key Topics to Cover
How to Approach This
- Start by clarifying functional and non-functional requirements with the interviewer.
- Estimate the scale: QPS, storage, bandwidth. This drives your design decisions.
- Draw a high-level architecture first, then deep dive into 1-2 critical components.
- Discuss trade-offs explicitly (e.g., consistency vs availability, SQL vs NoSQL).
- Address failure scenarios, monitoring, and how the system handles 10x traffic spikes.
Possible Follow-up Questions
- What happens to a user who keeps a Docs tab open for three days?
- How do you roll back a bad bundle quickly?
- How would you split bundles so a small change does not invalidate everything?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice System Design ProblemsSample Answer
Requirements
- Users load Docs often; repeat loads should hit the browser cache almost entirely.
- New releases ship several times a week; a release must not break open sessions.
- Fast rollback.
- Global users, s...
High-Level Design
Build outputs files named by content hash, for example editor.3f9a1c.js. The HTML page (served by the Docs app server) references the exact hashes for the current release. Assets are uploaded to a s...