Practice
1. In a file storage system, at step 3 the client requests a file write. What happens inside the metadata server at this step?
easy
Solution
Step 1: Understand metadata server role in file write
The metadata server manages file metadata like inodes and directory entries, not the actual data blocks.Step 2: Trace what happens at step 3
On a write request, the metadata server updates the inode and directory metadata to reflect changes; data blocks are handled separately by storage nodes.Final Answer:
Option C -> Option CQuick Check:
Metadata server updates inode, not data blocks [check]
Hint: Metadata server updates metadata, not file data blocks [check]
Common Mistakes:
2. In the URL shortener system, at step 5 the Redirect Service receives a short code and queries the Cache before the Database. What happens if the Cache lookup misses at this step?
easy
Solution
Step 1: Trace Redirect Service behavior at Cache miss
Cache miss means the short code is not in memory; the service must fetch the original URL from persistent storage.Step 2: Confirm Cache update after DB fetch
After retrieving from DB, the service updates the Cache to speed up future requests.Final Answer:
Option B -> Option BQuick Check:
Cache miss triggers DB lookup and Cache update [check]
Hint: Cache miss -> DB lookup -> Cache update [check]
Common Mistakes:
3. A location-based service must efficiently index millions of businesses worldwide to support fast nearby searches within a 5km radius. Which component is best suited to handle spatial indexing for this use case?
easy
Solution
Step 1: Identify spatial indexing needs
Relational DBs with lat/lon indexes (Use a relational database with latitude and longitude columns and perform range queries with indexes) do not scale well for large radius queries and millions of points due to expensive range scans.Step 2: Evaluate Geohash suitability
Geohash (Use a Geohash-based spatial index to bucket locations into hierarchical grids) encodes locations into hierarchical grids enabling efficient prefix queries for nearby searches, making it ideal for large-scale spatial indexing.Final Answer:
Option B -> Option BQuick Check:
Geohash buckets locations into grids for fast proximity queries [check]
Hint: Geohash buckets locations hierarchically for fast spatial queries [OK]
Common Mistakes:
4. If the Key Management Service (KMS) becomes unavailable, what exactly breaks in the system's encryption-at-rest workflow?
medium
Solution
Step 1: Understand KMS role in key lifecycle
KMS generates and manages encryption keys; if unavailable, new keys can't be created but existing keys cached locally allow decryption.Step 2: Eliminate incorrect failure modes
Encryption doesn't stop immediately; decryption continues with cached keys; system does not fallback to unencrypted storage automatically.Final Answer:
Option A -> Option AQuick Check:
KMS outage blocks new key generation, existing keys still usable [check]
Hint: KMS down -> no new keys, existing keys still decrypt [check]
Common Mistakes:
5. At 10x scale, which component in a distributed file system is most likely to become the bottleneck first, and why?
hard
Solution
Step 1: Identify stateful bottlenecks
Metadata Servers maintain global namespace state, which is difficult to shard and scale linearly.Step 2: Compare other components
Data Nodes scale horizontally better; network and client caches are less immediate bottlenecks at metadata scale.Final Answer:
Option A -> Option AQuick Check:
Metadata Servers' statefulness limits scaling first [check]
Hint: Metadata Servers' global state limits scaling first [check]
Common Mistakes:
