Practice
1. In a system implementing causal consistency, at step 4 the Read Coordinator receives a read request for key K after a write W causally related to a previous write V. What state does the Read Coordinator ensure before returning the value for K?
easy
Solution
Step 1: Trace Read Coordinator behavior at Step 4
Under causal consistency, the Read Coordinator must ensure that all causally prior writes (like V) are visible before returning W's value to maintain causal order.Step 2: Eliminate other options
It returns the latest value of K without waiting, since eventual consistency suffices ignores causal dependencies; It returns the value from the local replica immediately, ignoring causal dependencies breaks causal guarantees by returning stale data; It synchronizes with the leader to enforce linearizability before responding enforces stronger linearizability, not required here.Final Answer:
Option B -> Option BQuick Check:
Read Coordinator waits for causal dependencies before returning [check]
Hint: Causal consistency waits for all prior causally related writes [check]
Common Mistakes:
2. A web service requires encrypted communication with client browsers but must minimize CPU overhead on the server. Which component primarily handles the encryption and decryption workload during connection setup?
easy
Solution
Step 1: Identify TLS handshake role
The TLS handshake is responsible for negotiating encryption parameters and performing cryptographic operations to secure the connection.Step 2: Eliminate other options
The web application server performing manual encryption of HTTP payloads is incorrect because manual encryption by the app server is inefficient and not standard. The client browser encrypting data before sending HTTP requests is incorrect because the client does not perform the handshake encryption workload; it participates but the server's TLS library handles the cryptographic operations. The DNS server resolving domain names to IP addresses is unrelated to encryption.Final Answer:
Option A -> Option AQuick Check:
TLS handshake handles encryption setup on server side [check]
Hint: TLS handshake manages encryption setup on server side [check]
Common Mistakes:
3. A public API receives millions of requests per minute from diverse clients. To prevent abuse, which layer should primarily enforce a global rate limit that blocks excessive requests before reaching internal services?
easy
Solution
Step 1: Identify the role of API Gateway
The API Gateway acts as the first entry point and can block abusive traffic before it reaches internal services or databases.Step 2: Evaluate other layers
Database-level rate limiting is too late and risks overload; service-level limits are per-service and don't prevent global abuse; client-side limits are unreliable as clients can be malicious.Final Answer:
Option C -> Option CQuick Check:
API Gateway blocks abusive requests early [check]
Hint: Block abusive traffic earliest at API Gateway [check]
Common Mistakes:
4. In a system where Step 4 is the Delivery Worker reading from a Kafka topic partitioned by user ID, what is the Delivery Worker's state if it reads a message but the downstream notification service is temporarily unavailable?
easy
Solution
Step 1: Understand Kafka consumer commit semantics
Kafka commits offsets only after successful processing. If downstream is unavailable, the message is not committed.Step 2: Delivery Worker retries uncommitted messages
Uncommitted messages remain in the topic and will be redelivered on retry, ensuring no message loss.Final Answer:
Option D -> Option DQuick Check:
Kafka offset commit after processing -> retries on failure [check]
Hint: Kafka commits offsets only after successful processing [OK]
Common Mistakes:
5. At 10x scale, which component in the Ticket Server pattern is most likely to become the bottleneck first, and why?
hard
Solution
Step 1: Identify centralization bottleneck
The Ticket Server centrally allocates ID blocks and maintains allocation state, limiting horizontal scaling.Step 2: Compare other components
Clients scale horizontally; network scales with infrastructure; database load is less critical if Ticket Server caches state.Final Answer:
Option A -> Option AQuick Check:
Ticket Server centralization -> first bottleneck at 10x scale [check]
Hint: Central Ticket Server state limits horizontal scaling first [check]
Common Mistakes:
