Practice
Solution
Step 1: Analyze latency and conflict requirements
Low write latency requires asynchronous replication; conflict detection needs metadata like vector clocks.Step 2: Evaluate options
Synchronous replication (A) adds latency; single primary (C) violates multi-primary requirement; last-write-wins (D) ignores conflicts.Final Answer:
Option A -> Option AQuick Check:
Async replication + vector clocks -> low latency + conflict detection [check]
Solution
Step 1: Evaluate synchronous push and multicast
Centralized synchronous push (Use a centralized broker that pushes messages directly to all subscribers synchronously) causes bottlenecks and backpressure. Multicast (Use a multicast network protocol to broadcast messages to all subscribers) lacks reliability and fine-grained subscription control.Step 2: Assess polling and distributed log
Polling (Use a polling-based system where subscribers fetch messages periodically from a database) adds latency and load. Distributed log with partitions and consumer groups (Use a distributed log system with topic partitions and consumer groups for parallel consumption) supports scalable, parallel, and dynamic subscriptions with low latency.Final Answer:
Option D -> Option DQuick Check:
Distributed logs scale fan-out with parallel consumers [check]
Solution
Step 1: Identify statefulness in load balancing algorithms
Least Connections requires tracking active connections per server globally, needing frequent updates.Step 2: Analyze scaling impact
At 10x scale, the centralized connection tracker becomes a bottleneck due to synchronization overhead and contention.Step 3: Evaluate other components
IP Hash is stateless and fast; weighted lists update less frequently; Round Robin pointer is lightweight and easily sharded.Final Answer:
Option C -> Option CQuick Check:
Global connection tracking bottlenecks Least Connections at high scale [check]
Solution
Step 1: Analyze API Gateway resource usage
API Gateway maintains in-memory counters per user/request, which grow linearly with traffic, exhausting memory and CPU first.Step 2: Compare other components
Databases can be sharded and scaled; service caches sync asynchronously; load balancers handle connection churn better than API Gateway resource limits.Final Answer:
Option A -> Option AQuick Check:
API Gateway memory/CPU bottleneck at 10x scale [check]
Solution
Step 1: Identify system components at scale
Rendezvous Hashing is decentralized, so no central coordinator (The central coordinator fails due to increased coordination overhead) exists. Nodes do not broadcast state to all others (The network bandwidth saturates because all nodes broadcast state to each other) in typical implementations.Step 2: Analyze client-side routing impact
Clients must compute scores for all nodes to pick highest; at 10x scale, this computation and memory for node lists become bottlenecks.Step 3: Consider hash computation cost
Hash computations (The hash function computation becomes a CPU bottleneck due to increased node and key counts) are lightweight compared to maintaining large node lists and score computations.Final Answer:
Option A -> Option AQuick Check:
Client routing logic scales poorly with node list size -> bottleneck [check]
