Practice
Solution
Step 1: Understand Update Worker hashing
Each hash function maps the event key to an index in the sketch array.Step 2: Increment counter at hashed index
The Count-Min Sketch increments the counter at that index to record the event occurrence.Final Answer:
Option B -> Option BQuick Check:
Update increments counters at hash indices to track frequencies [check]
Solution
Step 1: Identify burst tolerance and smooth rate enforcement
Fixed window counters reset abruptly at minute boundaries, causing spikes. Token and leaky buckets enforce steady rates but may not track exact recent usage.Step 2: Sliding window counters track requests continuously over the last 60 seconds, allowing bursts without sudden resets
Sliding window counters provide smoother rate limiting by considering recent activity, avoiding boundary effects.Final Answer:
Option B -> Option BQuick Check:
Sliding window smooths rate limits over time, avoiding fixed window spikes [check]
Solution
Step 1: Identify the filtering requirement
The system needs a fast, memory-efficient way to filter out keys that definitely do not exist before hitting the slow backend.Step 2: Evaluate component suitability
Redis cache storing all keys (A) is expensive and not scalable for huge key sets. Relational DB indexes (C) still require backend queries. Consistent hashing (D) routes keys but does not filter non-existent keys. Bloom filters (B) provide fast probabilistic membership tests with low memory.Final Answer:
Option A -> Option AQuick Check:
Bloom filters reduce backend queries by filtering non-existent keys [check]
Solution
Step 1: Analyze branching strategies for scale
Lightweight branch pointers referencing immutable commits allow fast branch creation and merges without locking, supporting high concurrency.Step 2: Evaluate other options
Centralized locking serializes operations, hurting performance; full branch copies waste storage and complicate merges; synchronous replication adds latency and reduces availability.Final Answer:
Option B -> Option BQuick Check:
Immutable commits + lightweight pointers -> scalable branching [check]
Solution
Step 1: Understand client certificate validation failure
If the client detects an invalid certificate chain, it aborts the handshake and terminates the connection to prevent insecure communication.Step 2: Analyze options
The client proceeds with encrypted communication but logs a warning is incorrect because clients do not proceed with encryption if validation fails. The server retries sending the certificate chain automatically is incorrect; servers do not retry sending certificates automatically. The client falls back to unencrypted HTTP automatically is incorrect because clients do not downgrade to HTTP automatically.Final Answer:
Option C -> Option CQuick Check:
Client aborts handshake on certificate validation failure [check]
