Practice
Solution
Step 1: Understand client-centric guarantees
Read-your-writes consistency ensures that a client always sees its own writes, even if it switches servers, without requiring global synchronization.Step 2: Eliminate other models
Strong consistency enforces global order but is costly and not required here; eventual consistency does not guarantee immediate visibility of own writes; causal consistency orders related operations but does not guarantee read-your-writes for a single client.Final Answer:
Option A -> Option AQuick Check:
Read-your-writes consistency ensures client sees own writes immediately [check]
Solution
Step 1: Understand Flink's checkpointing mechanism
Flink performs distributed snapshots capturing the full operator state including windowed aggregations at step 4.Step 2: Reason about failure impact
Since checkpoint includes all processed events and state, Flink can restore exactly-once semantics after failure.Final Answer:
Option A -> Option AQuick Check:
Flink checkpoints capture full operator state for exactly-once recovery [check]
Solution
Step 1: Understand Transcoding Worker queue interaction
Transcoding Workers typically use message brokers with blocking or long-polling to avoid busy-waiting. Immediate shutdown (A) wastes throughput. Polling with delay (B) causes unnecessary load and latency. Backup queue in DB (D) is inefficient and not standard.Step 2: Recognize blocking on broker notification
Blocking on a message broker notification (e.g., Kafka consumer poll or RabbitMQ consumer wait) is efficient and standard to wait for new tasks.Final Answer:
Option D -> Option DQuick Check:
Blocking on broker notification avoids busy polling [check]
Solution
Step 1: Identify bottleneck in distributed updates
Centralized coordinator serializes updates to maintain consistency, limiting throughput.Step 2: Analyze other components
Network bandwidth and hash function speed scale better; sketch arrays have fixed size but don't overflow.Step 3: Understand scale impact
At 10x scale, coordinator becomes overwhelmed, causing update latency and failures.Final Answer:
Option D -> Option DQuick Check:
Central coordinator serialization bottlenecks updates at scale [check]
Solution
Step 1: Analyze stateful WebSocket connections on Chat Servers
Chat Servers maintain in-memory state per WebSocket; scaling requires connection migration which is complex.Step 2: Compare other components
Databases can shard; Kafka partitions can be increased with rebalancing; presence TTL cache scales horizontally.Final Answer:
Option A -> Option AQuick Check:
Stateful WebSocket connections -> Chat Servers bottleneck at scale [check]
