Practice
1. In a Raft consensus system, at Step 4, the Leader sends AppendEntries RPCs to followers. What happens if a follower's log is inconsistent at this step?
easy
Solution
Step 1: Understand Raft's log replication mechanism
If a follower's log is inconsistent with the leader's, it rejects the AppendEntries RPC to signal a mismatch.Step 2: Leader's response to rejection
The leader decrements the nextIndex for that follower and retries AppendEntries until logs match.Final Answer:
Option B -> Option BQuick Check:
Follower rejects inconsistent logs -> leader retries with decremented nextIndex [check]
Hint: Follower rejects mismatched logs; leader retries with lower index [check]
Common Mistakes:
2. In the CI/CD pipeline request flow, at Step 5 the Deployment Worker receives a build artifact reference and triggers deployment. What happens if the artifact is missing from the artifact registry at this step?
easy
Solution
Step 1: Trace Deployment Worker behavior on missing artifact
The Deployment Worker validates artifact presence before deployment; missing artifact causes failure.Step 2: Check fallback behaviors
Retrying indefinitely would block pipeline; proceeding silently risks inconsistency; automatic rollback is triggered only after failed deployment, not missing artifact.Final Answer:
Option C -> Option CQuick Check:
Deployment Worker fails and reports error on missing artifact [check]
Hint: Missing artifact -> deployment fails, no silent fallback [check]
Common Mistakes:
3. In the request flow of a key-value store, at Step 4 the Gossip Protocol component receives a heartbeat from a node. What state does it update for that node?
easy
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]
Hint: Heartbeat refreshes node's alive timestamp in gossip membership [OK]
Common Mistakes:
4. A critical database cluster must failover automatically without data loss or downtime during a primary node crash. Which component is responsible for orchestrating this failover in a distributed SQL database system?
easy
Solution
Step 1: Identify failover orchestration component
The consensus protocol like Raft manages leader election and ensures log replication consistency, enabling automatic failover without data loss.Step 2: Eliminate other options
Client-side retries (A) handle reconnection but don't orchestrate failover; load balancers (B) redirect traffic but don't manage state; backups (D) aid recovery but not live failover.Final Answer:
Option A -> Option AQuick Check:
Consensus protocol controls leader election and failover [check]
Hint: Consensus protocols manage failover, not clients or load balancers
Common Mistakes:
5. For the Explore page, you must recommend trending photos to users with low latency and high freshness. Which architecture best fits this constraint?
medium
Solution
Step 1: Analyze freshness and latency requirements
Trending photos must be updated with low latency and high freshness, ruling out long batch intervals.Step 2: Evaluate architectures
Batch jobs every 6 hours (A) are too stale. Client polling (C) adds load and latency. CDN cache invalidation (D) is coarse-grained and slow. Streaming pipeline (B) updates trending scores in real-time and stores in fast KV store, meeting freshness and latency.Final Answer:
Option D -> Option DQuick Check:
Streaming pipeline enables real-time trending updates [check]
Hint: Real-time streaming pipelines enable fresh trending data [check]
Common Mistakes:
