Practice
Solution
Step 1: Identify nested data fetching needs
REST typically requires multiple calls or over-fetching to get nested data, causing inefficiency.Step 2: Recognize GraphQL's single query nested fetch
GraphQL allows clients to specify nested fields in one request, reducing round-trips and over-fetching.Final Answer:
Option A -> Option AQuick Check:
GraphQL single query fetches nested data efficiently [check]
Solution
Step 1: Analyze mobile client constraints
Mobile clients often have intermittent connectivity and limited support for persistent streaming (gRPC streaming in Use gRPC streaming for real-time message delivery to mobile clients is unreliable on mobile). WebSockets without offline caching (Use WebSockets with server push and no offline caching) fail offline support. Polling (Use polling every few seconds to fetch new messages) adds latency and battery drain.Step 2: Evaluate REST with local storage
REST APIs combined with client-side local storage and background sync enable offline message access and eventual consistency with low latency.Final Answer:
Option C -> Option CQuick Check:
REST + local storage -> offline support and sync [check]
Solution
Step 1: Understand Kafka topic role
Kafka topic buffers and streams driver location updates to downstream services.Step 2: Trace failure impact
Deleting the topic causes producer writes to fail silently or drop messages; no automatic backup switch; driver apps continue sending but updates are lost; matching service receives stale data but does not block.Final Answer:
Option A -> Option AQuick Check:
Kafka topic deletion causes permanent loss of location updates [check]
Solution
Step 1: Analyze storage node scaling
At 10x write throughput, disk I/O bandwidth and latency become the bottleneck before metadata or gossip overhead.Step 2: Compare other components
Gossip overhead grows but can be optimized; vector clocks metadata grows slowly; consistent hashing ring updates are incremental.Final Answer:
Option D -> Option DQuick Check:
Disk I/O limits storage node write throughput at large scale [check]
Solution
Step 1: Analyze bottlenecks at 10x query scale
Shard nodes perform CPU-intensive inverted index lookups; query volume increase causes CPU saturation first.Step 2: Compare other components
Query Coordinator merges are parallelizable; cache evictions increase but cache can be scaled; indexing pipeline is async and can be scaled horizontally.Final Answer:
Option D -> Option DQuick Check:
Shard nodes CPU-bound -> first failure point at scale [check]
