Practice
1. In a request trace, at step 4 the latency monitoring component records the request's completion time. If the request took 120ms but the P95 latency threshold is 100ms, what state does the monitoring component mark for this request?
easy
Solution
Step 1: Compare request latency to P95 threshold
The request latency (120ms) exceeds the P95 threshold (100ms), so it is in the slowest 5% tail.Step 2: Monitoring component's marking logic
Requests exceeding P95 latency are flagged to identify performance degradation; it is not ignored or marked as failed unless timeout occurs.Final Answer:
Option C -> Option CQuick Check:
120ms > 100ms P95 -> marked as exceeding P95 latency [check]
Hint: Latency > P95 threshold -> mark as slow request [OK]
Common Mistakes:
2. A messaging system must decouple high-throughput message producers from multiple independent consumers subscribing to different topics. Which component best handles this decoupling and ensures message durability?
easy
Solution
Step 1: Identify decoupling and durability needs
In-memory queues (Use a simple in-memory queue on the producer server to buffer messages) lack durability and don't scale across servers. Direct HTTP push (Use a direct HTTP push from producer to each consumer) tightly couples producer and consumers, causing backpressure issues. Polling a relational DB (Use a relational database with polling by consumers) adds latency and load on DB, unsuitable for high throughput.Step 2: Recognize Kafka's role
Kafka's distributed log with topic partitions decouples producers and consumers, provides durability, and supports high throughput with consumer groups.Final Answer:
Option A -> Option AQuick Check:
Kafka partitions enable durable, scalable decoupling [check]
Hint: Distributed logs decouple producers and consumers reliably [OK]
Common Mistakes:
3. For an API Gateway that must support both REST and gRPC clients, which architecture best balances protocol support and transformation complexity?
medium
Solution
Step 1: Analyze protocol support requirements
Supporting both REST and gRPC clients in one gateway reduces operational complexity and centralizes transformation logic.Step 2: Evaluate alternatives
Use separate API Gateways for REST and gRPC, each optimized for its protocol increases deployment and maintenance overhead. Use REST-only API Gateway and require gRPC clients to use a proxy converting gRPC to REST adds latency and complexity on client side. Use gRPC-only API Gateway and require REST clients to upgrade to gRPC is impractical as REST clients are widespread.Final Answer:
Option D -> Option DQuick Check:
Single gateway with protocol translation balances support and complexity [check]
Hint: One gateway handles both protocols with internal translation [check]
Common Mistakes:
4. For intent classification in the bot, which architecture best balances latency and model update frequency given a high volume of diverse user queries?
medium
Solution
Step 1: Analyze latency and update frequency constraints
High volume requires low latency for common intents and flexibility for complex queries.Step 2: Evaluate architectures
A single large LLM (A) has high latency and update overhead. Multiple replicas (C) improve throughput but still synchronous latency is high. Batch offline (D) delays updates and user experience. Lightweight classifier with async LLM fallback (B) balances fast routing and complex understanding.Final Answer:
Option C -> Option CQuick Check:
Lightweight classifier + async LLM fallback balances latency and accuracy [check]
Hint: Fast lightweight routing, async LLM fallback for complexity [check]
Common Mistakes:
5. At 10x scale, which component in the blob store architecture is most likely to fail first due to stateful connection limits, and why?
hard
Solution
Step 1: Identify stateful bottleneck at front-end API servers
API servers maintain stateful client sessions (e.g., HTTP keep-alive or TLS), limiting horizontal scaling due to connection affinity.Step 2: Eliminate other options
Storage nodes scale with added disks; metadata service shards metadata; distributed log partitions scale with more brokers.Final Answer:
Option A -> Option AQuick Check:
Stateful client sessions limit API server horizontal scaling [check]
Hint: Stateful API servers limit scaling due to connection affinity [check]
Common Mistakes:
