Practice
Solution
Step 1: Understand parallelism vs ordering
Using multiple consumer groups increases parallelism but does not guarantee ordering per session.Step 2: Identify ordering guarantee
Partitioning messages by user session key ensures ordering within partitions.Final Answer:
Option C -> Option CQuick Check:
Multiple consumer groups increase throughput but ordering per session requires partitioning [check]
Solution
Step 1: Evaluate exact counts vs approximation
Exact counts require large memory and high latency for heavy skew data streams.Step 2: Recognize Count-Min Sketch with conservative update
Conservative update reduces overestimation bias, improving accuracy for skewed data.Step 3: Eliminate Bloom filter and HyperLogLog
Bloom filters don't count frequencies; HyperLogLog estimates cardinality, not frequency.Final Answer:
Option A -> Option AQuick Check:
Conservative update Count-Min Sketch balances accuracy and memory for skewed streams [check]
Solution
Step 1: Analyze consistency and latency needs
Strict per-user limits require consistent counters with low latency.Step 2: Evaluate architectures
Centralized Redis (A) is a bottleneck; client-side counters (C) are eventually consistent and unreliable; distributed SQL (D) has high latency. Sharded Redis with consistent hashing (B) balances load and maintains per-user consistency.Final Answer:
Option C -> Option CQuick Check:
Sharded Redis cluster scales with consistent hashing per user [check]
Solution
Step 1: Understand health monitor role
The health monitor informs GSLB which data centers are healthy; without it, GSLB cannot avoid unhealthy endpoints.Step 2: Analyze failure impact
Without health info, GSLB routes users to unhealthy data centers causing failures (Users are routed to unhealthy data centers causing request failures or timeouts). Increased latency (Users experience increased latency due to rerouting through backup data centers) or DNS failures (DNS queries fail to resolve, causing complete service outage) are indirect or unlikely. Even traffic distribution (Traffic is evenly distributed regardless of data center health, causing overload) ignores health but is less precise than routing to unhealthy nodes.Final Answer:
Option A -> Option AQuick Check:
Silent health monitor failure -> routing to unhealthy data centers [check]
Solution
Step 1: Identify scaling challenges
Rate limiting often relies on centralized counters or stores (e.g., Redis) that become contention points under high request rates.Step 2: Eliminate other options
Backend microservices, because they cannot horizontally scale as easily as the gateway is incorrect as backend services typically scale horizontally. API Gateway routing logic, because routing tables grow exponentially with services is unlikely as routing tables are cached and optimized. Authentication service, because token validation is CPU-intensive and stateful is less likely as token validation is stateless and can be cached.Final Answer:
Option A -> Option AQuick Check:
Centralized rate limiting store bottlenecks first at scale [check]
