roadmap
- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
Answer MongoDB interview questions on modeling documents, querying and indexing them, and running clusters at scale. Covers schemas, aggregation, replica sets, sharding, security, storage and Atlas.
248 of 248 questions in your plan: 0 known, 0 in progress, 0 due, 0 skipped, 248 new. 0 cut, outside your plan.
MongoDB questions arrive inside other rounds: the technical conversation about persistence in a backend interview at a team that runs it, and the system design round, whenever a candidate reaches for a document store and is asked why not a relational one. Database and platform roles give replication and sharding a round to themselves, usually as a scenario: a primary that stepped down in the middle of a write, or a cluster where one shard takes every insert.
Interviewers often follow a single schema up the levels. Take a blog post with its comments embedded as an array. The first questions are about the API: a filter that matches one element of the array, a projection that returns only the latest comments, whether explain() reports an index scan or a collection scan. Then the design pushes back. The post goes viral, the array heads for the 16 MB document limit and every update touches a larger document; the expected answer moves comments into their own collection or buckets them, and says what a page of comments now costs to read. At the senior end the same data meets the cluster: a compound index ordered for equality first, then sort, then range; a write acknowledged with w: 1 and rolled back after a failover, which w: "majority" would have kept; a shard key on a steadily increasing value that sends every new comment to the same shard.
Choosing a store comes first, ahead of any MongoDB feature, because the design round asks for that argument before it asks for syntax. Document modeling follows, in terms no single product owns: the embed-or-reference decision, duplicated data and who keeps its copies in step, and schema changes applied one document at a time when no migration rewrites the collection. Settling access patterns before the server's API keeps the API from deciding them. BSON's own layout closes the module, since a length prefix and a repeated field name are what sit behind later answers on document size and on reading one field from a long document.
Core Server then takes MongoDB itself in the order data moves through it. BSON's types in use come before the query API, and the aggregation pipeline picks up where a plain find stops. Indexing closes the single-server half, placed after the queries it has to serve. Replica sets and sharding come only then, and for a reason: a shard key is chosen from the queries that matter most, and sharding a collection that already holds data needs an index on that key. The rest of the module is the server as an operator meets it: who may do what and how a login proves it, WiredTiger's cache, checkpoints and compression, backups and the diagnostic tools, and what a driver does when a primary steps down.
Data Protection then takes the question past this product, in terms that apply to any database: encryption on the wire and on disk, and auditing of who read or changed what. Atlas closes the plan. It runs the same replica sets and shards the earlier modules explain, so its questions are about the division of labor: what a cluster tier decides for you, what search and vector search add on top of the same documents, and which operations and security settings remain your job on a managed service.
Most candidates meet MongoDB as application developers, with someone else running the cluster. For them the first module, short of BSON's bytes, and the first four topics of Core Server carry the conversation; replication matters as far as write concern, sharding as far as choosing a key, and the driver topic as far as a pool that runs out during a failover. A developer with a week or two can let importance do the cutting, down to must know, and still give the aggregation pipeline an evening in a shell: stage order is where its follow-ups go, and that is learned by running pipelines. Coming from SQL, do not skim the modeling module; an answer that rebuilds normalized tables out of documents is a frequent wrong one. Engineers hired to run MongoDB spend their hours from replica sets onward, through access control, WiredTiger and backups, and should switch study order to by topics, because the sharding questions assume the replica set answers that come before them. Keep a three-member replica set running locally beside the reading, so that an election or a rollback is something you have watched rather than described. The plan covers the database and how a driver connects to it, not the application code built on top, and not the relational alternative it is weighed against. When the interview turns to why the data is not in a relational store, the [PostgreSQL roadmap](/roadmaps/postgresql) supplies the other side of that comparison.
Most candidates meet MongoDB as application developers, with someone else running the cluster. For them the first module, short of BSON's bytes, and the first four topics of Core Server carry the conversation; replication matters as far as write concern, sharding as far as choosing a key, and the driver topic as far as a pool that runs out during a failover. A developer with a week or two can let importance do the cutting, down to must know, and still give the aggregation pipeline an evening in a shell: stage order is where its follow-ups go, and that is learned by running pipelines. Coming from SQL, do not skim the modeling module; an answer that rebuilds normalized tables out of documents is a frequent wrong one.
Engineers hired to run MongoDB spend their hours from replica sets onward, through access control, WiredTiger and backups, and should switch study order to by topics, because the sharding questions assume the replica set answers that come before them. Keep a three-member replica set running locally beside the reading, so that an election or a rollback is something you have watched rather than described.
The plan covers the database and how a driver connects to it, not the application code built on top, and not the relational alternative it is weighed against. When the interview turns to why the data is not in a relational store, the PostgreSQL roadmap supplies the other side of that comparison.