System Design Flashcards
What is latency?
How LONG it takes a packet to travel from one computer on the internet to another.
Average ‘ping’ speed
What units is latency measured in?
Milliseconds (ms)
At what latency might you start to notice a lag? (What’s good latency?)
Anything under 100ms should be good but it depends on the application.
For gaming, it’s suggested less than 50ms and ideally less than 30ms.
Average speeds faster than 50ms are best for most purposes.
What is network throughput?
How MUCH data can be transferred from source to destination in a given time.
What is database throughput?
How MANY reads/writes can be handled in a given time frame (often seconds).
How many reads and writes / second can a typical RDBMS handle?
Reads/second: 10K
Writes/second: 5K
How many reads and writes / second can a typical Distributed Cache handle?
Reads/second: 100K
Writes/second: 100K
How many reads and writes / second can a typical Message Queue handle?
Reads/second: 100K
Writes/second: 100K
How many reads and writes / second can a typical NoSQL database handle?
Reads/second: 20K - 50K
Writes/second: 10K - 25K
What is the average max effective capacity of a RDBMS instance?
3TB
What is the average max effective capacity of a Distributed Cache?
16GB - 128GB
How many bits does the extended-ASCII character set use and how is it different from the basic ASCII set?
The extended-ASCII character set uses 8 bits (256 possible characters).
The basic ASCII character set uses 7 bits (128 possible characters).
The extended-ASCII character adds foreign language characters.
How many bytes to store one extended-ASCII character in a text file (e.g. ‘A’)?
8 bits = 1 byte
How many bytes to store ‘Monday’?
6 bytes
How many bytes to store a plain text email?
Assumptions:
- the average length of a word is 5 characters
- the average number of words in an email is 400
Character = 1 byte
Total Characters = 1 * 5 * 400 = 2000 bytes = 2KB
How many bytes to store a 64 * 64 pixel GIF?
Assumptions:
- colours can be represented with 3 bytes (one byte each for its red, green and blue values)
Around 12KB
64 * 64 * 3 = 12,288 bytes
Estimating Data ----------------------- How many bytes to store a 3 minute MP3 audio file? Notes: - 1 kbit = 125 bytes - common MP3 quality is 256 kbit/s
Around 6 MB
256 * (60 * 3) * 125 = 5,760,000 bytes = 5.76 MB
How many bytes to store a one hour film compressed as MPEG4?
4 GB
What are UUIDs?
Universally Unique IDentifiers, that can be generated without the use of a centralized authority.
UUID collisions are extremely unlikely to happen, especially not in a single application space.
All UUIDs are 128 bits in length, but are commonly represented as 32 hexadecimal characters separated by four hyphens:
123e4567-e89b-12d3-a456-426614174000