Practice
Solution
Step 1: Identify the role of Edge CDN Nodes
Edge CDN nodes cache video segments near users to reduce latency and offload origin servers.Step 2: Eliminate other options
Origin servers handle storage but not low-latency delivery; load balancers distribute requests but don't cache content; databases store metadata, not video segments.Final Answer:
Option D -> Option DQuick Check:
Edge CDN caches segments closest to users for low latency [check]
Solution
Step 1: Identify index type for range queries
B-Tree indexes maintain sorted order of keys, enabling efficient range scans by traversing leaf nodes sequentially.Step 2: Eliminate other options
Hash indexes do not preserve order, so range queries require scanning all buckets. Composite indexes optimize multi-column equality but don't inherently improve single-column range scans. Bitmap indexes are efficient for low-cardinality columns, not large numeric ranges.Final Answer:
Option C -> Option CQuick Check:
B-Tree supports ordered traversal for range queries [check]
Solution
Step 1: Understand consistent hashing role
Consistent hashing minimizes key remapping when shards change.Step 2: Trace failure without consistent hashing
Adding a shard requires rehashing all keys, moving massive data, causing downtime and routing inconsistencies.Final Answer:
Option D -> Option DQuick Check:
Without consistent hashing, shard addition triggers full rehash and data move [check]
Solution
Step 1: Compare update latency and query freshness trade-offs
Batch rebuilds have high latency; synchronous writes hurt write throughput; static monthly refresh is too stale.Step 2: Identify near-real-time indexing benefits
Streaming updates asynchronously balances freshness and throughput, allowing queries to see recent changes with low delay.Final Answer:
Option A -> Option AQuick Check:
Near-real-time streaming -> balanced freshness and update latency [check]
Solution
Step 1: Evaluate Redis SETNX under high contention
Redis SETNX with TTL (A) is fast but can cause split-brain and stale locks under network partitions, violating correctness.Step 2: Consider consensus-based lock service
Consensus-based services like etcd (B) provide strong consistency and fault tolerance, ensuring correctness even if latency is higher.Step 3: Assess database row locks and local locks
Database locks (C) have high latency and risk deadlocks; local locks (D) do not coordinate across nodes, failing correctness.Final Answer:
Option B -> Option BQuick Check:
Consensus ensures correctness under contention despite latency [check]
