Skip to main content
ARCHOS 525 BLUEPRINT · /d/dgm_int-mongodb

MongoDB WiredTiger Internals (Document Cache, Oplog & Replica Set)

8 COMPONENTS · 7 FLOWS · UPDATED 2026-11-24
GITHUB README / PR PREVIEW CARD
[![MongoDB WiredTiger Internals (Document Cache, Oplog & Replica Set) — ArchOS Architecture](https://archos.sageideas.dev/d/dgm_int-mongodb/opengraph-image)](https://archos.sageideas.dev/d/dgm_int-mongodb)

*Interactive architecture diagram powered by [ArchOS Studio](https://archos.sageideas.dev/d/dgm_int-mongodb)*
NOTION / DOCS / CONFLUENCE EMBED
<iframe src="https://archos.sageideas.dev/embed/dgm_int-mongodb" width="100%" height="580" style="border:1px solid rgba(240,236,225,0.14);border-radius:6px;" loading="lazy" title="MongoDB WiredTiger Internals (Document Cache, Oplog & Replica Set) — Interactive in ArchOS"></iframe>
PORTABLE MERMAID SPEC (GITHUB / NOTION / RFC)
flowchart LR
  client_0["Mongo Driver"]
  eng_1["Query & Agg Engine"]
  wt_2[("WiredTiger Cache")]
  jnl_3[("Write Journal")]
  oplog_4[("Capped Oplog")]
  disk_5[("Snappy/Zstd Data")]
  sec_6[("Secondary Replicas")]
  downstream_7["Downstream & OTel"]
  client_0 -->|"1. Write · BSON"| eng_1
  eng_1 -->|"2a. Update · MVCC"| wt_2
  eng_1 -->|"2b. Sync · WAL"| jnl_3
  eng_1 -->|"2c. Append · Oplog"| oplog_4
  oplog_4 -->|"3a. Replicate · Repl"| sec_6
  wt_2 -.->|"3b. 60s · Disk"| disk_5
  sec_6 -.->|"4. Emit / · OTLP/API"| downstream_7

COMPONENT STACK (8)

  • Mongo DriverSTATELESS
    BSON CRUD + ReadConcern
  • Query & Agg EngineSTATELESS
    Plan cache + BSON executor
  • WiredTiger CacheSTATEFUL
    MVCC B-Tree + doc-level locks
  • Write JournalSTATEFUL
    Group-commit WAL
  • Capped OplogSTATEFUL
    Idempotent replication stream
  • Snappy/Zstd DataSTATEFUL
    60s fuzzy checkpoints on disk
  • Secondary ReplicasSTATEFUL
    Majority commit + election
  • Downstream & OTelSTATELESS
    Consumers, metrics & SLOs

REQUEST & DATA FLOW (7)

  1. Mongo Driver → Query & Agg Engine (Write)[BSON]
  2. Query & Agg Engine → WiredTiger Cache (Update)[MVCC]
  3. Query & Agg Engine → Write Journal (Sync)[WAL]
  4. Query & Agg Engine → Capped Oplog (Append)[Oplog]
  5. Capped Oplog → Secondary Replicas (Replicate)[Repl]
  6. WiredTiger Cache → Snappy/Zstd Data (60s)[Disk]
  7. Secondary Replicas → Downstream & OTel (Emit /)[OTLP/API]
Configure NGINX / Postgres / K8s →60-Sec L4–L7 Diagnostic →