Practice
Solution
Step 1: Trace the atomic INCR operation
At Step 3, the Redis INCR command increments the counter regardless of limit.Step 2: Check limit enforcement logic
If the incremented counter exceeds the limit, the request is rejected but the counter remains incremented to reflect the attempt.Final Answer:
Option B -> Option BQuick Check:
Counter increments atomically; request rejected if limit exceeded [check]
Solution
Step 1: Analyze latency and volume constraints
High-volume streams require low-latency detection to be actionable.Step 2: Match architecture to constraints
Streaming anomaly detection with windowed models processes data continuously, enabling near real-time alerts, unlike batch or polling which add latency.Final Answer:
Option C -> Option CQuick Check:
Streaming windowed models -> low latency anomaly detection [check]
Solution
Step 1: Identify scaling bottleneck
Consumers handle message processing and scale with load.Step 2: Assess component impact
At 10x scale, consumers need to scale out to handle increased throughput.Final Answer:
Option B -> Option BQuick Check:
Consumers scale with load; brokers and producers less impacted [check]
Solution
Step 1: Identify bottleneck in distributed updates
Centralized coordinator serializes updates to maintain consistency, limiting throughput.Step 2: Analyze other components
Network bandwidth and hash function speed scale better; sketch arrays have fixed size but don't overflow.Step 3: Understand scale impact
At 10x scale, coordinator becomes overwhelmed, causing update latency and failures.Final Answer:
Option D -> Option DQuick Check:
Central coordinator serialization bottlenecks updates at scale [check]
Solution
Step 1: Analyze stateful components at scale
Chat servers maintain stateful WebSocket connections bound to server memory; scaling requires connection migration which is complex.Step 2: Compare other components
Database (A) and brokers (B) can be scaled horizontally with sharding and replication; producers (D) can be scaled out by adding more instances.Final Answer:
Option C -> Option CQuick Check:
Stateful WebSocket servers bottleneck scaling due to connection affinity [check]
