Practice
1. A public API needs to support multiple client versions simultaneously without breaking existing integrations. Which versioning strategy best isolates client requests to avoid accidental breaking changes?
easy
Solution
Step 1: Identify version isolation requirements
Embedding version in the URL path clearly separates client requests by version, preventing accidental routing to incompatible handlers.Step 2: Evaluate alternatives
Custom headers and content negotiation can be ignored or mishandled by intermediaries or caches, risking breaking changes. Query parameters are less explicit and can cause caching issues.Final Answer:
Option C -> Option CQuick Check:
URL versioning cleanly isolates versions in routing paths [check]
Hint: URL path versioning isolates clients cleanly [check]
Common Mistakes:
2. A system must handle millions of short video uploads per day, ensuring fast ingestion and metadata extraction without blocking the user. Which component is best suited to decouple upload ingestion from processing?
easy
Solution
Step 1: Identify ingestion decoupling need
Relational DB (A) blocks user upload due to synchronous writes; CDN (C) caches for delivery, not ingestion; REST API (D) triggers blocking transcoding.Step 2: Choose buffering component
Kafka (B) buffers uploads asynchronously, enabling fast user response and reliable processing.Final Answer:
Option A -> Option AQuick Check:
Kafka buffers uploads asynchronously for scalable ingestion [check]
Hint: Buffer uploads asynchronously with Kafka queue [OK]
Common Mistakes:
3. For a high-throughput system requiring SSL termination and HTTP header manipulation, which architecture is more appropriate and why?
medium
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]
Hint: Reverse Proxy = SSL termination + HTTP header control [check]
Common Mistakes:
4. At 10x scale, which component is most likely to fail first due to caching, and why?
medium
Solution
Step 1: Identify scaling impact on cache
At 10x scale, cache memory pressure increases due to more data and entries.Step 2: Evaluate failure likelihood
Cache memory exhaustion is common before DB or network fail due to caching.Final Answer:
Option C -> Option CQuick Check:
Cache memory limits cause failure first at scale [check]
Hint: Cache memory exhaustion causes failure first at scale [check]
Common Mistakes:
5. If the load balancer's health check component is removed, what exact failure occurs when a backend server crashes unexpectedly?
medium
Solution
Step 1: Understand health check role
The health check component detects backend server crashes and informs the load balancer to stop routing traffic to failed servers.Step 2: Trace failure without health checks
Without health checks, the load balancer is unaware of backend crashes and continues routing requests to the failed server, causing client requests to hang or timeout (The load balancer continues sending requests to the crashed backend, causing client timeouts).Step 3: Eliminate other options
The load balancer immediately detects the crash and reroutes traffic seamlessly is false because detection is missing. The backend server automatically restarts and recovers without affecting traffic is unrelated to load balancer behavior. Clients receive error responses directly from the crashed backend server is incorrect because crashed servers cannot respond.Final Answer:
Option A -> Option AQuick Check:
No health checks -> load balancer sends requests to crashed backend causing timeouts [check]
Hint: No health checks -> requests sent to dead servers cause timeouts [check]
Common Mistakes:
