Practice
1. For storing large blobs with frequent read access and occasional updates, which storage architecture is best suited to optimize cost and performance in this blob store design?
medium
Solution
Step 1: Analyze chunked storage with immutable chunks
This approach enables efficient caching, deduplication, and cheap versioning by reusing unchanged chunks.Step 2: Eliminate other options
Key-value stores struggle with large blobs and synchronous replication adds latency; network file systems have locking bottlenecks; relational DBs are inefficient for large binary data.Final Answer:
Option C -> Option CQuick Check:
Chunked immutable storage optimizes cost and versioning [check]
Hint: Immutable chunking enables cheap versioning and caching [check]
Common Mistakes:
2. If the Kafka cluster used for buffering document update events becomes unavailable, what is the immediate failure mode in the full-text search indexing pipeline?
medium
Solution
Step 1: Understand Kafka unavailability impact
Without Kafka, ingestion of new document updates cannot proceed, causing blocking or stalling.Step 2: Evaluate options
Indexing workers do not have local caches of events (A) and cannot continue processing. Automatic failover to a backup queue with identical ordering (C) is a designed mitigation. Index corruption (D) does not happen immediately; missing events cause stale results but not corruption.Final Answer:
Option A -> Option AQuick Check:
Failover to backup queue prevents pipeline stall [check]
Hint: Kafka outage stalls ingestion unless backup queue with ordering [check]
Common Mistakes:
3. For a system requiring cost optimization with infrequent data access but occasional retrieval within hours, which storage architecture is preferable?
medium
Solution
Step 1: Analyze access and cost requirements
Data is infrequently accessed but needs retrieval within hours, so cold storage alone is too slow.Step 2: Evaluate tiering benefits
Warm storage offers moderate cost and latency; cold storage reduces cost further. Tiering balances cost and retrieval time.Final Answer:
Option A -> Option AQuick Check:
Warm + cold tiering balances cost and retrieval latency [check]
Hint: Warm + cold tiering balances cost and latency [check]
Common Mistakes:
4. If Zookeeper's session timeout mechanism fails to detect a crashed leader node promptly, what is the most likely failure observed in the leader election process?
medium
Solution
Step 1: Understand session timeout role
Session timeout detects leader failure by ephemeral node removal.Step 2: Failure of timeout detection
If timeout fails, ephemeral node remains, so followers do not start election; no split-brain occurs.Final Answer:
Option B -> Option BQuick Check:
Backup election mechanisms prevent split-brain despite timeout failure [check]
Hint: Session timeout failure -> ephemeral node stays -> no immediate election [check]
Common Mistakes:
5. At 10x traffic scale during a flash sale, which component is most likely to fail first and why?
hard
Solution
Step 1: Identify stateful components under load
API Gateway maintains user session state (e.g., WebSocket connections), which are sticky and stateful, limiting horizontal scaling.Step 2: Compare other components
Relational DB (A) can be sharded; cache (C) TTL floods are mitigated by pre-warming; inventory locking (D) is optimized with partitioning. API Gateway statefulness causes connection limits and bottlenecks first.Final Answer:
Option B -> Option BQuick Check:
API Gateway stateful sessions limit horizontal scaling [check]
Hint: Stateful API Gateway limits scaling under 10x load [check]
Common Mistakes:
