Practice
Solution
Step 1: Role of event ingestion pipeline
This pipeline persists raw metric data for downstream alerting components.Step 2: Consequence of pipeline failure
Without persistence, threshold and anomaly detectors get incomplete or missing data, leading to missed alerts or false positives.Final Answer:
Option A -> Option AQuick Check:
Missing data -> detectors miss or misfire alerts [check]
Solution
Step 1: Analyze push vs pull for dynamic content freshness
Push model can overload origin with frequent updates; polling adds unnecessary load.Step 2: Evaluate pull with TTL caching
Pull with TTL balances freshness and origin load by caching briefly and refreshing on expiry.Final Answer:
Option A -> Option AQuick Check:
Pull with TTL caching balances freshness and origin load [check]
Solution
Step 1: Evaluate persistent connection approaches
gRPC streaming (A) is unreliable on mobile due to network changes and battery constraints; long polling (C) wastes battery and bandwidth.Step 2: Consider platform push services and SMS
Push services (B) handle retries and offline buffering efficiently; SMS (D) is costly and not suitable for all notifications.Final Answer:
Option A -> Option AQuick Check:
Platform push services manage retries and offline buffering [check]
Solution
Step 1: Analyze memory constraints and burst tolerance
Sliding window counters require storing timestamps, which grows with request volume, unsuitable for strict memory limits.Step 2: Fixed window counters use constant memory by counting requests per fixed interval, allowing bursts at window edges but fitting memory constraints
Token and leaky buckets smooth bursts but require token state management and may not tolerate bursts as well.Final Answer:
Option D -> Option DQuick Check:
Fixed window uses constant memory, tolerates bursts, fits strict memory limits [check]
Solution
Step 1: Identify stateful components under load
API Gateway maintains user session state (e.g., WebSocket connections), which are sticky and stateful, limiting horizontal scaling.Step 2: Compare other components
Relational DB (A) can be sharded; cache (C) TTL floods are mitigated by pre-warming; inventory locking (D) is optimized with partitioning. API Gateway statefulness causes connection limits and bottlenecks first.Final Answer:
Option B -> Option BQuick Check:
API Gateway stateful sessions limit horizontal scaling [check]
