Practice
Solution
Step 1: Evaluate latency and scaling constraints
Centralized service (Centralized shard mapping service queried synchronously on every request) adds latency and single point of failure; client-side static mapping (Client-side static shard mapping with manual updates on shard changes) is inflexible and error-prone; range partitioning (Range-based partitioning with a global metadata service for shard boundaries) struggles with hotspots and dynamic scaling.Step 2: Assess distributed consistent hashing
Distributed consistent hashing with local replicas (Distributed consistent hashing with local hash ring replicas updated asynchronously) provides low-latency shard lookup and supports dynamic shard scaling with minimal coordination.Final Answer:
Option A -> Option AQuick Check:
Local hash ring replicas enable fast, scalable shard lookup [check]
Solution
Step 1: Trace deployment behavior on artifact registry unavailability
Deployment cannot validate or fetch artifacts, so it aborts and triggers rollback to maintain safety.Step 2: Eliminate other failure modes
Proceeding with cached or skipping validation risks corrupted deployments; blocking indefinitely causes pipeline stalls but rollback is preferred.Final Answer:
Option B -> Option BQuick Check:
Unavailable registry -> deployment aborts and triggers rollback [check]
Solution
Step 1: Understand Market Data Feed failure impact
When Market Data Feed crashes, it stops pushing updates; clients detect connection loss and receive error events triggering reconnection.Step 2: Eliminate other options
Clients receive stale prices indefinitely with no indication of failure is wrong because clients detect connection loss; Clients receive partial updates but with delayed timestamps causing confusion is wrong because partial updates don't occur without feed; Clients continue receiving cached data from the Matching Engine without updates is wrong because Matching Engine doesn't serve cached market data.Final Answer:
Option C -> Option CQuick Check:
Feed crash -> clients get error + reconnect attempts [check]
Solution
Step 1: Compare OT and CRDT for offline and distributed scenarios
OT typically requires a central server to order and transform operations, making offline support complex.Step 2: Understand CRDT advantages
CRDTs are designed for decentralized environments, allowing local operations to be merged eventually without coordination, ideal for offline edits and global distribution.Final Answer:
Option C -> Option CQuick Check:
CRDTs enable offline edits and eventual consistency without central coordination [check]
Solution
Step 1: Understand Geohash prefix role
Geohash prefix index buckets locations; without it, filtering by location is impossible.Step 2: Trace failure impact
Without the prefix index, the system cannot filter by location, so it returns all businesses (false positives), not incomplete results (false negatives).Final Answer:
Option D -> Option DQuick Check:
Missing Geohash prefix index causes unfiltered results (false positives) [check]
