Practice
1. A customer support bot must handle 10,000 concurrent user queries with minimal latency and ensure fallback to human agents when intent classification confidence is low. Which component is best suited to manage the fallback routing reliably?
easy
Solution
Step 1: Identify fallback routing requirements
The fallback must be reliable and decoupled from real-time intent classification to avoid blocking user queries.Step 2: Evaluate component suitability
A message queue decouples processing, enabling asynchronous fallback handling and retry mechanisms. Relational DB synchronous writes (A) cause latency. REST API direct calls (C) block the main flow. In-memory cache (D) lacks durability and reliability.Final Answer:
Option D -> Option DQuick Check:
Message queue decouples and buffers fallback reliably [check]
Hint: Decouple fallback with queues for async reliability [check]
Common Mistakes:
2. In the message delivery trace, at Step 4 the Delivery Worker checks Bob's presence TTL in the presence service cache. What happens if Bob's presence TTL has expired at this step?
easy
Solution
Step 1: Trace Delivery Worker decision at Step 4 -- Bob's presence TTL
If Bob's presence TTL expired, the system treats Bob as offline but still attempts delivery to his last known server to avoid message loss.Step 2: Eliminate other options
Immediate delivery marking is incorrect as message may not be delivered; queuing for offline storage happens later; indefinite retries cause blocking; forwarding to last known server is the fallback.Final Answer:
Option C -> Option CQuick Check:
Delivery Worker forwards to last known server if presence expired [check]
Hint: Expired presence TTL -> fallback to last known server delivery [check]
Common Mistakes:
3. A search system must handle millions of write requests per second while ensuring high availability and fault tolerance. Which Elasticsearch component primarily manages data distribution and fault tolerance across nodes?
easy
Solution
Step 1: Identify the role of shards
Shards partition the index data and replicate it to provide fault tolerance and distribute write load.Step 2: Eliminate other components
Ingest nodes preprocess data but don't manage distribution; coordinating nodes route queries but don't store data; master nodes manage cluster metadata but don't handle data distribution.Final Answer:
Option B -> Option BQuick Check:
Shards partition and replicate data for fault tolerance [check]
Hint: Shards split and replicate data for fault tolerance [check]
Common Mistakes:
4. A web service receives highly variable traffic with some clients opening many simultaneous connections, while others open few. Which load balancing algorithm best distributes load evenly across servers?
easy
Solution
Step 1: Understand traffic variability
Clients open varying numbers of connections, so servers can become unevenly loaded if requests are assigned blindly.Step 2: Evaluate load balancing algorithms
Round Robin ignores current load, IP Hash pins clients to servers (may cause imbalance), Weighted Round Robin uses static weights ignoring dynamic load. Least Connections dynamically balances based on active connections.Final Answer:
Option D -> Option DQuick Check:
Least Connections adapts to real-time load, balancing uneven client connections [check]
Hint: Least Connections adapts to active load, not just request count [check]
Common Mistakes:
5. If the Market Data Feed component crashes and stops publishing updates, what is the exact failure observed by external clients subscribing to real-time stock prices?
medium
Solution
Step 1: Understand Market Data Feed failure impact
When Market Data Feed crashes, it stops pushing updates; clients detect connection loss and receive error events triggering reconnection.Step 2: Eliminate other options
Clients receive stale prices indefinitely with no indication of failure is wrong because clients detect connection loss; Clients receive partial updates but with delayed timestamps causing confusion is wrong because partial updates don't occur without feed; Clients continue receiving cached data from the Matching Engine without updates is wrong because Matching Engine doesn't serve cached market data.Final Answer:
Option C -> Option CQuick Check:
Feed crash -> clients get error + reconnect attempts [check]
Hint: Feed crash triggers client error and reconnect [check]
Common Mistakes:
