Practice
Solution
Step 1: Understand segment finalization
Once an HLS segment is finalized and published, it is immutable to ensure consistent playback for viewers.Step 2: Handling delayed packets
Reopening finalized segments (B) breaks immutability. Buffering for next segment (C) misplaces packets out of order. Restarting stream (D) is costly and unnecessary. Discarding late packets (A) maintains low latency and stream integrity.Final Answer:
Option A -> Option AQuick Check:
Discarding late packets preserves segment immutability and low latency [check]
Solution
Step 1: Understand rollback absence impact
Without rollback, faulty Canary version cannot be reverted automatically.Step 2: Trace failure effect
Faulty version remains live, causing degraded user experience indefinitely.Final Answer:
Option A -> Option AQuick Check:
No rollback -> faulty version stays live -> degraded service persists [check]
Solution
Step 1: Evaluate DNS-based load balancing
DNS with short TTLs (Use DNS-based load balancing with short TTLs for fast failover) still suffers from caching delays and cannot guarantee session stickiness.Step 2: Assess Anycast with GSLB
Anycast IP routing routes users to nearest data center at network level; combined with health-aware GSLB, it enables sub-second failover and consistent session routing.Step 3: Consider client-side and BGP options
Client-side geo-DNS (Use client-side geo-DNS resolution to select data centers for each request) is unreliable and complex; BGP policies (Use BGP routing policies to steer traffic to preferred data centers) have slow convergence and no session guarantees.Final Answer:
Option C -> Option CQuick Check:
Anycast + GSLB enables fast failover and session stickiness [check]
Solution
Step 1: Identify stateful bottlenecks at scale
Chat servers hold WebSocket connections in memory, which are stateful and tied to specific servers, limiting horizontal scaling.Step 2: Compare other components
Databases can be sharded; Kafka scales with partitions; presence service caches can be distributed; chat servers' stateful connections are the hardest to shard.Final Answer:
Option A -> Option AQuick Check:
Stateful WebSocket connections -> chat servers bottleneck at 10x scale [check]
Solution
Step 1: Analyze storage backend scaling
Storage can be scaled horizontally with sharding; unlikely first failure.Step 2: Analyze Kafka cluster scaling
Kafka scales with partitions but requires careful tuning; not first failure at 10x.Step 3: Analyze aggregation workers
Aggregation workers scale horizontally; CPU load manageable with more instances.Step 4: Analyze metric agents
Agents push metrics frequently, increasing network usage exponentially; network bandwidth at agents is limited and saturates first.Final Answer:
Option D -> Option DQuick Check:
Agents saturate network bandwidth first at 10x scale [check]
