What is running, what is in memory, and which file holds my collection?
The whole machine before we follow a write: mongod, the WiredTiger cache, the journal, the oplog and the data files.
Process, memory, disk: a request enters at the process layer, memory serves it when it can, and disk makes it permanent. Name the layer first, then diagnose inside it. The full rule is on the PostgreSQL page: name the layer first, then diagnose inside it.
The same layers as a still diagram, with every part named:
Request path
Same rule as PostgreSQL: there is no hidden state. Every file here is inspectable with ls and du while the server runs. The full version is on the PostgreSQL page.
$ ls /var/lib/mongo WiredTiger # WiredTiger version marker WiredTiger.wt # WT's own metadata: where the # last checkpoint is WiredTiger.turtle # backup copy of that metadata _mdb_catalog.wt # THE MAP: "users" = which file? collection-2-4471….wt # ← collection "users" collection-5-9912….wt # ← collection "orders" index-3-4471….wt # ← the _id index of "users": # one file per index journal/ # THE JOURNAL (write-ahead log): WiredTigerLog.0000000123 mongod.lock # lock file; a stale one means the # last shutdown was not clean sizeStorer.wt storage.bson diagnostic.data/ # metrics mongod records on itself
Same pattern as PostgreSQL: five logs, one job each, and every operational budget is a time window. The full version is on the PostgreSQL page.
Journal to checkpoint: what covers the 60-second gap
The other logs: PostgreSQL: WAL · MySQL · InnoDB: redo log and binary log · the pattern behind all five, and where they break
How do databases actually work? From one row on disk to transactions: the words you need, PostgreSQL, MySQL and MongoDB from the files up, then Redis, Cassandra and vector search, side by side, and the query and concurrency traps.