8 min read
Database Sharding: When One Postgres Stops Working
A decision guide for when database sharding pays off, the failure modes that push you to it, and how to shard without breaking SQL joins and transactions.

Notes on building web applications: Next.js, Laravel, databases, and the automation around them.
8 min read
A decision guide for when database sharding pays off, the failure modes that push you to it, and how to shard without breaking SQL joins and transactions.

7 min read
Pick integer, UUID, or UUIDv7 primary keys using index size and write-rate thresholds, plus a reproducible test that shows how random UUIDs bloat B-trees.

5 min read
Choose API pagination by data size and write pattern. Use keyset past 10k rows or high write rate; offset is fine for small, static datasets.

9 min read
Dead tuples silently slow your queries. Learn when VACUUM FULL, pg_repack, or PostgreSQL 19's REPACK CONCURRENTLY is the right fix for your workload.

9 min read
Controller fat, service thin is backwards. A threshold-based rule for choosing Laravel design patterns, plus a five-command audit of any pattern.

7 min read
Chained array methods allocate intermediate arrays on every call. See where the cost flips, how to measure it, and when a plain loop wins.
