# Backend Depth Resources

## Knowledge

### PostgreSQL internals / indexing
- [Use The Index, Luke!](https://use-the-index-luke.com/)
  The canonical practitioner guide to SQL indexing — how B-tree indexes actually work, composite indexes, index-only scans. Use for: any "why didn't my index get used" question.
- [PostgreSQL Docs: Indexes](https://www.postgresql.org/docs/current/indexes.html)
  Primary source, authoritative on index types (btree, hash, GiST, GIN) and when Postgres picks each. Use for: verifying any claim about Postgres-specific behavior.
- [The Internals of PostgreSQL — Hironobu Suzuki](https://www.interdb.jp/pg/)
  Free, deep dive into query planning, storage, indexing, transactions, concurrency control (MVCC) at the source-code level. Use for: going past "how to use it" into "how it's actually built."

### Transactions / concurrency correctness
- [PostgreSQL Docs: Transaction Isolation](https://www.postgresql.org/docs/current/transaction-iso.html)
  Primary source on READ COMMITTED / REPEATABLE READ / SERIALIZABLE and exactly what anomalies each permits. Use for: any isolation-level question.
- [Designing Data-Intensive Applications — Martin Kleppmann, Ch. 7 "Transactions"](https://dataintensive.net/)
  Widely regarded as the best plain-English explanation of isolation levels, race conditions (lost update, write skew, phantom reads), and how real systems implement them. Use for: building the mental model before touching Postgres-specific docs.

### Caching
- [Redis Docs: Client-Side Caching / Caching Patterns](https://redis.io/docs/latest/develop/reference/patterns/)
  Practitioner-level patterns for cache-aside, stampede protection. Use for: concrete implementation techniques.
- ["Scaling Memcache at Facebook" (NSDI '13 paper)](https://www.usenix.org/conference/nsdi13/technical-sessions/presentation/nishtala)
  Real-world, battle-tested reasoning about cache stampede, leases, and invalidation at scale. Use for: understanding why naive cache-aside breaks under real traffic.

### Networking
- [High Performance Browser Networking — Ilya Grigorik](https://hpbn.co/)
  Free, focused, practitioner-oriented — TCP, TLS, HTTP/2, latency. Use for: connecting network fundamentals to actual API/latency behavior.
- [Computer Networking: A Top-Down Approach — Kurose & Ross]
  The standard academic textbook if deeper fundamentals are needed (TCP congestion control, routing). Use for: filling gaps HPBN doesn't cover.

### OS / processes / threads
- [Operating Systems: Three Easy Pieces (OSTEP)](https://pages.cs.wisc.edu/~remzi/OSTEP/)
  Free, canonical, widely used in top CS programs. Covers processes, threads, scheduling, virtual memory, concurrency primitives. Use for: the whole OS/processes/threads phase of the curriculum.

### Python concurrency / runtime
- [Python Docs: `asyncio`](https://docs.python.org/3/library/asyncio.html) and [`threading`](https://docs.python.org/3/library/threading.html)
  Primary source for exact semantics. Use for: verifying behavior claims.
- [David Beazley — "Understanding the Python GIL" (talk + slides)](http://www.dabeaz.com/GIL/)
  The reference explanation of what the GIL actually does and doesn't protect. Use for: the concurrency-model phase.

### Distributed systems / failure models
- [Designing Data-Intensive Applications — Martin Kleppmann]
  Also the best single source for replication, partitioning, consensus, and failure modes. Use for: the whole distributed-systems phase.
- [MIT 6.824: Distributed Systems](https://pdos.csail.mit.edu/6.824/)
  Free lecture videos + primary papers (Raft, MapReduce, etc). Use for: going deeper than DDIA on consensus and fault tolerance.

## Wisdom (Communities)

- [r/ExperiencedDevs](https://reddit.com/r/ExperiencedDevs)
  Higher signal-to-noise than general programming subs, real production war stories. Use for: sanity-checking debugging/incident reasoning against real cases.
- [r/PostgreSQL](https://reddit.com/r/PostgreSQL)
  Use for: query-plan and indexing questions specific to Postgres versions/quirks.
- [Papers We Love](https://paperswelove.org/)
  Meetup-style community (chapters worldwide + recorded talks) discussing CS papers, including distributed systems classics. Use for: the distributed-systems phase, once fundamentals are solid.

## Gaps
- No curated resource yet for system-design-under-failure interview practice specifically (as opposed to the underlying theory). Revisit once the distributed-systems phase starts.
