Practice
1. A video streaming service needs to serve millions of concurrent users with minimal latency and support adaptive bitrate streaming. Which component is primarily responsible for caching and delivering video segments closest to the user?
easy
Solution
Step 1: Identify the role of Edge CDN Nodes
Edge CDN nodes cache video segments near users to reduce latency and offload origin servers.Step 2: Eliminate other options
Origin servers handle storage but not low-latency delivery; load balancers distribute requests but don't cache content; databases store metadata, not video segments.Final Answer:
Option D -> Option DQuick Check:
Edge CDN caches segments closest to users for low latency [check]
Hint: Edge nodes cache content near users for low latency [check]
Common Mistakes:
2. In the log aggregation pipeline, at Step 4 the Log Processor reads from Kafka and enriches logs with metadata. What happens if the enrichment service is temporarily unavailable at this step?
easy
Solution
Step 1: Trace Log Processor behavior at Step 4
It reads logs from Kafka and enriches them before forwarding.Step 2: Understand failure handling
If enrichment service is down, buffering and retrying prevents data loss and ensures enrichment.Final Answer:
Option A -> Option AQuick Check:
Buffer and retry enrichment -> no data loss or offset commit [check]
Hint: Buffer and retry enrichment to avoid data loss [check]
Common Mistakes:
3. For a CI/CD system that must support both rapid iterative deployments and guaranteed rollback safety, which deployment strategy is most appropriate?
medium
Solution
Step 1: Analyze rollback safety and rapid iteration needs
Canary deployment gradually exposes new versions, enabling quick rollback if issues arise, balancing speed and safety.Step 2: Evaluate other strategies
Blue-Green minimizes downtime but requires double infrastructure; Rolling updates lack gradual exposure and rollback granularity; Recreate causes downtime and no gradual rollback.Final Answer:
Option D -> Option DQuick Check:
Canary balances rapid deployment with rollback safety [check]
Hint: Canary = gradual rollout + rollback safety [check]
Common Mistakes:
4. For a distributed lock system requiring low latency and fault tolerance, which approach is better and why?
medium
Solution
Step 1: Compare fault tolerance and latency
Single Redis is low latency but single point of failure; ZooKeeper is fault tolerant but higher latency.Step 2: Evaluate Redlock trade-offs
Redlock balances low latency with fault tolerance by coordinating multiple Redis masters.Final Answer:
Option C -> Option CQuick Check:
Redlock balances latency and fault tolerance better than single Redis or ZooKeeper [check]
Hint: Redlock balances latency and fault tolerance best [check]
Common Mistakes:
5. At 10x scale, which component in a Kafka-like distributed message queue is most likely to fail first, and why?
hard
Solution
Step 1: Identify bottlenecks at 10x scale
Network switches (A) scale with hardware upgrades; ZooKeeper (C) handles coordination but is lightweight compared to brokers; consumers (D) can be scaled horizontally.Step 2: Kafka broker partition leader overload
Partition leaders handle all writes and replication for their partitions; at 10x scale, leaders become hotspots causing CPU, disk, and network saturation, leading to failures.Final Answer:
Option A -> Option AQuick Check:
Partition leaders overloaded -> broker failure first at scale [check]
Hint: Partition leaders handle all writes -> overload first at scale [check]
Common Mistakes:
