Practice
Solution
Step 1: Evaluate persistent connection options
gRPC streaming is efficient but less supported on mobile platforms and can drain battery.Step 2: Compare WebSocket and polling
WebSocket supports bidirectional communication with reconnection and heartbeats, balancing real-time and battery use better than polling.Final Answer:
Option A -> Option AQuick Check:
WebSocket balances real-time updates and mobile constraints [check]
Solution
Step 1: Understand rename operation atomicity
Rename involves updating metadata entries; if crash occurs mid-update, partial state may persist.Step 2: Trace failure effect
Partial metadata update can cause both old and new filenames to appear, confusing clients.Final Answer:
Option D -> Option DQuick Check:
Partial metadata updates cause duplicate filenames visible to client [check]
Solution
Step 1: Analyze latency vs throughput needs
Batch processing adds latency but can increase throughput and tolerate some message loss.Step 2: Evaluate architectures
Synchronous (A) increases latency; asynchronous queue (B) reduces latency but may cause duplicates; distributed cache (D) lacks delivery guarantees; batch (C) balances throughput with acceptable latency for some use cases.Final Answer:
Option A -> Option AQuick Check:
Batching trades latency for throughput, tolerating some loss [check]
Solution
Step 1: Analyze stateful connection bottleneck
WebSocket servers hold persistent TCP connections consuming memory and CPU; scaling requires sharding connections.Step 2: Compare other components
Kafka scales by adding partitions; geo-indexing scales with sharding; relational DB is less critical for real-time writes.Final Answer:
Option D -> Option DQuick Check:
WebSocket servers hit stateful connection limits first at scale [check]
Solution
Step 1: Identify storage node bottlenecks at high write volume
Disk I/O can saturate under 10x writes, limiting storage node throughput.Step 2: Compare other components' scalability
Session management can shard state; load balancers and network switches scale with hardware upgrades.Final Answer:
Option C -> Option CQuick Check:
Disk I/O saturation -> storage node bottleneck at 10x scale [check]
