Practice
Solution
Step 1: Identify compliance needs for strong consistency and auditability
Compliance requires strict transactional guarantees and immutable audit trails.Step 2: Evaluate storage options
NoSQL and object stores offer eventual consistency, risking stale reads. Kafka provides append-only logs but lacks transactional ACID guarantees for metadata queries. Relational DBs provide ACID transactions and built-in audit logging, ensuring compliance.Final Answer:
Option A -> Option AQuick Check:
Relational DBs ensure ACID and audit logging for compliance [check]
Solution
Step 1: Understand role of centralized coordination in leader election
Coordination service ensures single leader election and consensus.Step 2: Analyze failure without coordination
Without it, leader election retries occur causing latency but eventual leader election succeeds via timeouts.Final Answer:
Option C -> Option CQuick Check:
Leader election delays but does not halt cluster without coordination [check]
Solution
Step 1: Compare modular hashing and consistent hashing
Modular hashing requires full remapping on node changes, causing high overhead.Step 2: Evaluate alternatives
Centralized directory adds latency and single point of failure; rendezvous hashing is good but less common and more complex than consistent hashing with virtual nodes.Final Answer:
Option C -> Option CQuick Check:
Consistent hashing with virtual nodes balances load and minimizes remapping [check]
Solution
Step 1: Identify components stressed by 10x scale
Database scaling is often handled by sharding or replicas; load balancers scale horizontally; client SDKs are local.Step 2: Recognize GraphQL parsing and validation cost
Parsing and complexity validation are CPU-bound and happen per request, becoming CPU bottlenecks at high request rates.Final Answer:
Option B -> Option BQuick Check:
GraphQL validation CPU cost scales linearly with requests [check]
Solution
Step 1: Identify stateful components at scale
WebSocket servers maintain persistent connections bound to server memory, limiting horizontal scaling.Step 2: Compare with stateless components
Stateless API servers and load balancers scale horizontally more easily; databases fail later due to storage.Final Answer:
Option A -> Option AQuick Check:
Stateful WebSocket servers bottleneck first due to connection affinity [check]
