Animated Architecture Patterns

Architecture patterns, animated.

Self-explaining, looping diagrams of architecture styles, cloud design patterns, auth flows, the classic GoF design patterns and the algorithms underneath them, for solutions architects and developers. Pick a pattern, press play, or step through it one frame of the story at a time.

  • 206 animated
  • 0 planned
  • 17 categories

Application Architecture

The big-picture shapes: how a system is split into parts and how those parts talk to each other.

Cloud Infrastructure

Where workloads run, and how they scale, stay available and recover from disaster.

Identity & Access (Auth)

Authentication and authorization flows: who is calling, and what they are allowed to do.

OAuth 2.0 Authorization Code + PKCE

The standard sign-in flow for web, mobile and single-page apps: code via the browser, tokens via the back channel.

OpenID Connect (OIDC)

An ID token on top of OAuth 2.0 tells the app who signed in.

OAuth 2.0 Client Credentials

Machine-to-machine access tokens, with no user involved.

JWT Validation

APIs verify token signatures and claims locally, using the issuer's cached public keys (JWKS).

Refresh Token Rotation

Short-lived access tokens, single-use refresh tokens, and reuse detection that revokes the whole family.

Sessions vs Tokens

Server-side sessions versus self-contained tokens: where the state lives and how you revoke it.

Token Exchange (On-Behalf-Of)

Swap an incoming user token for a narrowly scoped one before calling a downstream API.

Device Authorization Grant

Sign in on a TV or CLI by approving a short code on your phone.

SAML 2.0 Single Sign-On

Enterprise SSO: the identity provider posts a signed assertion to the app through the browser.

Federated Identity

Let an external identity provider authenticate users; the application trusts its tokens.

Mutual TLS (mTLS)

Client and server both present certificates, so every connection is authenticated both ways.

Valet Key

Give clients a short-lived, narrowly scoped URL to read or write storage directly.

Gatekeeper

A hardened broker validates and sanitises requests before they reach trusted hosts.

Policy-Based Authorization

Services ask a central policy engine for allow/deny decisions (RBAC, ABAC, ReBAC).

Zero Trust Access

No implicit trust from network location: verify identity, device and context on every request.

API & Edge

The front door: how clients reach services, and where cross-cutting concerns live.

Messaging & Integration

Asynchronous communication, and coordinating work that spans several services.

Data Management

Storing, scaling, caching and synchronising data across services.

Database Internals & Performance

How databases find, store and protect data: indexes, query plans, transactions and storage engines, and how to use them well.

B-Tree Index

How a B-tree index finds a row in three or four page reads, serves ranges in order, and what every insert costs to keep it sorted.

Composite Index

A multi-column index serves queries that use its leading columns: put equality columns first and the range or sort column last.

Covering Index

Answer a query from the index alone: include the columns it selects, so the table is never read, and the scan is index-only.

Index Types

Beyond B-trees: hash, GIN for arrays, JSON and text, GiST, BRIN for time-ordered data, and partial and expression indexes.

Query Execution Plans

Read EXPLAIN the way the planner thinks: scans, joins, estimated against actual rows, and the statistics behind each choice.

Join Algorithms

Nested loop, hash join and merge join: how each joins two tables, what it costs, and when the planner picks it.

N+1 Queries

One query for a list, then one more for every row: how ORMs fall into it, how to spot it, and how batching or a join fixes it.

Keyset Pagination

Page with WHERE key > last seen instead of OFFSET, so page 1,000 is as fast as page 1 and no row repeats or goes missing.

Normalization & Denormalization

Store each fact once to keep data consistent, then copy some on purpose where reads must be fast, and keep the copies in step.

Transaction Isolation Levels

What concurrent transactions can see of each other: the anomalies each isolation level allows and the defaults engines use.

MVCC

Multi-version concurrency control: an update writes a new row version, readers see a snapshot, and vacuum removes dead versions.

Locks & Deadlocks

Row locks make writers wait for each other; two transactions waiting on each other is a deadlock, and the database aborts one.

Optimistic Concurrency Control

Update a row only if it is unchanged since you read it, using a version column, and retry on conflict instead of holding locks.

Write-Ahead Log

Log each change before applying it, so a commit survives a crash, recovery replays the log, and replicas and backups follow it.

LSM Tree vs B-Tree

Two storage engine designs: update pages in place, or append in memory and merge sorted files, and what each costs to read and write.

Row vs Column Storage

Store rows together for transactions or columns together for analytics, and why a column store scans and compresses so much faster.

Connection Pooling

Share a few database connections among many requests, so connection setup and per-connection memory stop limiting the database.

Table Partitioning

Split a large table into partitions by range, list or hash, so queries skip partitions and old data is dropped in an instant.

Resilience & Reliability

Keep serving when dependencies are slow, overloaded or down.

Deployment & Release

Ship changes safely, watch them in production, and roll back fast.

Migration & Modernization

Evolve legacy systems step by step, without a big-bang rewrite.

Observability & Operations

See what the system is doing, and why, when something goes wrong.

DevOps & SRE Principles

How teams ship changes often and keep production reliable: the principles, measures and practices behind DevOps and site reliability engineering.

The Three Ways

DevOps in three principles: speed the flow of work to customers, amplify feedback back to the team, and keep learning.

DORA Metrics

Measure software delivery by throughput and stability: how often and how fast changes reach production, and how often they fail.

Continuous Delivery

Keep every change releasable: a deployment pipeline builds once, tests in stages and promotes the same artifact to production.

Trunk-Based Development

Everyone merges small changes into one main branch at least daily; feature flags hide unfinished work instead of long branches.

You Build It, You Run It

The team that builds a service runs it in production, on call, so the people who can fix a problem hear about it first.

Golden Signals, RED & USE

What to measure and alert on: latency, traffic, errors and saturation, RED for request-driven services and USE for resources.

Eliminating Toil

Find the manual, repetitive operations work that grows with the system, measure it, cap it and automate it away.

Incident Management

A practised response when production breaks: declare early, assign roles, mitigate first and keep everyone informed.

Blameless Postmortems

Learn from every incident without blame: a timeline, the contributing factors and tracked action items, shared widely.

SPACE & DevEx

Measure developer productivity without counting code: surveys and system data on satisfaction, flow, feedback loops and cognitive load.

Value Stream Mapping

Draw how a change travels from idea to customer, compare the time spent working with the time spent waiting, and remove the biggest wait.

CALMS

A lens for assessing a DevOps adoption: culture, automation, lean, measurement and sharing, and the dimension that holds the others back.

Testing Pyramid

Many fast unit tests, fewer integration and contract tests, a few end-to-end tests: feedback stays fast and failures point at the cause.

ITIL 4

IT service management with ITIL 4: the service value system, guiding principles and change enablement that work with DevOps, not against it.

Platform Engineering

Design principles and frameworks for the internal platform: how to build it, organise teams around it and keep it secure, well-architected and affordable.

Algorithms & Data Structures

The must-know fundamentals: how code searches, sorts, recurses and walks graphs, and what each costs as data grows.

Big-O Notation

How an algorithm's cost grows with its input: O(1), O(log n), O(n), O(n log n) and O(n²) side by side as n grows.

Recursion & the Call Stack

A function calls itself on a smaller input; each call waits on the stack until a base case returns and the answers unwind.

Binary Search

Halve a sorted range with every check: about 20 steps find one item among a million, where a scan may need a million.

Bubble, Selection & Insertion Sort

The three simple O(n²) sorts compared, and why insertion sort still runs inside fast library sorts on short runs.

Merge Sort

Split the list until single items remain, then merge sorted halves back together: O(n log n) every time, and stable.

Quicksort

Partition around a pivot, smaller values left and larger right, then sort each side: fast in place, O(n²) when pivots are bad.

Binary Heap & Heapsort

A complete binary tree packed into an array keeps the smallest item on top: O(log n) push and pop, the classic priority queue.

Hash Table

Hash each key straight to a bucket for O(1) average lookups; colliding keys share a bucket, and the table grows as it fills.

Binary Search Tree

Smaller keys left, larger right: O(log n) search and insert while the tree stays balanced, O(n) once it degrades into a list.

Two Pointers

Move two indices through an array, toward each other or one chasing the other, to solve pair and partition problems in one pass.

Sliding Window

Slide a window along a sequence, adding the item that enters and dropping the one that leaves, instead of re-scanning each window.

Breadth-First Search

Explore a graph level by level from a queue; the first time BFS reaches a node, it has found a path with the fewest edges.

Depth-First Search

Follow one path as deep as it goes, then backtrack; a stack or recursion remembers where to resume, and finds cycles too.

Topological Sort

Order tasks so every dependency comes before what needs it, as build tools and package managers do; a cycle makes it impossible.

Dijkstra's Shortest Path

Settle the closest unsettled node, relax its edges, repeat: shortest paths from one source when no edge weight is negative.

Greedy Algorithms

Take the choice that looks best right now and never revisit it: optimal for some problems, quietly wrong for others.

Dynamic Programming

Solve each overlapping subproblem once and reuse its answer, top-down with memoization or bottom-up with a table.

Backtracking

Build a solution one choice at a time and undo any choice that hits a dead end: N-Queens, sudoku, permutations.

Design Patterns (GoF)

The 23 classic object-oriented patterns from the Gang of Four: how objects are created, composed and made to work together.

Abstract Factory

Create families of related objects through one interface, so swapping the whole family never touches client code.

Builder

Assemble a complex object step by step and validate it once at the end, instead of calling a constructor with ten arguments.

Factory Method

Let subclasses decide which class to create: the base class codes against an interface and calls an overridable create method.

Prototype

Create new objects by copying a configured prototype instead of building them from scratch, and know when a copy must go deep.

Singleton

Guarantee one instance with a global access point, and why injecting one shared instance usually serves that need better.

Adapter

Wrap an incompatible interface so existing code can use it unchanged: the classic fix for a third-party or legacy API.

Bridge

Split an abstraction from its implementation so both vary independently: m shapes and n renderers need m + n classes, not m × n.

Composite

Treat single objects and groups of objects through one interface, so a whole tree answers a question the way one leaf does.

Decorator

Wrap an object to add behaviour at runtime, stacking wrappers instead of multiplying subclasses for every combination.

Facade

Give a complex subsystem one simple entry point, so callers make one call instead of orchestrating many classes.

Flyweight

Share the common, immutable part of many similar objects and keep only what differs in each one, to cut memory.

Proxy

Stand in for another object with the same interface to control access to it: lazy loading, caching, access checks, remoting.

Chain of Responsibility

Pass a request along a chain of handlers until one handles it, so the sender never needs to know which one will.

Command

Turn a request into an object that can be queued, logged, undone and redone, decoupling who asks from who acts.

Interpreter

Represent a small language's grammar as classes and evaluate a sentence by walking its syntax tree.

Iterator

Walk a collection one element at a time without exposing how it is stored: an array, a tree or a stream that never ends.

Mediator

Route the interactions between objects through one mediator, so many-to-many dependencies become one-to-many.

Memento

Capture an object's state in a snapshot only it can read, so it can be restored later without breaking encapsulation.

Observer

A subject notifies its subscribed observers of every change, so one change updates many dependents it never names.

State

Let an object change its behaviour when its state changes by delegating to state objects instead of growing switch statements.

Strategy

Put interchangeable algorithms behind one interface and choose one at runtime, instead of branching inside the caller.

Template Method

Fix an algorithm's skeleton in a base class and let subclasses fill in individual steps, without changing their order.

Visitor

Add new operations to a stable set of classes without editing them: each operation is a visitor that every element accepts.

System Components

The off-the-shelf building blocks of real systems: how each one works inside, where it sits in a solution and when to choose it.

System Map

One request and one event through a typical system: DNS, CDN, load balancer, gateway, services, cache, database, queue and search.

Apache Kafka

A partitioned, replicated commit log: producers append events, consumer groups read at their own pace and can replay history.

RabbitMQ

A message broker: exchanges route each message into queues, and a consumer holds it until it acknowledges or rejects it.

Redis & Valkey

An in-memory data-structure server: cache, session store, rate limiter, leaderboard and lightweight queue in one process.

PostgreSQL

A relational database: ACID transactions with MVCC, a write-ahead log for durability and replication, SQL and rich indexes.

MongoDB

A document database: JSON-like documents with flexible schemas, replica sets for failover and sharding to scale out.

Apache Cassandra

A wide-column database built for heavy writes across data centres: a token ring, tunable consistency and LSM storage.

Elasticsearch & OpenSearch

Search engines built on inverted indexes: full-text queries ranked by relevance, and aggregations over sharded indexes.

NGINX

A reverse proxy and web server: TLS termination, load balancing, caching and rate limiting in front of applications.

Docker & Containers

Package an app and its dependencies as an image and run it as an isolated process: layers, registries, namespaces, cgroups.

Kubernetes

A container orchestrator: you declare the desired state, and controllers keep pods scheduled, healthy and reachable.

etcd

A strongly consistent key-value store on Raft that clusters use for configuration, service discovery, locks and leader election.

Prometheus & Grafana

Pull-based monitoring: scrape metrics into a time-series database, query them with PromQL, alert, and chart them in Grafana.

HashiCorp Vault

A secrets manager: authenticate workloads, hand out short-lived credentials, encrypt data and audit every access.

Keycloak

An open-source identity provider: user sign-in, federation and single sign-on, issuing OpenID Connect and SAML tokens.

Apache Flink

A stream processor: stateful operators over unbounded streams, with event time, windows and exactly-once checkpoints.

AWS Services

Amazon Web Services' managed building blocks: how each service works, what it takes off your hands and how services combine into solutions.

Amazon VPC

Your private network in AWS: subnets in each Availability Zone, route tables, gateways, security groups and endpoints.

Amazon S3

Object storage: objects in buckets, addressed by key, stored across Availability Zones, with storage classes, versioning and events.

Amazon SQS

A managed message queue: consumers poll, a visibility timeout hides messages in flight, and repeated failures go to a dead-letter queue.

Amazon SNS

Managed publish-subscribe: a message published to a topic fans out to queues, functions, HTTP endpoints, email and SMS.

Amazon EventBridge

An event bus: rules match events from AWS services, SaaS apps and your own code by content and route them to targets.

Amazon Kinesis Data Streams

Managed streaming: records go to shards by partition key, and consumers read each shard in order and can replay it.

Amazon DynamoDB

A serverless key-value and document database: the partition key spreads items across partitions for single-digit-millisecond reads.

Amazon RDS & Aurora

Managed relational databases: backups, Multi-AZ failover and read replicas, and Aurora's storage shared across three zones.

AWS Lambda

Functions as a service: code runs per event in managed execution environments that scale out with concurrency.

AWS Step Functions

Workflows as state machines: sequence, branch, retry, wait and run in parallel across services, with every step recorded.

Amazon ECS & Fargate

Run containers on AWS: task definitions, services that keep tasks running behind a load balancer, on EC2 or serverless Fargate.

Amazon Route 53

Managed DNS: hosted zones, routing policies (weighted, latency, failover, geolocation) and health checks.

AWS IAM

Who may do what in AWS: principals, policies and roles that hand out temporary credentials, and how a request is evaluated.

Amazon Cognito

Sign-up and sign-in for your app's users: user pools issue OpenID Connect tokens, identity pools trade them for AWS credentials.

Amazon CloudWatch

Metrics, logs, alarms and dashboards for AWS resources and your applications, in one monitoring service.