Practice
Solution
Step 1: Identify feature retrieval requirements
Low latency and consistency for millions of users require fast, precomputed feature access.Step 2: Evaluate component suitability
A relational DB with joins (A) is too slow for real-time; batch recomputation (C) is stale; key-value store without consistency (D) risks stale or inconsistent features. Distributed in-memory feature store (B) provides fast, consistent retrieval.Final Answer:
Option B -> Option BQuick Check:
In-memory feature store -> low latency, consistent features [check]
Solution
Step 1: Trace Database Proxy behavior at Step 4
Upon detecting primary failure, the proxy marks it unavailable and waits for leader election to complete before routing queries to the new leader.Step 2: Eliminate other options
Forwarding immediately to old primary (A) causes timeouts; queuing indefinitely (C) stalls clients; returning errors without retry (B) reduces availability.Final Answer:
Option A -> Option AQuick Check:
Proxy reroutes queries only after leader election [check]
Solution
Step 1: Evaluate TLS versions and key exchange
TLS 1.3 supports ephemeral key exchange (ECDHE) which provides forward secrecy and reduces handshake round trips, lowering latency.Step 2: Eliminate other options
Use TLS 1.0 with RSA key exchange for compatibility uses outdated TLS 1.0 and RSA key exchange lacking forward secrecy and higher latency. Disable certificate validation to speed up connections compromises security by disabling validation. Use self-signed certificates to avoid certificate chain overhead risks trust issues and is unsuitable for public APIs.Final Answer:
Option A -> Option AQuick Check:
TLS 1.3 ephemeral keys -> forward secrecy + lower latency [check]
Solution
Step 1: Role of health checks in Least Connections
Health checks detect server availability; without them, the balancer cannot exclude unhealthy servers.Step 2: Behavior without health checks
Least Connections relies on accurate connection counts and server health; without health checks, it cannot trust connection data and typically falls back to Round Robin.Final Answer:
Option B -> Option BQuick Check:
Without health checks, Least Connections falls back to Round Robin losing load awareness [check]
Solution
Step 1: Compare HTTP methods for partial updates
PUT requires full resource; PATCH supports partial updates natively.Step 2: Evaluate JSON Patch benefits
JSON Patch is a standardized format allowing precise partial modifications, reducing payload size and server logic.Final Answer:
Option B -> Option BQuick Check:
PATCH with JSON Patch enables flexible partial updates [check]
