StudyDSA logoStudyDSA

Command Palette

Search for a command to run...

Sign InSign Up
Sign Up

Data StructuresAlgorithmsBig-O NotationDesign PatternsSystem DesignMachine LearningPhysicsRoboticsAI Research

Definition
StudyDSA

Where complexity meets clarity.
By Armas Zarra.

Topics

  • Data Structures
  • Algorithms
  • Big-O Notation
  • Robotics
  • AI Research
  • Machine Learning

Practice

  • Blind 75
  • LeetCode 75
  • NeetCode 150

Legal

  • Privacy Policy
  • Terms of Service

© 2026 Armas Films LLC

IntroductionSystem Design

System Design

How servers, databases, and networks fit together so a system stays fast and reliable as it grows.

Definition

Code that runs fine on your laptop is one problem. The same code serving ten million users is a different one, because at that scale everything becomes a distributed system, where machines fail and networks drop messages. System design is the practice of deciding how servers, databases, caches, and networks fit together so software keeps working as it grows.


Where algorithms ask how to compute something efficiently, system design asks how to keep it running when a server dies mid-request. The components aren't exotic, the skill is in the tradeoffs: every choice buys you something and costs you something else.

Background

Every design conversation starts with the same three questions: what is the machine actually doing, how is the application structured, and what does this system need to deliver? This tier covers how computers and applications are put together before any scaling enters the picture, plus the back-of-the-envelope math that catches impossible designs before you build them.

Networking

Everything in a distributed system travels over a network, so you need to know how data actually moves: how machines find each other through DNS, and what the transport layer guarantees you with TCP or trades away for speed with UDP.

APIs

An API is the contract between client and server: what you can ask for and what you get back. This tier covers HTTP, the protocol nearly every API speaks, the WebSocket connections that let a server push without being asked, and the paradigms and design choices that keep old callers working as the API grows.

Caching

The fastest request is the one you never make twice. Caches keep recently used data in fast storage so repeated reads skip the database, and CDNs apply the same idea to geography by parking copies of files near your users. Storing the copy is the easy part, the hard part is knowing when it's gone stale.

Proxies

Between clients and your servers sits a layer of middlemen. Load balancers spread traffic so no single server drowns, gateways handle auth and routing at the front door, rate limiters keep one noisy client from ruining things for everyone, and consistent hashing decides which server owns what without reshuffling on every change.

Storage

Most scaling problems end up being database problems. This tier starts with the SQL or NoSQL question, which by now is less a war and more a menu. From there it covers how data survives growth: indexes keep queries fast, replication keeps copies alive, sharding splits what no longer fits on one machine, and the CAP theorem caps what you can promise.

Big Data

Some work is too big or too slow for the request-response loop. Message queues and pub/sub systems move that work off to the side to run on its own schedule, while MapReduce and stream processing chew through datasets no single machine could handle.

Architecture

The last tier zooms out to the shape of the whole system. Do you build one deployable app or many small services? Do services call each other directly or react to events? And when a cluster of machines has to agree on a single truth while some of them are failing, consensus algorithms like Raft do the deciding.

Learning Path

Here is the whole path, tier by tier. Each topic will get its own page with diagrams and walkthroughs soon. For now, use this as a map of how the pieces stack.

Background

One machine, one app, and the napkin math that says what they can handle. Everything later in this path exists because some number here runs out.

Computer Architecture

What CPU, RAM, and disk each do, and why the speed gaps matter.

CPURAMdisk
Coming soon!

Application Architecture

The anatomy of a deployed app, from client to server to storage.

clientserverDB
Coming soon!

Design Requirements

Pinning down what a system must do before deciding how.

Coming soon!

Back-of-the-Envelope Math

Quick estimates that tell you if a design is even plausible.

1Mx100100M
Coming soon!
Networking

The first number to run out forces a second machine, and now data has to travel. DNS finds the other side, and TCP or UDP decides what the trip guarantees.

Networking Basics

IP addresses, ports, and how machines find each other.

10.0.0.110.0.0.2
Coming soon!

TCP vs UDP

Reliable delivery or raw speed: the transport layer's tradeoff.

AB
Coming soon!

DNS

The phonebook that turns domain names into IP addresses.

site.comDNSIP
Coming soon!
APIs

Connected machines still need a shared language. These define the contract: what a client may ask, what it gets back, and how that promise survives growth.

HTTP

The request-response protocol behind nearly everything on the web.

clientserverGET200
Coming soon!

WebSockets

A two-way connection for when the server needs to push.

Coming soon!

API Paradigms

REST, GraphQL, and gRPC, and when each one earns its keep.

appRESTGraphQLgRPC
Coming soon!

API Design

Interfaces that survive growth without breaking their callers.

Coming soon!
Caching

Once requests are cheap to make, you get a flood of identical ones. Answering repeats from a fast copy saves the database, but the new problem is staleness.

Caching

Answers repeated reads from fast memory instead of the database.

appcacheDB
Coming soon!

Caching Strategies

Cache-aside, write-through, write-back, and when copies go stale.

appcacheDB
Coming soon!

CDNs

Serves static files from servers near the user.

origin
Coming soon!
Proxies

Caches absorb the repeats, but unique traffic still has to land somewhere. A front layer spreads it across servers, screens it, and decides who owns what.

Proxies & Load Balancing

Middlemen that route, shield, and spread traffic across servers.

LB
Coming soon!

API Gateways

One front door handling auth, routing, and TLS for everything behind it.

appGW
Coming soon!

Consistent Hashing

Moves almost nothing when servers join or leave the ring.

Coming soon!

Rate Limiting

Caps request rates so one noisy client can't sink the system.

limit
Coming soon!
Storage

Behind every cache miss waits the database, which is where scaling pressure eventually concentrates. Keeping data fast, replicated, and partitioned is its own discipline, complete with an impossibility theorem.

SQL

Tables, joins, and transactions with hard guarantees.

Coming soon!

NoSQL

Flexible schemas built to spread across machines.

Coming soon!

Indexes

The data structures that turn full scans into instant lookups.

Coming soon!

Replication

Copies data across machines for speed and survival.

primarycopycopy
Coming soon!

Sharding

Splits data across machines when one is no longer enough.

datas1s2s3
Coming soon!

CAP Theorem

When the network splits, you keep consistency or availability, not both.

CAP
Coming soon!

Object Storage

Cheap, bottomless storage for files, backups, and blobs.

Coming soon!
Big Data

Some work should never happen inside a request at all. Hand it to a queue and process it elsewhere, in scheduled batches or as a stream that never stops.

Message Queues

Lets services hand off work without waiting for each other.

prodcons
Coming soon!

Pub/Sub & Event Streaming

Broadcasts events to every subscriber, with a log you can replay.

Coming soon!

MapReduce

Splits a huge job across many machines, then merges the results.

dataresult
Coming soon!

Batch vs Stream Processing

Crunch data in scheduled chunks or process it as it arrives.

joblive
Coming soon!
Architecture

Every piece so far is a component. These last topics decide how the components get arranged: one app or many services, direct calls or events, and a cluster that keeps agreeing while parts of it fail.

Monoliths & Microservices

One deployable app or many small services, each at a price.

app
Coming soon!

Event-Driven Architecture

Services react to events instead of calling each other directly.

svcsvcsvc
Coming soon!

Consensus

How a cluster of unreliable machines agrees on one truth.

L
Coming soon!