Learn Software Architecture

Eleven modules from what architecture is to observability. Every lesson answers the same eight questions — what it solves, when to use it, when to avoid it, the tradeoffs, how it fails, how it scales, how data moves, and how it talks to databases, queues, caches and external systems — and carries an interactive.

Architecture Fundamentals

What architecture is — components, boundaries, dependencies, data flow, failure domains — and how a system evolves from browser → backend → database.

Application Architecture

Monolith, modular monolith, microservices: what each solves, what each costs, and the decision between them.

Code Architecture

Layered, Clean and Hexagonal: dependency direction, domain isolation, and when the abstraction stops paying for itself.

Events & Messaging

Event-driven architecture, queues, Kafka-style logs, and the sync-vs-async decision — with duplicates, ordering and replay taken seriously.

APIs & Gateways

REST, GraphQL, RPC/gRPC, WebSockets, webhooks — which to expose to whom — and what belongs in an API gateway.

Scaling & Caching

Load balancing, stateless services, cache layers, CDNs, horizontal vs vertical — and scaling a system one real problem at a time.

Load Balancing
▶ interactive

A load balancer turns N servers into one address so capacity and availability stop depending on a single machine — and the algorithm, the health check and the balancer’s own redundancy each decide whether it helps or hurts under load.

Stateless vs Stateful Services
▶ interactive

A stateless service keeps nothing between requests that another instance would need, so any instance can serve any request and instances become disposable; the state does not vanish — it moves to Redis or the database, and that extra hop and new dependency are the price of horizontal scaling.

Caching Architecture
▶ interactive

Caches sit at five distances from the user — browser, CDN, in-process, distributed, database buffer — each one trading freshness for latency and load, and the architecture questions are which layer answers which read, how a key expires, and what happens when thousands of requests miss at once.

CDN Architecture
▶ interactive

A CDN puts copies of responses in hundreds of edge locations so a user in Frankfurt gets bytes from Frankfurt instead of Virginia — beating the speed of light by not crossing the ocean — and the design questions are what the cache key is, how the origin is protected from misses, and how a change reaches every edge.

Horizontal vs Vertical Scaling
▶ interactive

Vertical scaling makes one machine bigger and adds no new failure modes until it hits the largest instance; horizontal scaling adds machines without limit and adds coordination — and stateless tiers scale out cheaply while databases pay for every rung.

Scale This System
▶ interactive

Start with one server and one database and add exactly one component per measured problem — load balancer, cache and replicas, sharding decisions, CDN, queue and workers — noting at every step the symptom that forced it and the new problem it introduced, until the diagram every system-design answer draws has been earned box by box.

Async Processing

Background jobs, workers, idempotency under retries, and backpressure when producers outrun consumers.

Distributed Data

Why one transaction cannot span services: sagas, compensation, CQRS and event sourcing — and why most apps need none of them.

Reliability

Retry, backoff, timeouts, circuit breakers, bulkheads, rate limiting, graceful degradation, and the arithmetic of nines.

Distributed Systems

Consistent hashing, service discovery, partitions and CAP without slogans.

Observability

Logs, metrics and traces; following one request across services and finding where the time went.