Skip to content

divyadhimaan/system-design-playground

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

78 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

System Design

This repository contains notes, diagrams, and code snippets created while learning system design concepts. It's intended as a personal reference for revision and interview preparation. Topics include high-level design patterns, scalability principles, common system architectures, and more.

Table of Contents

Concepts

Additional Concepts

System Design Problems

Resources

A collection of materials referred to while learning:

Articles

How to Use This Repo

  • Browse by topic directories or use the table of contents above.
  • Diagrams are stored under /diagrams and topic-specific folders.
  • Use markdown files as revision notes before interviews.
  • Refer to example architectures for designing systems in projects.

Contributing

This is a personal learning repo, but feel free to open issues or PRs if you spot something helpful to add.


Glossary

CAP Theorem (Brewer's Theorem)

In a distributed computer system, you can only support two of the following guarantees:

  • Consistency - Every read receives the most recent write or an error (All nodes see the same data at the same time.)
  • Availability - Every request receives a response, without guarantee that it contains the most recent version of the information (The system is always responsive.)
  • Partition Tolerance - The system continues to operate despite network failures or delays. (No data loss or crash due to communication break between nodes.)

Networks aren't reliable, so you'll need to support partition tolerance. A distributed system must be partition-tolerant (P). So, a practical tradeoff is between Consistency (C) and Availability (A).

CP - consistency and partition tolerance

  • Waiting for a response from the partitioned node might result in a timeout error.
  • CP is a good choice if your business needs require atomic reads and writes.
  • Banking systems prefer CP

AP - availability and partition tolerance

  • Responses return the most readily available version of the data available on any node, which might not be the latest.
  • Writes might take some time to propagate when the partition is resolved.
  • social media feeds prefer AP.

ACID Properties

ACID is a set of properties that ensure reliable, consistent, and safe transactions in a database system.

Property Ensures... Example Use Case
Atomicity All or none execution Debit fails → entire txn rolled back Bank transfers
Consistency Valid state transitions No violation of constraints E-commerce inventory updates
Isolation No interference between transactions Prevents dirty reads/race conditions Online booking systems
Durability Changes survive system failures Data saved after commit Order confirmations in retail apps

Consistent Hashing

Consistent Hashing maps servers to the key space and assigns requests(mapped to relevant buckets, called load) to the next clockwise server. Servers can then store relevant request data in them while allowing the system flexibility and scalability.


FFMPEG

FFmpeg is a powerful, free, and open-source multimedia framework used for decoding, encoding, transcoding, and streaming audio and video files.


AVI

AVI, or Audio Video Interleave, is a multimedia container format developed by Microsoft to store both audio and video data in a single file, allowing for synchronized playback.


Homebrew

Homebrew is a package manager for macOS (and Linux) that simplifies the installation, updating, and management of software on your system.


HLS

  • HLS, or HTTP Live Streaming, is a widely used video streaming protocol developed by Apple that delivers audio and video content over the internet.
  • It's known for its adaptability to changing network conditions, reliability, and compatibility with various devices and browsers.
  • HLS works by breaking down video files into smaller segments, which are then downloaded and played sequentially by a video player.

DASH

  • Dynamic Adaptive Streaming over HTTP (DASH) is a streaming technology that adapts video quality in real-time based on network conditions, delivering high-quality video over the internet using standard HTTP servers.
  • It achieves this by breaking down video content into segments, each with varying bitrates, and allowing the client device to dynamically select the most appropriate segment for the current network bandwidth

PSTN (Public Switched Telephone Network)

  • Traditional circuit-switched telephone network.
  • Requires telephone lines and dedicated bandwidth per call.
  • Cost depends on distance and duration.
  • Generally reliable but expensive.
  • Example: Landline phone systems.

VoIP (Voice over Internet Protocol)

  • Transmits voice calls over the internet using packet-switching.
  • Requires only internet connectivity (no phone lines).
  • Cost-effective and often free.
  • Scalable and flexible, but quality depends on internet speed.
  • Example: Skype, Zoom, WhatsApp calls.

SIP (Session Initiation Protocol)

  • Signaling protocol used to establish, manage, and terminate VoIP calls.
  • Handles call setup, teardown, and modifications.
  • Works with other protocols (e.g., RTP for media transmission).
  • Used for voice, video, and messaging sessions over IP.
  • Example: Used in VoIP softphones and enterprise telephony systems.

About

This repository contains notes, diagrams, and code snippets created while learning system design concepts.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published