Practice
Accept header to determine API version. What happens if the header is missing or malformed at this step?Solution
Step 1: Trace gateway header validation at step 3
The gateway requires a validAcceptheader for content negotiation versioning; missing or malformed headers violate protocol.Step 2: Understand failure handling
To avoid ambiguous routing or unintended version fallback, the gateway rejects invalid requests with 400 errors rather than guessing versions.Final Answer:
Option A -> Option AQuick Check:
Missing Accept header triggers 400 error at gateway [check]
Solution
Step 1: Identify component that reflects real-time incoming traffic
Load balancer metrics provide immediate, accurate QPS data as they handle all incoming requests before backend processing.Step 2: Eliminate other options
Relational DB counting is too slow and adds overhead; client logs are delayed and incomplete; CDN metrics reflect cached content, not all requests.Final Answer:
Option A -> Option AQuick Check:
Load balancer metrics reflect real-time QPS accurately [check]
Solution
Step 1: Understand parallelism vs ordering
Using multiple consumer groups increases parallelism but does not guarantee ordering per session.Step 2: Identify ordering guarantee
Partitioning messages by user session key ensures ordering within partitions.Final Answer:
Option C -> Option CQuick Check:
Multiple consumer groups increase throughput but ordering per session requires partitioning [check]
Solution
Step 1: Understand Geohash prefix role
Geohash prefix index buckets locations; without it, filtering by location is impossible.Step 2: Trace failure impact
Without the prefix index, the system cannot filter by location, so it returns all businesses (false positives), not incomplete results (false negatives).Final Answer:
Option D -> Option DQuick Check:
Missing Geohash prefix index causes unfiltered results (false positives) [check]
Solution
Step 1: Evaluate encryption approaches for read latency and security
TDE with HSMs provides strong security with minimal impact on read latency as encryption/decryption is transparent and hardware-accelerated.Step 2: Eliminate less suitable options
Client-side encryption increases latency and complicates querying; app-layer encryption with env vars risks key exposure and adds latency; file system encryption protects at disk level but not granular data access.Final Answer:
Option B -> Option BQuick Check:
TDE + HSM balances security and low-latency reads [check]
