MongoDB internals and advanced operations
You study the WiredTiger storage engine, the oplog, the replication protocol and chunk migration, then diagnose and recover MongoDB clusters in real failure scenarios.
Level 501 · 13 lessons · 12 practice labs
Lessons
The storage engine
- WiredTiger: B-tree, snapshots and checkpoints
- The journal and durability
- Reading FTDC diagnostic data
- Short task: find the cause of cache pressure
The replication protocol
- The election protocol and terms
- Rollback and lost writes
- Oplog entries and idempotency
- Chunk migration step by step
- Short task: recover rolled-back writes
Failures
- Recovering a replica set that lost its majority
- Orphaned documents and consistency
- Repairing collections with validate and repair
- Capstone: resolve an outage affecting several shards
Practice labs
- Observe the checkpoint interval: Watch the checkpoint counters in serverStatus and measure how often checkpoints happen under write load.
- Find the incident time in FTDC data: Decode diagnostic.data files to find the minute latency began and the metrics that moved with it.
- Find the source of cache pressure: On a server where app threads join eviction, find the query and data size causing the pressure.
- Read an oplog entry and identify the operation: Decode oplog entries to tell inserts, updates and deletes apart and which document each touched.
- Find and read a rollback file: After a network split, find the rollback files on the former primary and list the lost writes.
- Reapply rolled-back writes safely: Reapply the orders from a rollback file to the cluster, checking for conflicts with current data.
- Explain why the majority is lost: Show with terms and vote counts why no primary can be elected when three of five members are down.
- Force-reconfigure with the surviving members: Force a reconfiguration with the two surviving members of a set that lost its majority and record the risk.
- Choose the consistent data after a split: Compare terms and oplogs on a set that seems to have taken writes on both sides and decide which data is valid.
- Check a collection with validate: Run validate on a collection suspected of disk damage and interpret the report.
- Find and clean orphaned documents: After an interrupted chunk migration, find documents present on two shards and verify counts after clean-up.
- Resolve an outage across several shards: One shard has no primary and another has orphaned data; bring the cluster back to health while keeping an incident log.
About this course
You study the WiredTiger storage engine, the oplog, the replication protocol and chunk migration, then diagnose and recover MongoDB clusters in real failure scenarios.
What you will learn
- The storage engine
- The replication protocol
- Failures
Prerequisites
You should be experienced in the topics of the same path up to level 401.
Lab environment
Lessons run in your own Kali Linux terminal in the browser, connected to a private lab network. Nothing to install.
Frequently asked questions
- Is this course right for my level?
- The course is at level 501; it assumes you know the topics of the lower-level courses.
- Is there anything to install?
- No. Every lesson runs in your own lab environment that opens in the browser.
- How do lessons work?
- Each lesson has 8 to 10 steps and a short quiz. Early steps show the command to type, later steps give less help; if two attempts fail, the solution opens.
- Can I try it for free?
- Yes. The first three lessons of every course are free.