Practice
Solution
Step 1: Identify multiplexing capability
HTTP/1.1 uses pipelining but suffers head-of-line blocking; HTTP/2 introduces multiplexing streams over a single TCP connection, allowing concurrent requests without blocking.Step 2: Eliminate other options
HTTP/3 uses UDP and multiplexing but is not the primary feature here; HTTP/1.1 with multiple TCP connections increases overhead and latency.Final Answer:
Option C -> Option CQuick Check:
HTTP/2 multiplexes streams on one TCP connection [check]
Solution
Step 1: Identify decoupling need
Immediate consistency via relational DB (A relational database with strong ACID transactions for immediate consistency) blocks on writes, causing latency spikes. In-memory cache (An in-memory cache with TTL eviction to buffer incoming orders) lacks durability and ordering guarantees. API gateway throttling (A REST API gateway that throttles requests to downstream services) limits throughput but doesn't decouple processing.Step 2: Durable queue with partitioning
A distributed message queue (A distributed message queue with partitioning and durable storage) buffers spikes, partitions workload, and guarantees durability, enabling asynchronous downstream processing.Final Answer:
Option C -> Option CQuick Check:
Distributed queue partitions spikes, ensures durability, decouples processing [check]
Solution
Step 1: Evaluate replication and failover requirements
Zero data loss requires synchronous replication; minimal downtime requires automated leader election.Step 2: Compare architectures
Asynchronous replication (A) risks data loss; multi-master (C) complicates consistency; manual failover (D) increases downtime.Final Answer:
Option D -> Option DQuick Check:
Synchronous replication + consensus election ensures data safety and fast failover [check]
Solution
Step 1: Role of transaction log (WAL)
The WAL records all changes before commit to enable redo/undo during crash recovery.Step 2: Consequence of missing WAL
Without WAL, committed transactions might not be replayed, causing partial or lost updates and inconsistency.Final Answer:
Option A -> Option AQuick Check:
Missing WAL -> lost committed transactions, inconsistent state [check]
Solution
Step 1: Identify bottleneck at scale
Edge routers handle packet forwarding at line rate; at 10x traffic, their CPU and forwarding ASICs are stressed first.Step 2: Evaluate other components
Route reflectors (A) scale better with hierarchical design; monitoring systems (C) can be scaled horizontally; client devices (D) are downstream and less critical for routing stability.Final Answer:
Option A -> Option AQuick Check:
Edge routers' CPU overload causes first failure at 10x traffic [check]
