techdiagrams.net

Engineering notes.

War stories and design decisions from building an architecture editor whose diagrams run.

· 7 min read ·

PostGIS deep dive: how your apps actually track location

How PostGIS turns Postgres into the engine behind ride-hailing, delivery and find-nearby: geometry vs geography, SRID 4326, the GiST index, ST_DWithin vs ST_Distance, the KNN operator, and geofencing.

postgrespostgisgeospatialdatabasessystem-design
· 6 min read ·

The four disaster-recovery tiers, on one axis

Backup & restore, pilot light, warm standby, hot standby — what each buys in RTO and RPO, what it costs, and how to choose the right tier per workload instead of per company.

distributed-systemsreliabilitycloudarchitecture
· 5 min read ·

Multi-tenancy: every model, from single-tenant to cells

The full taxonomy: single/multi/hybrid deployment, the silo-pool-bridge vocabulary, the data-layer ladder (shared tables to cells), compute tenancy, and why vertical SaaS chooses differently than horizontal.

saasarchitecturemulti-tenancydatabases
· 4 min read ·

Quorum: the childhood arithmetic that stops split-brain

Why any two majorities must overlap, what happens when the network splits 3/2, R+W>N as a dial, and the practical rules: odd cluster sizes, three failure domains, witness nodes, flexible quorums.

distributed-systemsconsensusdatabasesreplication
· 4 min read ·

Two-phase commit: how it works, and the moment it blocks

The classic protocol for atomic transactions across systems — prepare and vote, then commit. Plus the famous failure: the in-doubt participant, the latency tax, heuristic outcomes, and why modern databases run 2PC over consensus groups.

distributed-systemstransactionsdatabases
· 3 min read ·

Hot shards and hot keys: when perfect hashing can't save you

One viral key can melt one machine while fifteen shards idle. Why adding shards does nothing, and the mitigation ladder: detection, hot-key caching, key salting, bounded-load rebalancing, whale isolation.

distributed-systemsshardingscalabilitydatabases
· 4 min read ·

Every consistency model, explained with one diagram

Linearizable, sequential, causal, session guarantees, eventual and tunable quorums — what each one promises, what it costs, and why consistency is a property of the read path, not the database.

distributed-systemsconsistencydatabases
· 3 min read ·

Federated query engines: one SQL query, four databases, zero ETL

How Trino-style engines join data across Postgres, MySQL, a data lake and a SaaS API without moving it first — pushdown, connectors, and the trade-offs.

data-engineeringsqlarchitecture
· 3 min read ·

Hinted handoff: how a write succeeds while its replica is dead

The pattern that lets Cassandra and Dynamo-style stores keep accepting writes through node failures — and the read-consistency trap hiding inside it.

distributed-systemsavailabilityreplication
· 3 min read ·

mTLS without secrets: workload identity with SPIRE

How SPIFFE/SPIRE gives every service a cryptographic identity — attestation, short-lived SVIDs, and mutual TLS where neither side holds a long-lived secret.

securitymtlszero-trustinfrastructure
· 3 min read ·

Our simulation engine bans Date.now() and Math.random()

Total determinism is the load-bearing feature of techdiagrams.net — how a virtual clock and a seeded PRNG make every architecture failure replayable byte-for-byte.

simulationdistributed-systemstestingtypescript
· 3 min read ·

Raft, explained with one diagram: how clusters agree on anything

Leader election, log replication and the majority commit rule — the consensus algorithm behind etcd, Consul and CockroachDB, walked through visually.

distributed-systemsconsensusraft
· 3 min read ·

Merkle trees: how replicas find a needle of difference in a haystack of data

Why Cassandra, DynamoDB and git can compare gigabytes by exchanging kilobytes — the hash tree that powers anti-entropy repair, visually explained.

distributed-systemsdata-structuresreplication
· 3 min read ·

Our AI copilot is two AIs — and one exists to argue with the other

Why the techdiagrams.net design copilot uses a designer model and a cross-vendor judge model, and why the AI is never allowed to touch your diagram directly.

aillmarchitectureproduct
· 3 min read ·

The React bug that silently ate my users' text

Save on blur" is a contract with the DOM — and unmounting an input breaks it without telling you. A debugging story from building techdiagrams.net.

reactfrontenddebugging

Get the next post in your inbox

Engineering notes from building an architecture editor that runs — React traps, simulation internals, AI product patterns. No spam, unsubscribe anytime.