MongoDB & NoSQL (50 Qs)•Part 2: Core Architecture & Implementation (Mid-Level)
How does the WiredTiger Storage Engine work internally?
senior LevelMost AskedSystem Design
In Simple Words: WiredTiger is MongoDB's default pluggable storage engine since MongoDB 3.2:
- Concurrency: True document-level concurrency control (optimistic concurrency). Multiple threads modify different documents in the same collection simultaneously.
- Compression: Transparent snappy or zlib compression on disk (cuts storage by 50-70%).
- Cache Management: Allocates an internal WiredTiger Cache (typically 50% of
(RAM - 1GB)). Writes modify memory pages and write to the Journal (WAL). Checkpoints flush dirty pages to disk every 60 seconds.