Practice
Solution
Step 1: Identify rate limiting responsibility
The API Gateway is the entry point and can efficiently enforce rate limits before requests reach backend services, preventing overload.Step 2: Eliminate other options
The backend microservices implement rate limiting individually to distribute load spreads rate limiting, risking inconsistent enforcement and backend overload. A centralized database tracks request counts and enforces limits synchronously adds latency and complexity by synchronous DB checks. Clients are responsible for self-throttling their request rates trusts clients, which is insecure.Final Answer:
Option A -> Option AQuick Check:
API Gateway enforces rate limits upfront to protect backend [check]
Solution
Step 1: Trace request router behavior on shard failure
Retrying the same shard (The router retries the same shard until it recovers before forwarding the request) blocks requests; returning error (The router returns an error immediately to the client indicating shard unavailability) reduces availability; next clockwise shard (The router uses the next clockwise shard on the hash ring as a fallback for the key) is correct only if the ring is intact and shard failure is handled by virtual nodes.Step 2: Understand fallback hashing
Rehashing with a different function (The router hashes the key again with a different hash function to find another shard) is a common fallback to find an alternate shard when the primary is down, ensuring availability without blocking or errors.Final Answer:
Option D -> Option DQuick Check:
Fallback hashing finds alternate shard on failure [check]
Solution
Step 1: Identify GeoDNS role
GeoDNS resolves DNS queries differently based on the client's geographic location, enabling routing to the nearest data center.Step 2: Eliminate other options
A centralized load balancer (A) is a single point and doesn't handle geo-based DNS resolution. CDN (C) caches content but doesn't route DNS queries. Application-level proxy (D) routes after DNS resolution, not at DNS level.Final Answer:
Option A -> Option AQuick Check:
GeoDNS routes based on client location via DNS resolution [check]
Solution
Step 1: Identify role of asynchronous replication
It propagates updates to other replicas to keep data fresh despite partitions.Step 2: Trace failure without async replication
Without it, replicas do not get updates, so reads return stale data indefinitely.Final Answer:
Option A -> Option AQuick Check:
No async replication -> stale reads persist during partition [check]
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]
