System Design Course
- 16Unfamiliar
- 0Learning
- 0Familiar
- 0Mastered
What are the three key characteristics that define a system as 'large scale'?
16 questions
- 1
What are the three key characteristics that define a system as 'large scale'?
Model answer
Large-scale systems have a lot of data, are used by many people, and are updated very frequently, with high performance expectations.
Explanation
The content mentions Google Maps as an example, highlighting large data volume, many users, frequent updates, and strict performance requirements.
- 2
Why are servers distributed across multiple geographic locations in a distributed system?
Model answer
Servers are distributed for fault tolerance (if one crashes, others take the load) and performance (users access a nearby server for faster response).
Explanation
The content explains that having servers in India, US, and Japan provides redundancy and reduces latency for users in different regions.
- 3
Define a design pattern in the context of system design.
Model answer
A design pattern is a common solution extracted from a common problem, using specific practices, principles, or processes to build reliable, scalable, and maintainable systems.
Explanation
The content describes how repeating problems (e.g., notifying millions of followers) are solved with reusable patterns like publisher-subscriber.
- 4
Explain the publisher-subscriber design pattern with the example given in the content.
Model answer
In publisher-subscriber, the publisher (e.g., Brad Pitt) creates an event, and millions of subscribers receive notifications. An intermediary controls the pace to keep server load low and ensure delivery.
Explanation
This pattern is used for distributing content to many followers, balancing speed and server capacity.
- 5
What are the three main steps when converting business requirements into a technical design?
Model answer
- Define requirements from the user's perspective. 2. Reduce features to data definitions (objects). 3. Define endpoints (APIs) to manipulate or query the data.
Explanation
The content outlines this process: starting from user needs, abstracting into data entities, then creating APIs for interaction.
- 6
What is the difference between stateful and stateless protocols?
Model answer
In a stateless protocol (e.g., HTTP), each request contains all context, so the server does not store client state. A stateful protocol retains client context on the server, which can reduce duplicate requests but complicates fault tolerance.
Explanation
The content contrasts HTTP (stateless) with a hypothetical stateful approach where the server tracks the client's current pointer.
- 7
Why is HTTP considered a stateless protocol, and what is a key benefit of this?
Model answer
HTTP is stateless because each request contains all necessary information; the server does not store client context. This allows adding new servers easily without losing state.
Explanation
The benefit is simplicity and fault tolerance; if a server crashes, no context is lost.
- 8
When would you use a TCP-based protocol versus a UDP-based protocol for video streaming?
Model answer
Use TCP for reliable delivery when lost packets matter (e.g., archived lectures needing full context). Use UDP for real-time efficiency when occasional loss is acceptable (e.g., live streaming where speed is prioritized).
Explanation
The content mentions TCP for reliability and UDP for real-time, with WebRTC (UDP-backed) for live video and RTMP (TCP) for source footage.
- 9
What is the role of a CDN (Content Delivery Network) in system design?
Model answer
A CDN persists static data (e.g., video segments) closer to users, reducing load on the origin server and improving performance by serving content from nearby edge locations.
Explanation
The content suggests using CDNs for static content like video to offload the server, but notes authentication challenges.
- 10
Describe the map-reduce pattern as applied to video processing in the content.
Model answer
A raw video is split into 10-second segments. Each segment is sent to multiple servers (map) for conversion to different resolutions and formats, then stored for delivery.
Explanation
This pattern processes large data in parallel; though the example lacks a reduce step, it's a high-level application of map-reduce.
- 11
What is an advantage of using a NoSQL database for comments over a SQL database?
Model answer
NoSQL databases scale well for key-value storage without needing relational joins or transactions, which are unnecessary for simple comment persistence.
Explanation
The content notes that comments may require schema flexibility and scale, making NoSQL suitable despite lack of transactions.
- 12
Why should raw video from a live camera be stored in a file system rather than a traditional SQL database?
Model answer
Video files are large and static; file systems like HDFS or Amazon S3 are cheaper and better suited for storing large binary objects than expensive SQL databases.
Explanation
The content suggests using a file system for video because it's cost-effective and efficient for large files, unlike SQL databases designed for structured data.
- 13
What is the difference between a use case diagram and a class diagram in low-level design?
Model answer
A use case diagram shows actors and the actions (use cases) they can perform. A class diagram defines the states (data) and behaviors (methods) of objects in the system.
Explanation
The content explains that use case diagrams capture what users can do, while class diagrams specify the internal structure of objects.
- 14
In a sequence diagram, how is time represented?
Model answer
Time progresses downward along the y-axis (timeline), showing the order of interactions between objects.
Explanation
The content describes the sequence diagram's timeline where the y-axis represents time in descending order.
- 15
Why is it important to separate an API for 'seek and play' from an API for 'continuous buffering' even if they return similar data?
Model answer
The business use cases differ: 'seek and play' indicates user interest in a specific timestamp (important for analytics), while 'buffering' is a background action for smooth playback. Separating them allows different handling and data collection.
Explanation
The content discusses how the same underlying function serves different purposes, and separating APIs enables better analytics and behavior.
- 16
In the video class implementation, why was the frame duration moved from a class constant to an instance variable (startTimestamp)?
Model answer
Frames can have variable durations (e.g., high-action scenes may be shorter). Making duration per-object allows flexibility; the class constant would incorrectly assume all frames are the same length.
Explanation
The content corrected the design to store startTimestamp per frame, allowing frames to have different durations.

Ask anything
We've read this whole study set, so questions about it get the best answers.