Practice
1. A mobile app requires tailored API responses per device type to reduce payload size and improve UX. Which component best handles this requirement in a microservices architecture?
easy
Solution
Step 1: Identify the role of BFF
The BFF layer acts as a tailored API gateway that adapts responses specifically for each client type, reducing payload and improving UX.Step 2: Eliminate other options
Use a shared database view that filters data per device type is incorrect because database views are not designed for client-specific adaptation and increase coupling. Let each microservice handle device-specific logic internally is wrong as microservices should remain generic and not handle client-specific logic. Use a CDN to cache different payloads per device type is incorrect because CDNs cache static content and cannot dynamically tailor API responses per device.Final Answer:
Option D -> Option DQuick Check:
BFF adapts APIs per client type for optimized payloads [check]
Hint: BFF adapts APIs per client type for optimized payloads [check]
Common Mistakes:
2. A web application needs to handle millions of concurrent users sending requests simultaneously. Which component is primarily responsible for managing client connections and distributing requests to backend services?
easy
Solution
Step 1: Identify the role of the load balancer
The load balancer manages client connections and distributes incoming requests evenly across backend servers to prevent overload.Step 2: Eliminate other components
The database server handles data storage but does not manage client connections; cache servers speed up data retrieval but don't handle connections; message queues buffer asynchronous tasks but don't manage live client connections.Final Answer:
Option B -> Option BQuick Check:
Load balancer routes client requests to backend servers [check]
Hint: Load balancer directs traffic, not stores or caches data [check]
Common Mistakes:
3. For a globally distributed key-value store requiring low write latency and strong consistency, which replication approach is best and why?
medium
Solution
Step 1: Evaluate latency and consistency trade-offs
Global synchronous quorum to all regions (A) causes high latency; asynchronous (B) sacrifices strong consistency.Step 2: Consider local quorum with global reconciliation
Local quorum writes reduce latency while global reconciliation maintains strong consistency.Final Answer:
Option D -> Option DQuick Check:
Local quorum + global reconciliation balances latency and consistency [check]
Hint: Local quorum writes reduce latency, global reconciliation ensures consistency [check]
Common Mistakes:
4. Without a clear action item tracking system after a post-mortem, what specific failure occurs in the incident resolution process?
medium
Solution
Step 1: Identify role of action item tracking
Tracking ensures follow-through on improvements, preventing recurrence and reducing blame.Step 2: Trace failure without tracking
Without tracking, accountability gaps appear, blame culture can worsen as no clear ownership exists.Final Answer:
Option D -> Option DQuick Check:
No tracking -> blame culture intensifies due to lack of ownership [check]
Hint: No tracking -> blame culture grows, fixes stall [check]
Common Mistakes:
5. At 10x scale, which component of a distributed Count-Min Sketch system is most likely to fail first and why?
hard
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]
Hint: Central coordinator serializes updates, bottlenecking at scale [check]
Common Mistakes:
