Practice
Solution
Step 1: Identify the role of consistent hashing
Consistent hashing distributes keys to nodes such that when nodes join or leave, only a small subset of keys need reassignment, minimizing reshuffling.Step 2: Eliminate other components
Vector clocks handle version conflicts but do not distribute keys. Gossip protocol manages cluster membership but not key distribution. Quorum replication ensures durability but does not affect key assignment.Final Answer:
Option C -> Option CQuick Check:
Consistent hashing minimizes key remapping on node changes [check]
Solution
Step 1: Trace request router behavior at Step 4
The router uses the key's hash to find the closest virtual node clockwise on the ring.Step 2: Map virtual node to physical node
Each virtual node maps to a physical node; the router routes the request accordingly.Final Answer:
Option A -> Option AQuick Check:
Consistent hashing uses clockwise virtual node lookup to find physical node [check]
Solution
Step 1: Role of manifest updates in HLS
Manifest updates inform clients about new segments and available bitrates, enabling selective fetching.Step 2: Consequence of missing manifest updates
Without updates, clients cannot know which segments to fetch next, leading them to request all variants to avoid stalls, wasting bandwidth.Final Answer:
Option A -> Option AQuick Check:
Missing manifest updates cause clients to fetch all variants, wasting bandwidth [check]
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: Analyze latency and accuracy trade-offs
Synchronous updates (Synchronous billing updates on every tenant API call to the billing database) add latency; polling (Periodic polling of tenant usage logs by the billing service every hour) delays billing data; in-memory counters (Embedding billing logic directly in the tenant service to update counters in-memory) risk data loss.Step 2: Evaluate asynchronous event-driven approach
Asynchronous event-driven usage aggregation via a message queue and batch processing decouples billing from tenant requests, ensuring accurate aggregation with minimal latency impact.Final Answer:
Option A -> Option AQuick Check:
Event-driven async billing -> accurate, low-latency tenant requests [check]
