System Design
System design, animated from first principles
559 topics in 20 sections: networking, databases, caching, load balancing, messaging, microservices, reliability, security, cloud, distributed systems, AI and LLM infrastructure, and 30 famous case studies. Watch requests travel through real architectures and run simulations of load balancers, caches, Raft and more.
01System Design Fundamentals
The vocabulary: requirements, qualities, estimation and trade-offs.
- Introduction to System DesignAnimatedDesigning how the parts of a software system fit together to meet a goal.
- What is System Architecture?AnimatedThe high-level structure of a system: its components, their responsibilities and how they communicate.
- High-Level Design (HLD)AnimatedThe big-picture view: major components, data stores and how they connect.
- Low-Level Design (LLD)AnimatedThe detailed view: classes, interfaces, schemas and algorithms inside one component.
- Functional RequirementsWhat the system must do: the features users can see.
- Non-Functional RequirementsHow well the system must behave: speed, availability, scale, security.
- Technical RequirementsThe technical needs the solution must satisfy: platforms, protocols, integrations.
- System ConstraintsLimits you cannot change: budget, team, time, regulations, legacy systems.
- ScalabilityAnimatedThe ability to handle more load by adding resources.
- ReliabilityAnimatedThe probability that a system works correctly over time.
- AvailabilityAnimatedThe fraction of time a system is up and usable.
- MaintainabilityAnimatedHow easily the system can be understood, fixed and changed.
- ExtensibilityAnimatedHow easily new features can be added without rewriting what exists.
- Fault ToleranceAnimatedThe ability to keep working when components fail.
- PerformanceHow fast and efficient the system is under load.
- LatencyThe time one request takes from start to finish.
- ThroughputHow much work the system completes per unit of time.
- BottlenecksThe slowest part that limits the whole system.
- Single Point of Failure (SPOF)AnimatedOne component whose failure brings the whole system down.
- Capacity PlanningEstimating the resources needed to meet future demand.
- Back-of-the-Envelope EstimationQuick rough maths to size a system.
- System Design Trade-offsEvery choice gains something and costs something.
- Cost OptimisationDelivering the needed quality at the lowest sensible cost.
- Architectural Decision Records (ADR)A short document recording one design decision and why.
02Networking Fundamentals
How data moves: protocols, addresses, proxies and CDNs.
- Computer Networking BasicsAnimatedHow computers send data to each other across networks.
- OSI ModelA seven-layer model of how network communication is organised.
- TCP/IP ModelThe four-layer model the internet actually uses.
- IP AddressingAnimatedGiving each device a numeric address so packets can find it.
- IPv4 and IPv6AnimatedTwo versions of IP: 32-bit addresses and 128-bit addresses.
- DNSAnimatedThe phone book of the internet: names to IP addresses.
- DHCPAnimatedAutomatically assigns IP addresses to devices joining a network.
- TCPAnimatedReliable, ordered byte stream with a handshake.
- UDPAnimatedFast, connectionless datagrams with no delivery guarantee.
- HTTPAnimatedThe request-response protocol of the web.
- HTTPSAnimatedHTTP carried inside an encrypted TLS connection.
- HTTP/1.1AnimatedText-based HTTP with persistent connections.
- HTTP/2AnimatedMultiplexed HTTP over one connection.
- HTTP/3AnimatedHTTP over QUIC (UDP) for faster, more resilient connections.
- TLS/SSLAnimatedProtocol that encrypts and authenticates network traffic.
- WebSocketsAnimatedA persistent two-way channel between browser and server.
- Server-Sent Events (SSE)AnimatedThe server pushes a one-way stream of events over HTTP.
- REST APIsAnimatedResource-oriented APIs over HTTP using standard methods.
- GraphQLAnimatedA query language where the client asks for exactly the fields it needs.
- gRPCAnimatedFast binary RPC over HTTP/2 with typed contracts.
- Network RoutingAnimatedChoosing the path packets take across networks.
- Reverse ProxyAnimatedA server in front of your servers that forwards client requests.
- Forward ProxyAnimatedA server that makes requests on behalf of clients.
- Network Address Translation (NAT)AnimatedLets many private devices share one public IP address.
- Content Delivery Networks (CDN)AnimatedServers around the world that serve content near users.
- Network LatencyAnimatedThe delay for data to travel across a network.
- BandwidthThe maximum data a link can carry per second.
- Packet SwitchingAnimatedData is split into packets that travel independently.
- Connection PoolingAnimatedReusing a set of open connections instead of opening new ones.
- Keep-Alive ConnectionsAnimatedKeeping a TCP connection open for several requests.
03Client-Server Architecture
The shapes a system can take, from one box to many services.
- Client-Server ModelAnimatedClients request services and servers provide them.
- Two-Tier ArchitectureAnimatedA client talking directly to a data tier.
- Three-Tier ArchitectureAnimatedPresentation, application logic and data in separate tiers.
- N-Tier ArchitectureAnimatedThree tiers extended with more layers such as caching and messaging.
- Monolithic ArchitectureAnimatedThe whole application built and deployed as one unit.
- Modular MonolithAnimatedA monolith with strict internal module boundaries.
- Microservices ArchitectureAnimatedMany small services, each owned by a team and deployed independently.
- Service-Oriented Architecture (SOA)AnimatedCoarse-grained shared services connected through an enterprise bus.
- Serverless ArchitectureAnimatedRun code in managed functions without managing servers.
- Event-Driven ArchitectureAnimatedComponents react to events instead of calling each other directly.
- Peer-to-Peer ArchitectureAnimatedNodes act as both clients and servers with no central server.
- Layered ArchitectureAnimatedCode organised in layers with downward dependencies.
- Hexagonal ArchitectureAnimatedThe core logic is isolated from the outside by ports and adapters.
- Clean ArchitectureAnimatedDependencies point inward toward business rules.
- Onion ArchitectureAnimatedDomain at the centre with layers wrapped around it.
- Domain-Driven Design (DDD)AnimatedModelling software around the business domain and its language.
- Model-View-Controller (MVC)AnimatedSeparates data, display and input handling.
- Model-View-ViewModel (MVVM)AnimatedA view bound to a view model that exposes model data.
- API Gateway PatternAnimatedA single entry point that routes, secures and shapes API traffic.
- Backend for Frontend (BFF)AnimatedA dedicated backend for each type of client.
04Database Fundamentals
Storing and finding data: schemas, indexes, transactions and queries.
- Database Management Systems (DBMS)AnimatedSoftware that stores, queries and protects data.
- Relational DatabasesAnimatedData stored in tables of rows and columns linked by keys.
- Non-Relational DatabasesAnimatedDatabases that do not use the fixed table model.
- SQLAnimatedThe standard language for querying relational data.
- NoSQLAnimatedA family of non-relational databases built for scale and flexibility.
- Database Schema DesignAnimatedDeciding tables, columns, types and relationships.
- Database NormalisationAnimatedOrganising tables to remove duplication.
- Database DenormalisationAnimatedDeliberately duplicating data to speed up reads.
- Primary KeysAnimatedA column that uniquely identifies each row.
- Foreign KeysAnimatedA column that refers to a row in another table.
- Composite KeysAnimatedA key made of several columns together.
- IndexingAnimatedA structure that finds rows quickly without scanning the whole table.
- B-Tree IndexingAnimatedA balanced tree that keeps sorted keys for fast lookups and ranges.
- B+ Tree IndexingAnimatedA B-tree variant where only leaves hold data, linked in order.
- Hash IndexingAnimatedAn index that maps a key to a location with a hash function.
- Full-Text IndexingAnimatedAn index for searching words inside text.
- Database TransactionsAnimatedA group of operations that succeed or fail together.
- ACID PropertiesAnimatedAtomicity, Consistency, Isolation, Durability.
- Isolation LevelsAnimatedHow much concurrent transactions can see each other's changes.
- Database LocksAnimatedMechanisms that stop transactions clashing.
- DeadlocksAnimatedTransactions waiting on each other forever.
- Query OptimisationAnimatedMaking queries run faster.
- Query Execution PlansAnimatedThe steps the database will take to run a query.
- Connection PoolingAnimatedReusing a set of open connections instead of opening new ones.
- Database MigrationsAnimatedControlled, versioned changes to the schema.
- Database ConstraintsAnimatedRules the database enforces on data.
- Materialised ViewsAnimatedA stored copy of a query result.
- Stored ProceduresAnimatedCode stored and executed inside the database.
- Database TriggersAnimatedCode that runs automatically when data changes.
- Read and Write OperationsAnimatedHow data is read from and written to storage.
05Advanced Database Architecture
Scaling a database: replication, sharding, consistency and recovery.
- Database ReplicationAnimatedCopying data to other servers.
- Master-Slave ReplicationAnimatedOne writer, many read-only copies.
- Primary-Replica ArchitectureAnimatedA primary handles writes while replicas copy it and serve reads.
- Multi-Master ReplicationAnimatedSeveral nodes accept writes.
- Synchronous ReplicationAnimatedThe primary waits for replicas before confirming a write.
- Asynchronous ReplicationAnimatedThe primary confirms immediately and replicates later.
- Database ShardingAnimatedSplitting data across multiple databases.
- Horizontal PartitioningAnimatedSplitting a table by rows.
- Vertical PartitioningAnimatedSplitting a table by columns.
- Consistent HashingAnimatedHashing onto a ring so few keys move when nodes change.
- Range-Based ShardingAnimatedEach shard owns a contiguous key range.
- Hash-Based ShardingAnimatedShard chosen by hashing the key.
- Directory-Based ShardingAnimatedA lookup table maps keys to shards.
- Database FederationAnimatedSplitting databases by function.
- Distributed DatabasesAnimatedDatabases spread across many machines.
- Distributed TransactionsAnimatedTransactions that span multiple databases or services.
- Two-Phase Commit (2PC)AnimatedA protocol with prepare and commit phases.
- Three-Phase Commit (3PC)Animated2PC with an extra pre-commit phase to avoid blocking.
- Optimistic Concurrency ControlAnimatedAssume no conflicts; check at commit.
- Pessimistic Concurrency ControlAnimatedLock first so conflicts cannot happen.
- Multi-Version Concurrency Control (MVCC)AnimatedKeep several versions so readers do not block writers.
- Eventual ConsistencyAnimatedReplicas become identical given time and no new updates.
- Strong ConsistencyAnimatedEvery read sees the latest write.
- Causal ConsistencyAnimatedRelated operations are seen in order.
- Snapshot IsolationAnimatedEach transaction sees a consistent snapshot.
- Quorum-Based ReplicationAnimatedRead and write quorums that overlap.
- Read RepairAnimatedFix stale replicas when a read notices them.
- Anti-Entropy RepairAnimatedBackground process that syncs replicas.
- Database FailoverAnimatedSwitching to a standby when the primary fails.
- Database RecoveryAnimatedRestoring a database after a crash or error.
06Distributed Systems Fundamentals
Many machines, no shared clock: time, agreement and failure.
- Introduction to Distributed SystemsAnimatedMany computers working together as one system.
- Distributed ComputingAnimatedSplitting computation across machines.
- Distributed ArchitectureAnimatedThe structure of a system spread over many nodes.
- Distributed CommunicationAnimatedHow nodes exchange information.
- Distributed CoordinationAnimatedGetting nodes to agree and act together.
- Distributed State ManagementAnimatedKeeping state consistent across nodes.
- Distributed SynchronisationAnimatedCoordinating timing and order across nodes.
- Clock SynchronisationAnimatedKeeping physical clocks close.
- Logical ClocksAnimatedCounters that order events without real time.
- Lamport TimestampsAnimatedA single counter that respects causality.
- Vector ClocksAnimatedOne counter per process to detect concurrency.
- Distributed Mutual ExclusionAnimatedOnly one node enters a critical section.
- Leader ElectionAnimatedChoosing one node to coordinate.
- Consensus AlgorithmsAnimatedGetting nodes to agree on one value despite failures.
- Paxos AlgorithmAnimatedThe classic consensus protocol.
- Raft AlgorithmAnimatedAn understandable consensus algorithm.
- Byzantine Fault ToleranceAnimatedAgreement even if some nodes lie.
- CAP TheoremAnimatedDuring a partition, choose consistency or availability.
- PACELC TheoremAnimatedIf Partitioned choose A or C; Else choose Latency or Consistency.
- Consistency ModelsAnimatedThe guarantees about what reads can return.
- Eventual ConsistencyAnimatedReplicas become identical given time and no new updates.
- Strong ConsistencyAnimatedEvery read sees the latest write.
- Distributed TransactionsAnimatedTransactions that span multiple databases or services.
- Split-Brain ProblemAnimatedTwo parts of a cluster both think they are in charge.
- Network PartitionsAnimatedParts of the network cannot talk to each other.
- Failure DetectionAnimatedNoticing that a node has failed.
- Gossip ProtocolAnimatedNodes spread information to random peers.
- Distributed LockingAnimatedA lock that works across machines.
- Distributed SnapshotsAnimatedCapturing a consistent global state.
- Exactly-Once and At-Least-Once Processing SemanticsAnimatedHow many times a message is processed.
07Caching Architecture
Keeping hot data close: policies, patterns and failure modes.
- Introduction to CachingAnimatedKeeping copies of frequently used data in a faster place.
- Cache HierarchyAnimatedLayers of caches from closest to farthest.
- Client-Side CachingAnimatedStoring data on the user's device.
- Browser CachingAnimatedThe browser reuses downloaded resources.
- Server-Side CachingAnimatedCaching results on the server.
- Database CachingAnimatedCaching query results or pages near the database.
- Distributed CachingAnimatedA cache shared across many servers.
- In-Memory CachingAnimatedStoring data in RAM for very fast access.
- RedisAnimatedAn in-memory data store with rich data types.
- MemcachedAnimatedA simple, fast in-memory key-value cache.
- Cache-Aside PatternAnimatedThe application loads data into the cache on demand.
- Read-Through CacheAnimatedThe cache itself loads missing data.
- Write-Through CacheAnimatedWrites go to the cache and database together.
- Write-Behind CacheAnimatedWrite to the cache first, the database later.
- Write-Around CacheAnimatedWrite to the database and skip the cache.
- Cache InvalidationAnimatedRemoving or updating cached data when the source changes.
- Cache ExpirationAnimatedEntries are dropped after a set time or condition.
- Time-To-Live (TTL)AnimatedThe lifetime of a cache entry.
- Least Recently Used (LRU)AnimatedEvict the entry unused for the longest time.
- Least Frequently Used (LFU)AnimatedEvict the entry used the fewest times.
- First-In-First-Out (FIFO)AnimatedEvict the oldest inserted entry.
- Cache StampedeAnimatedMany requests rebuild the same missing entry at once.
- Cache PenetrationAnimatedRequests for data that does not exist bypass the cache.
- Cache AvalancheAnimatedMany entries expire at once, flooding the database.
- Cache WarmingAnimatedPre-loading the cache before traffic arrives.
- Cache ConsistencyAnimatedKeeping cache and database in agreement.
- Distributed Cache SynchronisationAnimatedKeeping several cache nodes aligned.
- Multi-Level CachingAnimatedLocal cache in front of a shared cache.
- CDN CachingAnimatedCaching content at the network edge.
- Cache Performance OptimisationAnimatedRaising hit rate and cutting latency.
08Load Balancing and Scalability
Spreading traffic and growing capacity.
- Introduction to Load BalancingAnimatedSpreading requests across servers.
- Layer 4 Load BalancingAnimatedBalancing by IP and port.
- Layer 7 Load BalancingAnimatedBalancing by HTTP content.
- Hardware Load BalancersAnimatedDedicated appliances for balancing.
- Software Load BalancersAnimatedLoad balancing in software on commodity servers.
- DNS Load BalancingAnimatedReturning different IPs for the same name.
- Round RobinAnimatedSend each request to the next server in turn.
- Weighted Round RobinAnimatedRound robin with more turns for stronger servers.
- Least ConnectionsAnimatedSend to the server with fewest active connections.
- Least Response TimeAnimatedSend to the fastest responding server.
- IP HashingAnimatedHash the client IP to choose a server.
- Consistent HashingAnimatedHashing onto a ring so few keys move when nodes change.
- Health ChecksAnimatedRegularly testing whether servers are working.
- Active-Passive Load BalancingAnimatedOne live balancer and a standby.
- Active-Active Load BalancingAnimatedSeveral balancers share traffic at once.
- Horizontal ScalingAnimatedAdding more machines.
- Vertical ScalingAnimatedMaking one machine bigger.
- Auto ScalingAnimatedAdding or removing servers automatically.
- Elastic ScalingAnimatedCapacity that stretches and shrinks quickly with demand.
- Stateless ArchitectureAnimatedServers keep no per-user state between requests.
- Stateful ArchitectureAnimatedServers hold state between requests.
- Session ManagementAnimatedTracking a user across requests.
- Sticky SessionsAnimatedRouting a user to the same server repeatedly.
- Database ScalingAnimatedGrowing database capacity.
- Application ScalingAnimatedGrowing application server capacity.
- Geographic Load BalancingAnimatedRouting users to the nearest region.
- Global Server Load BalancingAnimatedBalancing across data centres worldwide.
- Traffic DistributionAnimatedDeciding how requests are spread.
- Rate-Aware Load BalancingAnimatedBalancing while respecting rate limits and capacity.
- Capacity ManagementAnimatedMaking sure enough resources exist for demand.
09Message Queues and Event-Driven Systems
Decoupling with queues, streams and events.
- Message QueuesAnimatedA buffer that holds messages until a consumer processes them.
- Message BrokersAnimatedServers that route messages between producers and consumers.
- Publish-Subscribe PatternAnimatedPublishers send to topics; many subscribers receive.
- Producer-Consumer PatternAnimatedProducers create work; consumers process it.
- Event-Driven ArchitectureAnimatedComponents react to events instead of calling each other directly.
- Asynchronous CommunicationAnimatedThe caller does not wait for the result.
- Synchronous CommunicationAnimatedThe caller waits for the answer.
- Message OrderingAnimatedKeeping messages in order.
- Message AcknowledgementsAnimatedConsumers confirm processing.
- Message PersistenceAnimatedStoring messages on disk.
- Message RetentionAnimatedHow long messages are kept.
- Dead Letter QueuesAnimatedA queue for messages that cannot be processed.
- Retry MechanismsAnimatedTrying again after a failure.
- Exponential BackoffAnimatedWaiting longer after each failure.
- Message DeduplicationAnimatedIgnoring duplicate messages.
- IdempotencyAnimatedDoing the same operation twice has the same effect as once.
- BackpressureAnimatedTelling producers to slow down when consumers are overwhelmed.
- Event StreamingAnimatedA continuous log of events many consumers can read.
- Event SourcingAnimatedStore changes as events instead of current state.
- CQRSAnimatedSeparate models for reading and writing.
- Transactional Outbox PatternAnimatedSave the event in the same transaction as the data.
- Saga PatternAnimatedA chain of local transactions with compensations.
- ChoreographyAnimatedServices react to each other's events.
- OrchestrationAnimatedA central coordinator drives the workflow.
- KafkaAnimatedA distributed log for high-throughput event streaming.
- RabbitMQAnimatedA flexible message broker with routing.
- Apache PulsarAnimatedA streaming platform with separated compute and storage.
- Redis StreamsAnimatedAn append-only log inside Redis.
- Amazon SQSAnimatedA managed message queue.
- Exactly-Once ProcessingAnimatedEach message affects state exactly once.
10API Design and Management
Interfaces that last: REST, GraphQL, gRPC, limits and contracts.
- API FundamentalsAnimatedA contract that lets one program use another.
- RESTful API DesignAnimatedResources, URLs and standard HTTP methods.
- GraphQL API DesignAnimatedA typed schema where clients choose the fields.
- gRPC API DesignAnimatedTyped RPC contracts in Protocol Buffers.
- API VersioningAnimatedChanging an API without breaking clients.
- API GatewayAnimatedA front door for all API traffic.
- API Rate LimitingAnimatedCapping how many requests a client can make.
- API ThrottlingAnimatedSlowing down requests instead of rejecting.
- API AuthenticationAnimatedProving who is calling.
- API AuthorisationAnimatedDeciding what the caller may do.
- API PaginationAnimatedReturning large lists in pages.
- Cursor-Based PaginationAnimatedPage using a pointer to the last item seen.
- Offset-Based PaginationAnimatedPage by skipping a number of rows.
- API FilteringAnimatedRestricting results by field values.
- API SortingAnimatedOrdering results.
- API CachingAnimatedReusing responses to cut load.
- API IdempotencyAnimatedSafe retries of API calls.
- API DocumentationAnimatedExplaining how to use the API.
- OpenAPI SpecificationAnimatedA machine-readable description of REST APIs.
- SwaggerAnimatedTools built around OpenAPI.
- API ContractsAnimatedAgreed behaviour between provider and consumer.
- Request ValidationAnimatedChecking input before using it.
- Response FormattingAnimatedShaping consistent responses.
- WebhooksAnimatedThe server calls you when something happens.
- Long PollingAnimatedHold a request open until there is data.
- WebSocketsAnimatedA persistent two-way channel between browser and server.
- Server-Sent EventsAnimatedOne-way event stream over HTTP.
- API CompositionAnimatedCombining several calls into one response.
- API AggregationAnimatedCollecting data from many sources into one API.
- API ObservabilityAnimatedSeeing how the API behaves.
11Microservices Architecture
Splitting a system into services and keeping them healthy.
- Microservices FundamentalsAnimatedSmall services that own a capability and its data.
- Service DecompositionAnimatedDeciding how to split a system into services.
- Domain-Driven DesignAnimatedModel software from the business domain.
- Bounded ContextsAnimatedA boundary inside which one model and language apply.
- Service DiscoveryAnimatedFinding where a service is running.
- Service RegistryAnimatedThe database of live service instances.
- API GatewayAnimatedA front door for all API traffic.
- Inter-Service CommunicationAnimatedHow services talk to each other.
- Synchronous Service CommunicationAnimatedRequest and response between services.
- Asynchronous Service CommunicationAnimatedServices communicate through messages.
- Circuit Breaker PatternAnimatedStop calling a failing service for a while.
- Retry PatternAnimatedTry failed calls again.
- Timeout PatternAnimatedStop waiting after a set time.
- Bulkhead PatternAnimatedIsolate resources so one failure cannot sink everything.
- Strangler Fig PatternAnimatedReplace a monolith piece by piece.
- Sidecar PatternAnimatedA helper process deployed beside the main service.
- Ambassador PatternAnimatedA helper proxy that talks to outside services for you.
- Service MeshAnimatedInfrastructure layer for service-to-service traffic.
- Distributed ConfigurationAnimatedCentral, dynamic configuration for services.
- Distributed TracingAnimatedFollowing one request across services.
- Centralised LoggingAnimatedCollecting all logs in one place.
- Centralised MonitoringAnimatedOne place to watch the health of all services.
- Microservice SecurityAnimatedSecuring many small services.
- Service-to-Service AuthenticationAnimatedServices prove who they are to each other.
- Database per Service PatternAnimatedEach service owns its database.
- Saga PatternAnimatedA chain of local transactions with compensations.
- CQRSAnimatedSeparate models for reading and writing.
- Event SourcingAnimatedStore changes as events instead of current state.
- Microservice DeploymentAnimatedShipping services independently.
- Microservice TestingAnimatedTesting many services together.
12Reliability and Fault Tolerance
Designing for failure and recovering quickly.
- Fault ToleranceAnimatedThe ability to keep working when components fail.
- High AvailabilityAnimatedStaying up despite failures.
- Disaster RecoveryAnimatedRecovering after a major outage.
- Business Continuity PlanningAnimatedKeeping the business running through disruption.
- Fault IsolationAnimatedContaining failures to a small area.
- Failure RecoveryAnimatedReturning to normal after a failure.
- RedundancyAnimatedHaving spare components.
- ReplicationAnimatedKeeping copies of data on several nodes.
- FailoverAnimatedSwitching to a backup automatically.
- Active-Active ArchitectureAnimatedSeveral sites serve traffic at once.
- Active-Passive ArchitectureAnimatedOne site serves while another waits.
- Circuit BreakersAnimatedFail fast when a dependency is unhealthy.
- Retry StrategiesAnimatedPolicies for repeating failed work.
- Timeout ManagementAnimatedChoosing and propagating deadlines.
- Graceful DegradationAnimatedKeep core features working when parts fail.
- Fallback MechanismsAnimatedAlternative behaviour when something fails.
- Bulkhead IsolationAnimatedSeparate resource pools per workload.
- Health MonitoringAnimatedContinuously checking system health.
- Chaos EngineeringAnimatedBreak things on purpose to learn.
- Chaos TestingAnimatedRunning failure experiments in test or production.
- Fault InjectionAnimatedDeliberately causing faults.
- Disaster Recovery PlanningAnimatedWriting the plan for recovery.
- Recovery Time Objective (RTO)AnimatedThe maximum acceptable time to restore service.
- Recovery Point Objective (RPO)AnimatedThe maximum acceptable data loss, measured in time.
- Mean Time To Recovery (MTTR)AnimatedAverage time to restore service after a failure.
- Mean Time Between Failures (MTBF)AnimatedAverage time between failures.
- Reliability EngineeringAnimatedApplying engineering to keep systems reliable.
- Error BudgetsAnimatedThe allowed amount of unreliability.
- Service Level Agreements (SLA)AnimatedA contract promising a level of service.
- Service Level Objectives (SLO)AnimatedAn internal target for service quality.
13Security Architecture
Identity, encryption and defence in depth.
- Security FundamentalsAnimatedThe core goals: confidentiality, integrity, availability.
- AuthenticationAnimatedProving who you are.
- AuthorisationAnimatedDeciding what you may do.
- Identity and Access Management (IAM)AnimatedManaging identities and what they can access.
- Role-Based Access Control (RBAC)AnimatedPermissions assigned through roles.
- Attribute-Based Access Control (ABAC)AnimatedPermissions from attributes and policies.
- OAuth 2.0AnimatedDelegating limited access without sharing passwords.
- OpenID Connect (OIDC)AnimatedAn identity layer on top of OAuth 2.0.
- JSON Web Tokens (JWT)AnimatedA signed token carrying claims.
- Session-Based AuthenticationAnimatedThe server keeps a session and gives a cookie.
- Multi-Factor Authentication (MFA)AnimatedTwo or more proofs of identity.
- Single Sign-On (SSO)AnimatedLog in once to access many apps.
- Zero Trust ArchitectureAnimatedNever trust, always verify.
- End-to-End EncryptionAnimatedOnly the endpoints can read the data.
- Symmetric EncryptionAnimatedOne shared key encrypts and decrypts.
- Asymmetric EncryptionAnimatedA public key encrypts; a private key decrypts.
- Public Key Infrastructure (PKI)AnimatedThe system that issues and verifies certificates.
- TLS HandshakeAnimatedHow client and server set up an encrypted session.
- Secrets ManagementAnimatedStoring keys and passwords safely.
- Key ManagementAnimatedCreating, storing and rotating encryption keys.
- SQL Injection PreventionAnimatedStop attackers inserting SQL through input.
- Cross-Site Scripting (XSS)AnimatedAttackers run script in other users' browsers.
- Cross-Site Request Forgery (CSRF)AnimatedTricking a logged-in browser into sending a request.
- Distributed Denial of Service (DDoS) ProtectionAnimatedSurviving floods of malicious traffic.
- Web Application Firewall (WAF)AnimatedFilters malicious HTTP requests.
- Network SegmentationAnimatedDividing the network into isolated zones.
- Data PrivacyAnimatedProtecting personal data and respecting rights.
- Encryption at RestAnimatedEncrypting stored data.
- Encryption in TransitAnimatedEncrypting data moving over networks.
- Threat ModellingAnimatedFinding threats before attackers do.
14Cloud Architecture
Renting infrastructure: service models, containers and regions.
- Cloud Computing FundamentalsAnimatedRenting computing resources over the internet.
- Infrastructure as a Service (IaaS)AnimatedRent virtual machines, storage and networks.
- Platform as a Service (PaaS)AnimatedA managed platform to run your code.
- Software as a Service (SaaS)AnimatedReady-made software delivered online.
- Function as a Service (FaaS)AnimatedRun individual functions on demand.
- Public CloudAnimatedShared infrastructure operated by a provider.
- Private CloudAnimatedCloud infrastructure for one organisation.
- Hybrid CloudAnimatedPrivate and public clouds working together.
- Multi-Cloud ArchitectureAnimatedUsing several cloud providers.
- Cloud NetworkingAnimatedVirtual networks in the cloud.
- Virtual MachinesAnimatedSoftware-defined computers.
- VirtualisationAnimatedRunning multiple virtual systems on one machine.
- ContainersAnimatedLightweight isolated processes sharing the host kernel.
- DockerAnimatedThe most popular container tool.
- KubernetesAnimatedA system that runs and manages containers at scale.
- Container OrchestrationAnimatedAutomating deployment, scaling and healing of containers.
- Serverless ComputingAnimatedRun code without managing servers.
- Cloud StorageAnimatedDurable storage as a service.
- Object StorageAnimatedStore files as objects with keys and metadata.
- Block StorageAnimatedRaw volumes attached to servers.
- File StorageAnimatedShared network file systems.
- Cloud DatabasesAnimatedManaged database services.
- Cloud Load BalancingAnimatedManaged traffic distribution.
- Cloud Auto ScalingAnimatedManaged scaling groups.
- Infrastructure as Code (IaC)AnimatedDescribing infrastructure in code.
- TerraformAnimatedA popular tool for IaC across clouds.
- Cloud SecurityAnimatedProtecting cloud workloads.
- Cloud Cost OptimisationAnimatedReducing cloud spending.
- Edge ComputingAnimatedProcessing data near users.
- Multi-Region ArchitectureAnimatedRunning across several geographic regions.
15Software Design Patterns
Reusable object designs, from Singleton to Service Layer.
- Singleton PatternOne instance only, with a global access point.
- Factory PatternA method that creates objects for you.
- Abstract Factory PatternCreate families of related objects.
- Builder PatternBuild a complex object step by step.
- Prototype PatternCreate objects by copying existing ones.
- Adapter PatternMake one interface work as another.
- Bridge PatternSeparate an abstraction from its implementation.
- Composite PatternTreat single items and groups the same way.
- Decorator PatternAdd behaviour by wrapping an object.
- Facade PatternA simple front for a complex subsystem.
- Flyweight PatternShare common data to save memory.
- Proxy PatternAnimatedA stand-in that controls access to another object.
- Chain of Responsibility PatternPass a request along handlers until one handles it.
- Command PatternTurn a request into an object.
- Interpreter PatternEvaluate sentences of a small language.
- Iterator PatternWalk through a collection without exposing it.
- Mediator PatternObjects talk through a mediator, not directly.
- Memento PatternSave and restore an object's state.
- Observer PatternAnimatedNotify dependants when something changes.
- State PatternChange behaviour when the state changes.
- Strategy PatternSwap algorithms at runtime.
- Template Method PatternFix the skeleton, let subclasses fill in steps.
- Visitor PatternAdd operations without changing the classes.
- Repository PatternA collection-like interface to data storage.
- Unit of Work PatternTrack changes and save them together.
- Dependency InjectionPass dependencies in instead of creating them.
- Dependency InversionAnimatedDepend on abstractions, not concrete classes.
- Specification PatternReusable business rules as objects.
- Data Mapper PatternMoves data between objects and the database.
- Service Layer PatternA layer that defines the application's operations.
16Performance Engineering
Measuring, testing and tuning for speed.
- Performance BenchmarkingAnimatedMeasuring how fast a system is under defined conditions.
- Load TestingAnimatedTesting under expected traffic.
- Stress TestingAnimatedPushing beyond limits to find the breaking point.
- Spike TestingAnimatedSudden jumps in load.
- Endurance TestingAnimatedRunning for a long time.
- Scalability TestingAnimatedChecking how performance changes as you add resources.
- Latency OptimisationAnimatedMaking requests faster.
- Throughput OptimisationAnimatedHandling more work per second.
- CPU ProfilingAnimatedFinding where CPU time goes.
- Memory ProfilingAnimatedFinding what uses memory.
- Network ProfilingAnimatedMeasuring network behaviour.
- Database Query ProfilingAnimatedFinding slow queries.
- Memory ManagementAnimatedHow programs allocate and free memory.
- Garbage CollectionAnimatedAutomatic reclaiming of unused memory.
- Connection Pool OptimisationAnimatedSizing and tuning pools.
- Thread Pool ManagementAnimatedLimiting concurrent threads.
- Asynchronous ProgrammingAnimatedDo other work while waiting.
- Concurrent ProgrammingAnimatedMultiple tasks in progress at once.
- Parallel ProcessingAnimatedDoing work simultaneously on many cores or machines.
- Resource UtilisationAnimatedHow much of CPU, memory, disk and network is used.
- Lock ContentionAnimatedThreads waiting on the same lock.
- Race ConditionsAnimatedResults depend on timing.
- Deadlock PreventionAnimatedAvoid circular waits.
- Memory LeaksAnimatedMemory that is never released.
- Performance Regression TestingAnimatedCatching slowdowns before release.
17Observability and Monitoring
Seeing inside a running system.
- Observability FundamentalsAnimatedUnderstanding system state from its outputs.
- Application MonitoringAnimatedWatching the health of the application.
- Infrastructure MonitoringAnimatedWatching servers, containers and networks.
- Centralised LoggingAnimatedCollecting all logs in one place.
- Structured LoggingAnimatedLogs as machine-readable fields.
- Distributed TracingAnimatedFollowing one request across services.
- Metrics CollectionAnimatedNumbers measured over time.
- Log AggregationAnimatedCollecting logs from all sources.
- OpenTelemetryAnimatedAn open standard for traces, metrics and logs.
- PrometheusAnimatedA time-series metrics system with pull-based scraping.
- GrafanaAnimatedDashboards for metrics, logs and traces.
- ELK StackAnimatedElasticsearch, Logstash and Kibana for logs.
- Alert ManagementAnimatedNotifying people about real problems.
- Health ChecksAnimatedRegularly testing whether servers are working.
- Application Performance Monitoring (APM)AnimatedEnd-to-end monitoring of application performance.
- Request TracingAnimatedFollowing one request through the system.
- Correlation IDsAnimatedA shared id tying together all logs of a request.
- Root Cause AnalysisAnimatedFinding the underlying cause of an incident.
- Error TrackingAnimatedCapturing and grouping application errors.
- Real-Time DashboardsAnimatedLive views of system and business metrics.
18Advanced Distributed Architecture
Planet-scale designs: geo-replication, CRDTs and workflows.
- Global Distributed SystemsAnimatedSystems serving users worldwide.
- Multi-Region DeploymentAnimatedRunning the same service in several regions.
- Multi-Cloud DeploymentAnimatedDeploying across cloud providers.
- Geo-ReplicationAnimatedCopying data across regions.
- Geo-PartitioningAnimatedKeeping each user's data in their region.
- Distributed ConsensusAnimatedAgreement across nodes.
- Byzantine Fault-Tolerant SystemsAnimatedSystems tolerating malicious nodes.
- Distributed Transaction ProcessingAnimatedTransactions across many nodes.
- Distributed Lock ManagersAnimatedServices granting locks across nodes.
- Leader-Follower ReplicationAnimatedOne node accepts writes; followers copy.
- Multi-Leader ReplicationAnimatedSeveral nodes accept writes.
- Leaderless ReplicationAnimatedAny replica accepts reads and writes.
- Conflict-Free Replicated Data Types (CRDTs)AnimatedData that merges automatically.
- Distributed Graph ProcessingAnimatedAnalysing huge graphs across machines.
- Distributed Workflow EnginesAnimatedCoordinating long-running multi-step processes.
- Workflow OrchestrationAnimatedControlling the order of tasks.
- Eventual Consistency at ScaleAnimatedReplicas converge, with explicit handling of anomalies.
- Globally Distributed DatabasesAnimatedDatabases spanning the globe.
- Quorum-Based SystemsAnimatedSystems that rely on majority agreement.
- Conflict ResolutionAnimatedHandling concurrent updates to the same data.
- Data LocalityAnimatedKeeping data close to where it is used.
- Edge-Cloud ArchitectureAnimatedEdge nodes backed by a central cloud.
- Federated ArchitectureAnimatedIndependent systems cooperating without central control.
- Service Mesh ArchitectureAnimatedA mesh of sidecar proxies managing service traffic.
- Resilient Distributed ArchitectureAnimatedDesigning for failure at every layer.
19AI System Design and LLM Infrastructure
Serving, training and orchestrating AI at scale.
- AI System ArchitectureAnimatedHow the parts of an AI product fit together.
- Machine Learning System DesignAnimatedDesigning the end-to-end system around an ML model.
- ML Model Serving ArchitectureAnimatedServing predictions at scale.
- Model Training InfrastructureAnimatedThe systems that train models.
- Distributed Model TrainingAnimatedTraining across many machines.
- GPU Resource SchedulingAnimatedSharing GPUs fairly and efficiently.
- GPU Memory ManagementAnimatedFitting models and caches into GPU memory.
- Model ParallelismAnimatedSplitting a model across devices.
- Data ParallelismAnimatedSame model on each device, different data.
- Pipeline ParallelismAnimatedLayers split into stages across devices.
- Tensor ParallelismAnimatedSplit individual layers across devices.
- Distributed InferenceAnimatedServing a model across several devices or nodes.
- LLM Inference ArchitectureAnimatedHow an LLM serves requests.
- Continuous BatchingAnimatedAdd and remove requests from the batch every step.
- Paged AttentionAnimatedManage the KV cache in fixed-size blocks.
- KV Cache ManagementAnimatedStoring keys and values of earlier tokens.
- Speculative DecodingAnimatedA small model drafts, a big model verifies.
- QuantisationUsing fewer bits for weights.
- Model ShardingAnimatedSplitting model weights across devices.
- Model RoutingAnimatedSend each request to the best model.
- Mixture of Experts (MoE)AnimatedA model with many expert sub-networks, using a few per token.
- Retrieval-Augmented Generation (RAG) ArchitectureAnimatedGive the model fresh, relevant documents before it answers.
- Vector Database ArchitectureAnimatedStorage for embeddings with similarity search.
- Embedding Generation PipelinesAnimatedTurning data into vectors at scale.
- Semantic Search ArchitectureAnimatedSearch by meaning instead of keywords.
- Hybrid SearchAnimatedCombine keyword and vector search.
- Reranking ArchitectureAnimatedA second pass that reorders results.
- AI Agent ArchitectureAnimatedA model that plans, uses tools and observes results.
- Multi-Agent OrchestrationAnimatedSeveral agents working together.
- Agent Memory ArchitectureAnimatedShort and long-term memory for agents.
- Tool Calling ArchitectureAnimatedThe model asks the system to run functions.
- Context ManagementAnimatedChoosing what goes into the model's limited window.
- Prompt ManagementAnimatedVersioning and testing prompts.
- LLM ObservabilityAnimatedSeeing what an LLM application does.
- LLM Evaluation FrameworksAnimatedMeasuring the quality of LLM output.
- Guardrails and Content FilteringAnimatedChecks on inputs and outputs.
- AI Model VersioningAnimatedTracking model versions.
- Feature StoresAnimatedOne place for ML features.
- Model MonitoringAnimatedWatching a model after deployment.
- MLOps ArchitectureAnimatedDevOps practices for machine learning.
20System Design Case Studies
Whole systems, designed from scratch.
- URL Shortener (Bitly)AnimatedTurn long links into short codes and redirect.
- Social Media Platform (Instagram)AnimatedPhoto sharing with feeds and follows.
- Video Streaming Platform (YouTube)AnimatedUpload, transcode and stream video globally.
- Messaging Application (WhatsApp)AnimatedReal-time one-to-one and group messaging.
- Ride-Hailing Platform (Uber)AnimatedMatch riders with nearby drivers in real time.
- E-Commerce Platform (Amazon)AnimatedCatalogue, cart, checkout and fulfilment.
- Music Streaming Platform (Spotify)AnimatedStream audio and recommend music.
- Search Engine (Google)AnimatedCrawl, index and rank the web.
- Cloud Storage System (Google Drive)AnimatedStore and sync files across devices.
- Real-Time Collaboration Platform (Google Docs)AnimatedMany people edit the same document live.
- Food Delivery Platform (DoorDash)AnimatedOrders, restaurants and couriers.
- Online Payment Gateway (Stripe)AnimatedTake payments reliably.
- Hotel and Flight Booking SystemAnimatedSearch and reserve limited inventory.
- Ticket Booking PlatformAnimatedSell limited seats under heavy demand.
- Notification Delivery SystemAnimatedSend push, email and SMS reliably.
- Distributed Chat ApplicationAnimatedChat rooms across many servers.
- News Feed Generation SystemAnimatedBuild a personalised feed.
- Online Gaming BackendAnimatedReal-time game state for many players.
- Recommendation EngineAnimatedSuggest items users may like.
- Real-Time Analytics PlatformAnimatedAggregate events as they happen.
- Distributed File Storage SystemAnimatedStore huge files across many machines.
- Search Autocomplete SystemAnimatedSuggest completions as the user types.
- API Rate LimiterAnimatedLimit how often clients can call.
- Web CrawlerAnimatedFetch pages across the web politely.
- Distributed Task SchedulerAnimatedRun jobs at the right time, reliably.
- Cloud-Based Code Execution PlatformAnimatedRun untrusted user code safely.
- AI Chatbot PlatformAnimatedA chatbot service with retrieval, memory and safety.
- Large-Scale Vector Search EngineAnimatedSimilarity search over billions of vectors.
- LLM Inference PlatformAnimatedServe LLMs to many users efficiently.
- Autonomous Multi-Agent PlatformAnimatedRun teams of agents safely at scale.