Practice
1. In the request flow for creating a pull request, at step 5 the Merge Worker attempts to apply the patch to the target branch. What happens if a merge conflict is detected at this step?
easy
Solution
Step 1: Trace Merge Worker behavior at Step 5
When a merge conflict occurs, automatic resolution is unsafe; the system flags the PR as conflicted and requires manual user intervention.Step 2: Eliminate incorrect options
Automatic conflict resolution risks data loss; discarding PR or deleting branches is destructive; infinite retries cause resource exhaustion.Final Answer:
Option A -> Option AQuick Check:
Merge conflicts -> PR marked conflicted, user notified [check]
Hint: Conflicts block merge until user resolves [check]
Common Mistakes:
2. You need to handle 1 million product updates per minute in the catalog without blocking user searches. Which component best handles this high write throughput while ensuring eventual consistency?
easy
Solution
Step 1: Identify write throughput handling
Relational DBs (A) and synchronous NoSQL writes (C) block on writes, limiting throughput. Redis (D) lacks durability guarantees for primary storage.Step 2: Recognize Kafka's role
Kafka buffers high write volume asynchronously, decoupling writes from reads and enabling eventual consistency.Final Answer:
Option A -> Option AQuick Check:
Kafka buffers writes asynchronously -> high throughput, eventual consistency [check]
Hint: Buffer writes asynchronously with Kafka for high throughput [check]
Common Mistakes:
3. A video upload service must handle millions of concurrent uploads and ensure durability before transcoding. Which component best handles temporary storage and durability of raw uploads before processing?
easy
Solution
Step 1: Identify durability and scale needs for raw uploads
Raw uploads require durable, scalable storage that can handle large binary files and high concurrency. Redis (Use an in-memory cache like Redis to store raw uploads temporarily) is in-memory and not durable for large files. Relational DBs (Store raw uploads directly in a relational database for strong consistency) are inefficient for large blobs and scale poorly. CDN edge caches (Use a CDN edge cache to hold raw uploads before transcoding) are for delivery, not upload storage.Step 2: Recognize object storage suitability
Distributed object storage like S3 provides durability, scalability, and cost-effective storage for large files, making it ideal for raw uploads before transcoding.Final Answer:
Option C -> Option CQuick Check:
Object storage ensures durable, scalable raw upload storage [check]
Hint: Object storage for durable large file uploads [check]
Common Mistakes:
4. In a sliding window rate limiter, at step 3 the system records a new request timestamp. What happens internally to the stored counters at this step?
easy
Solution
Step 1: Understand sliding window counter mechanics
Sliding window counters maintain timestamps of recent requests and remove those outside the window to keep an accurate count.Step 2: At step 3, old timestamps beyond the window are purged before adding the new request timestamp
This ensures the count reflects only requests within the sliding window duration.Final Answer:
Option A -> Option AQuick Check:
Sliding window removes expired timestamps before counting new requests [check]
Hint: Sliding window purges old timestamps before counting new ones [check]
Common Mistakes:
5. If the API Gateway's authentication service crashes, what is the immediate failure mode observed by clients attempting to access protected endpoints?
medium
Solution
Step 1: Trace failure impact of authentication service crash
Without the authentication service, the gateway cannot verify credentials and may default to allowing requests through if no fail-closed mechanism is implemented.Step 2: Evaluate other options
Clients receive a 500 Internal Server Error due to gateway crash is unlikely as gateway remains up. Clients receive a 401 Unauthorized response because authentication cannot be verified requires fail-closed design, which is not always implemented. Requests queue indefinitely at the gateway until authentication service recovers causes indefinite blocking, which is rare.Final Answer:
Option C -> Option CQuick Check:
Auth service down -> requests pass unverified if no fail-closed [check]
Hint: Auth crash -> requests may bypass if no fail-closed design [check]
Common Mistakes:
