SSourav Saha
HomeExperienceSoftware DesignSystem DesignLearningBooksToolsContact
SSourav Saha

Building scalable backend systems, distributed infrastructure, and cloud-native applications.

Navigation

  • Home
  • Experience
  • Software Design
  • System Design
  • Learning

More

  • Books
  • Tools
  • Contact

Connect

  • LinkedIn
  • Email

© 2026 Sourav Saha. All rights reserved.

Built with using Next.js

System Design

A comprehensive guide to designing scalable, highly available, and performant distributed systems.

Master distributed systems by first understanding the fundamental Building Blocks — like Load Balancers, Consensus, and Caching — and then applying them to real-world Case Studies like Uber, Netflix, and WhatsApp. Start with the fundamentals below, then scroll down to the applied case studies.

Fundamental Building Blocks

The core components and protocols that power all modern distributed systems.

Networking & Protocols

How machines talk to each other over the wire.

Building Block

HTTP & TCP/IP Fundamentals

The foundation of all networked systems — understand how TCP provides reliable delivery and HTTP structures request-response communication, with a from-scratch implementation of both.

#networking#http#tcp
January 1, 202416 min read
Read
Building Block

HTTPS & TLS

Understand how HTTPS encrypts communication using TLS. Learn the TLS handshake, certificates, cipher suites, and build a secure TLS server from scratch in Go.

#networking#https#tls
March 31, 202517 min read
Read
Building Block

REST API Design

The universal interface for distributed systems — learn how REST constrains HTTP into a predictable, scalable API pattern, with a from-scratch implementation of a RESTful service.

#rest#api-design#http
January 2, 202417 min read
Read
Building Block

WebSockets & Long Polling

How to achieve real-time, bidirectional communication over HTTP — understand the evolution from short polling to long polling, Server-Sent Events, and WebSockets, with a runnable Go chat server implementation.

#websockets#long-polling#sse
January 3, 202413 min read
Read
Building Block

DNS & Service Discovery

How clients and microservices find each other — from public DNS resolution to internal service registries (Consul/ZooKeeper), with a runnable Python DNS server and Service Registry implementation.

#dns#service-discovery#microservices
January 4, 202412 min read
Read
Building Block

Content Delivery Network (CDN)

How to serve static assets globally with millisecond latency. Understand CDN Edge vs Origin, Push vs Pull architectures, Anycast routing, and how to build a basic origin-pull CDN node.

#cdn#caching#networking
January 11, 202412 min read
Read
Building Block

Reverse Proxy (Nginx, Envoy, HAProxy)

Understand how reverse proxies route requests, terminate TLS, balance traffic, and cache responses. Learn the difference between forward proxies and reverse proxies with Nginx and Envoy examples.

#reverse-proxy#nginx#envoy
June 5, 202411 min read
Read
Building Block

Load Balancer

How to distribute traffic across thousands of servers. Understand L4 vs L7 load balancing, health checks, and routing algorithms, with a runnable Go load balancer implementation.

#load-balancer#networking#distributed-systems
January 7, 202412 min read
Read

Data Structures & Algorithms

Core algorithmic building blocks used across distributed systems.

Building Block

Hashing & Hash Functions

The mathematical foundation of distributed systems. Learn how hash functions work, the difference between cryptographic and non-cryptographic hashes, and their role in partitioning, caching, and integrity.

#hashing#algorithms#data-structures
January 5, 202411 min read
Read
Building Block

UUIDs & Unique ID Generation

How distributed systems assign unique identifiers to billions of rows across thousands of servers without collisions. From standard UUIDs to Twitter Snowflake and MongoDB ObjectIDs.

#uuid#snowflake#distributed-systems
January 6, 202412 min read
Read
Building Block

Bloom Filters

How to check if an item exists in a dataset of 1 billion rows using less than 1MB of memory. Understand probabilistic data structures, false positives, and how databases use them to avoid slow disk reads.

#bloom-filter#data-structures#caching
January 14, 202413 min read
Read
Building Block

Consistent Hashing

Learn how consistent hashing solves the problem of rehashing in distributed systems. Understand the hash ring, virtual nodes, and build a working implementation in Python.

#consistent-hashing#distributed-systems#hashing
March 1, 202412 min read
Read
Building Block

Checksum & Data Integrity

Understand how distributed systems prevent silent data corruption. Learn about CRC32, MD5, error detection, and build a checksum verification tool in C.

#checksum#data-integrity#hashing
March 15, 202412 min read
Read

Databases & Storage

How data is stored, indexed, replicated, and partitioned at scale.

Building Block

SQL vs NoSQL

The great database debate. Understand ACID transactions, relational models, and the four types of NoSQL databases (Key-Value, Document, Column-Family, Graph), with a Go implementation.

#database#sql#nosql
January 13, 202411 min read
Read
Building Block

Database Indexing (B-Trees)

How databases find 1 row out of 1 billion in milliseconds. Understand B-Trees, LSM Trees, Table Scans, and how to optimize slow SQL queries with a Python B-Tree simulation.

#database#sql#indexing
January 12, 202412 min read
Read
Building Block

Database Sharding

Learn how to scale database writes by splitting data across multiple servers. Understand Shard Keys, range vs hash sharding, the cross-shard join problem, and build a sharding router in Python.

#database-sharding#databases#scaling
March 20, 202411 min read
Read
Building Block

Database Replication

Learn how database replication works, covering Master-Slave, Master-Master, sync vs async replication, and how to build a basic replication engine in Go.

#database-replication#databases#high-availability
March 5, 202411 min read
Read
Building Block

Write-Ahead Log (WAL)

Understand how databases guarantee durability (the D in ACID) even if the power goes out. Learn about Append-Only logs, fsync, and build a basic WAL in C.

#wal#databases#storage
March 26, 202512 min read
Read
Building Block

SSTable & LSM Tree

Learn how modern high-throughput databases store data on disk. Understand SSTables, LSM Trees, MemTables, Compaction, and build a basic LSM Tree in Python.

#sstable#lsm-tree#databases
May 30, 202412 min read
Read

Messaging & Architecture

Patterns for communication, caching, and system-wide coordination.

Building Block

Caching Strategies & Eviction (LRU/LFU)

Dramatically reduce database load and latency. Learn Cache-Aside, Write-Through, and Write-Behind strategies, and understand how LRU and LFU eviction policies manage limited memory, with a from-scratch Go implementation.

#caching#redis#memcached
January 10, 202413 min read
Read
Building Block

LRU Cache

Understand how Least Recently Used (LRU) caching works. Learn the doubly linked list + hash map design, build a production-grade LRU cache in Python, and apply it to real system design problems.

#caching#lru#data-structures
October 5, 202419 min read
Read
Building Block

Message Queues & Pub/Sub

Learn how to decouple microservices using asynchronous messaging. Understand point-to-point queues vs Pub/Sub, at-least-once delivery, and build a basic message broker in Python.

#message-queue#pub-sub#asynchronous
March 30, 202411 min read
Read
Building Block

Event-Driven Architecture

Learn how to build highly decoupled, scalable systems using Event-Driven Architecture. Understand Event Sourcing, CQRS, choreography vs orchestration, and see a Java Spring Boot example.

#event-driven#architecture#microservices
April 20, 202412 min read
Read
Building Block

API Gateway

The front door to your microservices. Understand how API Gateways handle routing, authentication, rate limiting, and protocol translation, with a runnable Node.js implementation.

#api-gateway#microservices#authentication
January 8, 202412 min read
Read
Building Block

Service Mesh

Learn how Service Meshes like Istio and Linkerd abstract away cross-cutting concerns (mTLS, retries, circuit breaking) from application code using sidecar proxies.

#service-mesh#istio#envoy
June 1, 202412 min read
Read
Building Block

CAP Theorem & Consistency Models

Understand the CAP Theorem, Network Partitions, and the trade-offs between Strong Consistency and High Availability in distributed databases.

#cap-theorem#consistency#distributed-systems
April 10, 202412 min read
Read

Reliability & Resilience

Making systems survive failures, overloads, and misbehaving clients.

Building Block

Rate Limiter

Protect your APIs from abuse and DDoS attacks. Learn the 4 core rate limiting algorithms (Token Bucket, Leaky Bucket, Fixed Window, Sliding Window) and how to implement distributed rate limiting with Redis.

#rate-limiter#api-gateway#security
January 9, 202412 min read
Read
Building Block

Circuit Breaker

Learn how the Circuit Breaker pattern prevents cascading failures in microservices. Understand the Closed, Open, and Half-Open states, and build a working implementation in Python.

#circuit-breaker#reliability#microservices
March 25, 202412 min read
Read
Building Block

Retry & Exponential Backoff

Learn how to survive transient network failures. Understand Retry Storms, Exponential Backoff, Jitter, and build a robust retry decorator in Python.

#retry#backoff#jitter
April 15, 202410 min read
Read
Building Block

Idempotency

Learn how to safely retry failed operations without causing duplicate charges or data corruption. Understand Idempotency Keys, exactly-once semantics, and build an idempotent API in Python.

#idempotency#api-design#reliability
April 5, 202412 min read
Read

Distributed Coordination

Consensus, ordering, and coordination across multiple nodes.

Building Block

Leader Election

Understand why distributed clusters need a Leader to prevent split-brain data corruption. Learn about Leases, ZooKeeper, and build a simple Redis-backed Leader Election system in Go.

#leader-election#distributed-systems#coordination
May 1, 202413 min read
Read
Building Block

Distributed Consensus (Raft)

Understand the core algorithm that powers modern distributed databases. Learn how Raft achieves consensus, handles network partitions, and replicates logs safely.

#consensus#raft#distributed-systems
May 25, 202412 min read
Read
Building Block

Gossip Protocol

Learn how massive distributed clusters share membership information and detect failures without a central coordinator. Understand SWIM, epidemic dissemination, and build a Gossip simulator in Python.

#gossip-protocol#distributed-systems#failure-detection
June 10, 202412 min read
Read
Building Block

Heartbeat & Failure Detection

Learn how distributed systems detect server failures using Heartbeats. Understand ping-ack protocols, gossip protocols, and build a failure detector in Go.

#heartbeat#failure-detection#distributed-systems
March 10, 202412 min read
Read
Building Block

Vector Clocks & CRDTs

Learn how AP distributed databases resolve write conflicts without data loss. Understand Vector Clocks, Version Vectors, and Conflict-free Replicated Data Types (CRDTs).

#vector-clocks#crdt#conflict-resolution
June 15, 202414 min read
Read
Building Block

Distributed Transactions (Sagas)

Learn how to maintain ACID properties across multiple microservices. Understand Two-Phase Commit (2PC), the Saga Pattern, and build a Saga Orchestrator in Python.

#distributed-transactions#saga#2pc
May 5, 202412 min read
Read

Observability

Understanding what's happening inside a running distributed system.

Building Block

Logging & Structured Logs

Understand the evolution of logging in distributed systems. Learn why plain text logs fail at scale, how Structured Logging (JSON) solves this, and build a logger in Go.

#logging#observability#structured-logs
April 25, 202411 min read
Read
Building Block

Monitoring & Alerting

Learn how to observe the health of distributed systems. Understand Metrics, Prometheus, Grafana, Service Level Objectives (SLOs), and build a metrics exporter in Go.

#monitoring#alerting#metrics
May 10, 202411 min read
Read
Building Block

Distributed Tracing

Learn how to debug requests that span dozens of microservices. Understand Trace IDs, Spans, OpenTelemetry, and build a Python tracing simulator.

#tracing#observability#microservices
May 15, 202411 min read
Read

Real-World Case Studies

Deep dives into the architectures of planetary-scale applications.

System Design

TinyURL (URL Shortener)

A comprehensive system design case study on building a URL Shortener like TinyURL or Bitly. Learn about Base62 encoding, Database Sharding, and Cache-Aside architectures.

#case-study#tinyurl#url-shortener
July 1, 20248 min read
Read
System Design

WhatsApp (Chat Application)

A comprehensive system design case study on building a real-time chat application like WhatsApp. Learn about WebSockets, Message Queues, and how to scale connection servers for billions of users.

#case-study#whatsapp#chat
July 5, 20247 min read
Read
System Design

Uber (Ride Hailing)

A comprehensive system design case study on building a ride-hailing app like Uber or Lyft. Learn about Geospatial Indexing, Quadtrees, and Real-time Location Tracking.

#case-study#uber#geospatial
July 10, 20247 min read
Read
System Design

Netflix (Video Streaming)

A comprehensive system design case study on building a global video streaming platform like Netflix. Learn about CDNs, Video Transcoding, and Edge Computing.

#case-study#netflix#cdn
July 15, 20247 min read
Read
System Design

Twitter / X (Social Media Timeline)

A comprehensive system design case study on building a global social media timeline. Learn about the Fan-out architecture, Redis caching, and handling viral celebrities.

#case-study#twitter#x
July 20, 20247 min read
Read