Practice
Solution
Step 1: Understand heartbeat role
Heartbeat timeout signals active node failure, triggering failover.Step 2: Passive node failover action
Passive node must promote itself to active to maintain availability and accept traffic.Final Answer:
Option B -> Option BQuick Check:
Heartbeat timeout -> passive promotes to active [check]
Solution
Step 1: Identify token streaming requirements
Token streaming demands low latency and ordered delivery with backpressure to avoid overwhelming clients.Step 2: Evaluate component suitability
Relational DBs (A) add latency and locking overhead; distributed file systems (C) are too slow for real-time streaming; batch processing (D) adds unacceptable delay. Redis Streams (B) supports in-memory buffering with backpressure and ordered delivery.Final Answer:
Option C -> Option CQuick Check:
Redis Streams supports ordered, low-latency token streaming with backpressure [check]
Solution
Step 1: Understand Redis unavailability impact
Without Redis, the centralized counter is unreachable, so rate limiting cannot be enforced.Step 2: Check fallback behavior
Most implementations allow requests to proceed without rate limiting to avoid blocking, risking overload.Final Answer:
Option A -> Option AQuick Check:
Redis down -> no rate limiting -> requests allowed unchecked [check]
Solution
Step 1: Identify component capabilities
Load Balancers typically operate at transport layer and may support SSL termination but lack detailed HTTP header manipulation; API Gateways add overhead and are less optimized for raw throughput; DNS load balancing does not handle SSL termination.Step 2: Match requirement to component
Reverse Proxy operates at HTTP layer, supports SSL termination and header manipulation efficiently, suitable for high throughput.Final Answer:
Option A -> Option AQuick Check:
Reverse Proxy = HTTP layer control + SSL termination [check]
Solution
Step 1: Identify bottlenecks in server-side discovery
API Gateway queries registry per request without caching, causing query amplification at scale.Step 2: Compare other components
Registry is centralized but can be scaled with sharding; microservices scale horizontally; load balancers handle instance scaling better than API Gateway query load.Final Answer:
Option C -> Option CQuick Check:
API Gateway query volume grows linearly causing first failure [check]
