This tests: System design depth Understanding of distributed systems Trade-off navigation (CAP, consistency, latency) Real-world edge case handling Let’s go step by step and design Redis-like cache from first principles , not using cloud-managed services. ๐ Goal: Build a Redis-like Distributed In-Memory Cache ๐งพ 1. Requirements Gathering (Clarify with interviewer) ๐น Functional Support GET , SET , DEL , TTL Handle concurrent reads/writes Cache keys across multiple nodes Optional: Support pub/sub, data structures (hash, list) ๐น Non-Functional Low latency (<1ms typical) High availability & fault tolerance Scalable horizontally Eventual or strong consistency Memory-optimized with TTL eviction Absolutely! Back-of-the-envelope estimations are crucial in system design interviews — they demonstrate your pragmatism , ability to roughly size a system, and to make sound trade-offs . Let’s break it down for your Redis-like...
Design a Global Video Streaming Service (e.g., YouTube, Netflix) Question: Design a scalable and fault-tolerant video streaming platform that can: Stream videos globally with low latency. Allow users to upload videos. Handle millions of users simultaneously. Requirements (functional and non-functional) functional requirement: video upload, video streaming, handle the network bandwidth, video for the different devices like mobile, smart tv, computer non-function : high availability, fault tolerance 1. High-Level Requirements Functional Requirements: Video Upload : Users can upload videos in various formats. Video Streaming : Provide smooth playback with adaptive streaming for different network conditions. Network Bandwidth Handling : Adjust video quality dynamically based on bandwidth. Device Compatibility : Support multiple devices (e.g., mobile, smart TV, computer). Non-Functional Requirements: High Availability : The service should handle millions of concurrent viewers with m...