Practice
Solution
Step 1: Identify CAP constraints
During network partitions, a system must choose between consistency and availability.Step 2: Match system behavior
AP systems prioritize availability and partition tolerance, allowing stale reads but remaining operational.Final Answer:
Option D -> Option DQuick Check:
AP systems allow availability during partitions with eventual consistency [check]
Solution
Step 1: Identify smoothing mechanism
The leaky bucket algorithm enforces a fixed output rate by draining requests steadily, smoothing bursts.Step 2: Eliminate alternatives
A fixed-size thread pool that rejects excess requests immediately rejects excess requests immediately, not smoothing them. A token bucket that allows bursts up to a maximum token count (token bucket) allows bursts, not smoothing to steady rate. A simple FIFO queue without rate limiting has no rate control, so bursts pass through.Final Answer:
Option A -> Option AQuick Check:
Leaky bucket drains at fixed rate, smoothing bursts [check]
Solution
Step 1: Understand lack of quorum impact
Without quorum, passive node cannot safely confirm active node failure, risking split-brain.Step 2: Failover behavior without consensus
To avoid split-brain, passive node blocks writes until manual resolution, causing availability loss.Final Answer:
Option C -> Option CQuick Check:
No quorum -> passive blocks writes to prevent split-brain [check]
Solution
Step 1: Understand replication role in CRDT counters
Replication propagates shard states to other replicas for merging. Without it, shards cannot merge and increments are isolated.Step 2: Trace failure impact
Without replication, increments on isolated shards are effectively lost from global view until replication resumes; no blocking occurs.Final Answer:
Option B -> Option BQuick Check:
Replication failure isolates shards, causing lost increments globally [check]
Solution
Step 1: Analyze memory constraints and burst tolerance
Sliding window counters require storing timestamps, which grows with request volume, unsuitable for strict memory limits.Step 2: Fixed window counters use constant memory by counting requests per fixed interval, allowing bursts at window edges but fitting memory constraints
Token and leaky buckets smooth bursts but require token state management and may not tolerate bursts as well.Final Answer:
Option D -> Option DQuick Check:
Fixed window uses constant memory, tolerates bursts, fits strict memory limits [check]
