Practice
Solution
Step 1: Identify failure isolation mechanism
Asynchronous message queues decouple services, buffering requests and preventing direct cascading failures during outages.Step 2: Evaluate alternatives
Synchronous REST calls (A) cause blocking and cascading failures; monolithic DB (C) is a single point of failure; direct TCP (D) lacks buffering and backpressure.Final Answer:
Option C -> Option CQuick Check:
Async queues buffer and isolate failures, limiting blast radius [check]
Solution
Step 1: Understand Gossip Protocol heartbeat handling
Gossip updates the membership list by refreshing the last alive timestamp for the node sending the heartbeat.Step 2: Eliminate incorrect states
Marking node as failed contradicts receiving heartbeat. Vector clocks are unrelated to node liveness. Consistent hashing ring changes only on node join/leave, not heartbeat.Final Answer:
Option A -> Option AQuick Check:
Heartbeat updates node's alive timestamp in gossip membership [check]
Solution
Step 1: Identify write throughput handling
Relational DBs (A) and synchronous NoSQL writes (C) block on writes, limiting throughput. Redis (D) lacks durability guarantees for primary storage.Step 2: Recognize Kafka's role
Kafka buffers high write volume asynchronously, decoupling writes from reads and enabling eventual consistency.Final Answer:
Option A -> Option AQuick Check:
Kafka buffers writes asynchronously -> high throughput, eventual consistency [check]
Solution
Step 1: Understand Redis persistence modes and crash impact
Without RDB or AOF persistence, Redis stores data only in memory; crash causes total data loss.Step 2: Trace failure impact on cache and database load
Cache data loss leads to cache misses, increasing load on the primary database until cache is warmed again.Final Answer:
Option B -> Option BQuick Check:
Redis without persistence -> data lost on crash -> cache misses spike [check]
Solution
Step 1: Identify bucket pattern scaling challenges
Bucket pattern creates many bucket documents requiring precise routing by mongos.Step 2: Mongos metadata overhead
Mongos maintains routing metadata and must route each write to correct shard and bucket, increasing load at scale.Step 3: Compare other components
Shard servers handle writes but document splits are less frequent; network saturates later; app server bottleneck unlikely.Final Answer:
Option B -> Option BQuick Check:
Mongos routing metadata load grows fastest at 10x scale [check]
