May we use cookies so Meta, Google, LinkedIn and ChatGPT see your visit and we learn which ads work? PrivacyMay we use cookies to see which pages help, and let Meta, Google, LinkedIn and ChatGPT see your visit, so we know which of our ads work? That way we spend less on ads that do not work. We do not sell your data, and the site works the same if you decline. You can change your answer at any time under Cookie settings at the foot of the page. Privacy policy
Loading...
System Design and AI Engineering, by Roni Das. 989 interactive lessons in two courses.: 770 in System Design and 219 in AI Engineering.
Start LearningSystem design interview guide
Short answer
Google Drive system design separates file bytes from file metadata. A client splits each file into chunks of about 4 MB, hashes them, and uploads only the chunks the server does not already have, through a resumable upload. The chunks go to a blob store that handles copies and durability. A strongly consistent metadata database records the folder tree, versions, the list of chunks in each version and who may read what. Every change also goes into a per-user change log, and each device keeps a cursor into it, so it learns which files changed and downloads only the chunks it lacks.
in this guide
7 parts open to everyone · 3 with a free account · 3 with the course
You can read 7 of 13 parts. A free account opens the deep dive; the course opens all of it.
Interviewers like this problem because a naive answer (upload file, download file) is trivially wrong at scale, and the real difficulty only appears when you push on it. It tests whether you can separate a strongly consistent metadata store from a durable but eventually consistent blob store, whether you understand content addressing and deduplication, and whether you can design an incremental sync protocol instead of polling for full state. It also probes the messy human parts: two people editing the same file offline, a folder shared with tens of thousands of accounts, and a 10 GB upload on flaky hotel wifi. Strong candidates talk about chunk boundaries, cursors, and conflict semantics. Weak candidates talk only about S3.
This page is the free part.
₹1,111 in India$35 everywhere elseonce, for the whole course
The System Design course covers the Google Drive design across a run of lessons, not one page. These 4 alone are about 129 minutes of step-by-step reading, every one with a quiz.
Always clarify these in the first 5 minutes of the interview. Do not start drawing boxes until both lists are agreed.
This guide is built on these 6 lessons. Each one teaches one piece of the Google Drive design above, step by step.
Lifetime access for ₹1,111 in India or $35 elsewhere. Interactive diagrams, quizzes, and 20 capstone projects to practise on.
This one question is not enough for the interview.
Each question has why it is asked, a full answer, what the interviewer listens for, the follow-ups, the common mistakes and a diagram (268 diagrams in all). A PDF you keep, junior to staff level.
Two courses by the author of this page:
770 lessons · 18 free to read
₹1,111 in India · $35 elsewhere, once
Get System DesignYou own this course
219 lessons · 10 free to read
₹1,333 in India · $35 elsewhere, once
Get Generative AI and Agentic AIYou own this course
Save your progress and get the interview checklist PDF
Google Drive and Google Workspace serve well over 3 billion users across Gmail, Docs, Photos, and Drive, a figure Google has stated publicly. The bytes underneath live in Colossus, Google's exabyte-scale file system that runs across tens of thousands of machines per cluster. A single popular file, say a company onboarding PDF shared with 50,000 employees, must be stored once and made to appear instantly in 50,000 different folder trees. The engineering problem is not storing bytes. It is telling millions of connected clients what changed, and doing it without shipping whole files over the wire.
The core of a Drive-style system is the split between a metadata plane and a data plane. File contents are broken into chunks, hashed, deduplicated, and written to object or block storage that handles replication and durability. A separate metadata database records the folder tree, file versions, chunk lists, permissions, and per-user sync state, and this is the part that must be strongly consistent and low latency. Sync is the hard subsystem: every client keeps a cursor into a per-user change log, and the server tells it only which files changed, not the bytes. When a client does need bytes, delta sync sends only the chunks whose hashes differ from what the client already has. Large uploads are resumable so a dropped connection near the end of a 4 GB file does not restart from zero. Sharing turns one physical file into many logical views through access control lists checked on every read. Concurrent edits from offline clients produce conflicts, which the system resolves by versioning and, for some file types, by forking a conflicted copy rather than silently losing work.
Where it shows up
Asked at Google, Dropbox, Microsoft, and most companies that run large consumer or enterprise storage products. It is a favorite for senior and staff loops because it forces you to separate metadata from data and to reason about sync as its own distributed problem.
Spec sheetGoogle Drive
worked through below, with the maths
The hard parts of this design are taught step by step in the System Design course: Data Deduplication, Block Storage and Object Storage.
Eliminate redundant copies of data to save storage, content-addressable storage and hash-based dedup.
Block storage splits data into fixed-size blocks that a server uses like a local disk. Why databases run on it, block vs file vs object, and AWS EBS.
The storage model that powers the modern internet, flat, scalable, and dirt cheap.
How distributed databases resolve replication conflicts: CouchDB's deterministic winner and _conflicts, Riak's mergeable siblings, last-write-wins, and merges.
all part of
System Design Masterclass
770 lessons · about 290 hours · 18 free to read
₹1,111in India, by UPI
$35everywhere else, by card or PayPal
You own this course
Continue with Data Deduplicationpay once,
yours for life
Live from the course bench
Real interview questions, live diagrams and measured lab results, pulled at random from the lessons. A new set every time you come back.
Show your math. Pulling numbers from thin air signals you have not thought about the load.
Total users
3 billion+ (stated)
Google has publicly stated more than 3 billion users across Workspace and consumer accounts. Not all are active Drive users, but the storage plane is shared across Gmail, Photos, and Drive.
Chunk size
~4 MB average (design choice)
A common design target for content-defined chunking. Too small means huge metadata and per-chunk overhead, too large means poor dedup and bigger deltas. 4 MB balances metadata count against delta granularity. This is a design choice, not a published Drive number.
Chunks per 1 GB file
~256 chunks
Derived: 1 GB / 4 MB per chunk = 256 chunk records. Each chunk record holds a hash and a storage pointer, so a 1 GB file costs a few kilobytes of metadata beyond the bytes themselves.
Metadata per file
~1-4 KB (estimate)
Estimate: file id, name, parent id, owner, version pointer, timestamps, and a chunk list of a few hundred hashes. For typical office files this lands in the low kilobytes. Metadata volume is therefore a large database in its own right, independent of the petabytes of content.
Resumable upload chunk granularity
256 KB multiples (documented)
Google Drive's resumable upload protocol requires each PUT chunk to be a multiple of 256 KB except the final chunk. This is the transport granularity for a single upload session, distinct from the content-defined chunks used for dedup and delta sync.
Sync fan-out for a hot shared file
10,000s of clients per change
Estimate: an org-wide shared folder can have tens of thousands of members. One edit must surface in every member's changes feed, so the notification path, not the byte path, is the fan-out bottleneck.
A client (desktop agent, mobile app, or browser) talks to an API gateway that authenticates the request and routes it to the metadata service or the upload/download service. On upload, the client splits the file into content-defined chunks, hashes each one, and asks the metadata service which hashes are new. Only unknown chunks are sent, through a resumable upload session, and land in the blob store, which at Google is Colossus fronted by higher-level object and block abstractions. The blob store handles replication, erasure coding, and durability, and returns storage locations. The client then commits a file version to the metadata database: a record that names the file, its parent folder, its owner, and the ordered list of chunk hashes that make up this revision. The metadata database is the source of truth for the tree and for permissions, and it is strongly consistent so a rename or a revoked share is never ambiguous. Every mutation also appends an entry to a per-user change log. Other devices hold a cursor (a page token) into that log. They either poll changes.list or receive a lightweight push notification that says new changes exist, then pull the change entries, see which file ids moved, and fetch only the chunks whose hashes they lack. Reads go the other way: resolve the file id, check the ACL, read the chunk list, and stream chunks from the blob store, often through a CDN edge for popular content.
In a real interview, sketch this on the whiteboard before diving into any single box.
Walk through each service. The interviewer wants to hear what each one owns, not just the names.
Terminates client connections, verifies OAuth tokens or session cookies, and routes to the metadata, upload, or download services. It enforces per-user rate limits and is the single place that maps an incoming request to an authenticated identity used for every downstream permission check.
The source of truth for the folder tree, file records, versions, chunk lists, and permissions. It must be strongly consistent and low latency, since it backs the file list UI and every ACL check. Google's heritage here is Bigtable for large flat keyspaces and Spanner for globally consistent transactional metadata.
Splits file content into variable-length chunks using a rolling hash so that inserting a byte near the start does not shift every downstream boundary. It hashes each chunk, checks the hash against the store, and only accepts chunks that are new. This is where storage savings and delta efficiency come from.
Durably stores chunk bytes with replication and erasure coding. Content is addressed by hash, so a chunk is written once regardless of how many files or users reference it. At Google this sits on Colossus, whose custodians handle re-replication and RAID reconstruction in the background.
Maintains a per-user ordered log of changes and hands out page tokens that act as cursors. Clients advance their token to learn exactly which files changed since they last synced. A push channel (changes.watch style) notifies clients that new entries exist without shipping the change data itself.
Runs resumable upload sessions, tracks received byte ranges, and lets a client query and continue an interrupted transfer. On download it resolves chunk locations, checks permissions, and streams bytes, using edge caching for widely shared files.
Evaluates access control lists, including permissions inherited from parent folders and from group memberships. It answers the question 'can this identity do this action on this file' on the hot path of every read and write, and it must reflect a revocation immediately.
files. One row per logical file or folder. parent_id models the tree. current_version_id points at the head revision. A folder is just a file with no content. Renames and moves…
Every table for Google Drive, its keys, and which store fits it and why.
Content-defined chunking and deduplication. Fixed-size chunking looks simple but breaks the moment someone inserts a byte at the top of a file, because every subsequent boundary shifts and every chunk hash…
7 deep dives on the parts that break at scale: Content-defined chunking and deduplication; The metadata and data plane split; Delta sync: sending only what changed.
Content-defined chunking versus fixed-size blocks. Content-defined boundaries survive insertions and deletions, which preserves dedup and keeps deltas tiny, at the cost of a rolling-hash pass over every byte and variable…
6 decisions an interviewer expects you to defend, each with the alternative and why it loses here.
A user is removed from a shared folder with 50,000 files. How do you make sure they lose access everywhere at once?
3 follow-up questions with model answers, the interview scorecard for this question, and a mock interview on Design Google Drive with the AI tutor.
Google does not publish a full architecture diagram of Drive, so some of the above is reasoned from general principles and labeled as such. What is public is the substrate. File bytes live in Colossus, Google's cluster-level successor to GFS, which stores its own file metadata in Bigtable and uses curators for the control plane, D file servers for data, and custodians for background durability work like re-replication and RAID reconstruction. Colossus scales to exabytes across tens of thousands of machines per cluster and underpins Cloud Storage, YouTube, Gmail, and Drive alike. The developer-facing sync mechanics are documented directly in the Drive API: the changes feed with getStartPageToken, changes.list, and changes.watch, and the resumable upload protocol with its 256 KB chunk requirement. For transactional, globally consistent product metadata Google has Spanner, and for large flat keyspaces it has Bigtable, which is the lineage behind the metadata plane described here. Where I describe chunk sizes, dedup scoping, or conflict handling as specific numbers or policies, treat those as common design choices rather than confirmed internal details of Drive.
Sources
If any of these topics are fuzzy, the interviewer will catch it. Each lesson is 15 to 60 minutes with diagrams, code, and a quiz.
Data Deduplication
advanced / consistency models
Block Storage
intermediate / database types storage
Object Storage
intermediate / database types storage
Conflict Resolution
advanced / consistency models
Versioned Data
foundation / database fundamentals
Data Synchronization
intermediate / data replication distribution
Sync Mechanisms
intermediate / web content delivery
Blob Storage
intermediate / database types storage
interview readiness
Three questions from this guide. Answer them without scrolling up, the way you would have to in the room.
Pay by UPI, cards or netbanking through Razorpay. Pay by card or PayPal, in US dollars. Download at once from My packs.
NEWSystem Design Hands-On
Postgres Sharding: Complete Hands-On (PgBouncer + Citus). 2 h 36 min and 20 chapters: one PostgreSQL loaded until it breaks, then four shards behind a router you write, PgBouncer and Citus, with the 139-page slide deck. The first 15 minutes are free to watch.
Free PDF · 79 pages
25 real tech interview questions, answered in full
Five from each of our AI, GenAI, Inference, Maths for ML and Forward Deployed packs. Each with a diagram and a model answer. Free by email.
free tool
Check these numbers yourself
Put in your own guesses for Google Drive and see requests per second, storage, bandwidth and servers, with every sum written out.
Open the Capacity EstimatorIt is really nice and good Please join the course