Design Guaranteed Permanent Deletion for Google Drive Trash
Last updated: November 29, 2026
Quick Overview
Design the pipeline that permanently deletes Drive files 30 days after they are trashed, or immediately when a user empties trash, guaranteeing the bytes are gone from primary storage, replicas, caches, and backups within a promised window.
0
0
0 solved
Design the pipeline that permanently deletes Drive files 30 days after they are trashed, or immediately when a user empties trash, guaranteeing the bytes are gone from primary storage, replicas, caches, and backups within a promised window.
Google onsites for storage teams like this because deletion is a privacy commitment, not a cleanup chore. The interviewer checks that you can prove completeness across many copies, including backups that are immutable, and that deletion is safe against bugs.
What the Interviewer Expects
- Model deletion as a tracked state machine with deadlines
- Enumerate every place data lives, including caches, search indexes, and backups
- Use crypto-shredding to delete data inside immutable backups
- Add safety delays and rate limits against accidental mass deletion
- Provide auditable proof that deletion completed on time
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
- How do you delete one file's data from a backup tape you cannot rewrite?
- How do you protect against a bug that marks a million files as trashed?
- How would a Workspace admin legal hold change the flow?
- How do you verify that no stray copy survived?
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
- Trashed items auto-purge after 30 days; "Empty trash" purges right away.
- Once purged, data must be unrecoverable from all systems within a published window (e.g., 60 days including backups).
- Wor...
High-Level Design
- Metadata service marks a file
TRASHED(ts). A Deletion Scheduler indexes(purge_due_day, file_id). - On the due day or on Empty trash, the file transitions to
PURGINGand a **Deletion O...