[Fundamental] System Design Flashcards

1
Q

Main strategy

A

Requirement clarification

Main API

  1. Single server
  2. Add DB
  3. Add multiple servers, add Load Balancer
  4. Additional strategies: based on use case find bottleneck and appropriate solution
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Database Performance Improvement

A
  • Replication
    • Writer instance
    • Reader instance
  • Partiotioning: Divide columns
  • Sharding: Divide Rows
  • Indexing
  • Materialized View: Pre-compute long-running query, ideally low writes
  • Denormalization
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Caching

A

Redis (WIP)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

CDN

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Async Pattern

A

Message broker for long running tasks

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Real time use cases

A
  • WebSockets: Ideal for low-latency, bidirectional communication but requires managing persistent connections.
  • SSE (Server-Sent Events): Good for unidirectional, real-time updates but has scalability limits.
  • HLS/DASH: Best for live video streaming with adaptive bitrate but has higher latency.
  • MQTT: Efficient for lightweight messaging in IoT but needs a broker.
  • Kafka Streams: Powerful for real-time data processing but more complex.
  • UDP: Low latency for gaming but requires handling packet loss.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly