Practice
Solution
Step 1: Trace coordinator behavior at Step 4
The coordinator detects conflicting writes from partitions and cannot commit both safely.Step 2: Understand conflict resolution
It marks writes as conflicting and delays commit until partitions heal to avoid inconsistency.Final Answer:
Option A -> Option AQuick Check:
Coordinator defers conflicting writes until partition resolution [check]
Solution
Step 1: Understand consistency requirements
Strong consistency requires writes to be serialized and acknowledged before success.Step 2: Evaluate replication patterns
Primary-replica with synchronous writes ensures all writes go through a single primary, preserving consistency. Multi-primary with async or eventual consistency cannot guarantee strong consistency.Final Answer:
Option D -> Option DQuick Check:
Primary sync writes -> strong consistency, tolerates partitions by blocking writes [check]
Solution
Step 1: Identify atomicity requirement
The system must atomically write business data and produce events without distributed transactions.Step 2: Evaluate Outbox Pattern
Outbox Pattern writes events in the same local DB transaction, then asynchronously relays them, ensuring no message loss.Final Answer:
Option B -> Option BQuick Check:
Outbox Pattern ensures atomic DB write + event emission [check]
Solution
Step 1: Identify health detection responsibility
The health check module actively probes backend servers to determine their health status.Step 2: Eliminate other options
DNS resolver changes are slow and indirect; session persistence caches track sessions, not health; client-side retries do not detect server health.Final Answer:
Option A -> Option AQuick Check:
Health check module probes servers directly for health [check]
Solution
Step 1: Analyze term distribution and query update needs
Skewed term distributions cause TF-IDF to overweight rare terms excessively; frequent updates require robust scoring.Step 2: Evaluate scoring methods
BM25 accounts for term frequency saturation and normalizes by document length, improving relevance in skewed data; TF-IDF and raw TF lack these refinements; vector space ignoring TF loses relevance signals.Final Answer:
Option C -> Option CQuick Check:
BM25 handles skew and length normalization better than TF-IDF [check]
