MongoDB Endpoint
MongoDB endpoints connect Eve to MongoDB-compatible deployments such as MongoDB Atlas, self-managed replica sets, sharded clusters, Amazon DocumentDB, and Azure Cosmos DB for MongoDB-compatible APIs.
MongoDB migration execution is a preview surface. Use this page to configure endpoints, understand command-aware routing, and plan a migration. Coordinate production execution with the Eden team until the public guided MongoDB workflow is available.
What Eve Uses MongoDB Endpoints For
MongoDB endpoints support:
- Direct document operations through endpoint APIs.
- Command-aware gateway and interlay planning.
- OP_MSG and OP_QUERY parsing foundations.
- Command classification and policy design.
- Collection discovery and BSON batch movement planning.
- Safe mirroring, comparison, and rollback design for preview migrations.
Basic Endpoint Shape
{
"endpoint": "mongo-source",
"kind": "mongo",
"config": {
"db_name": "app",
"write_conn": {
"url": "mongodb://user:password@mongo-source.internal:27017"
}
},
"description": "Current MongoDB source"
}Create it:
curl -sS -X POST "$EDEN/endpoints" \
-H "$AUTH_HEADER" \
-H "Content-Type: application/json" \
-d '{
"endpoint": "mongo-source",
"kind": "mongo",
"config": {
"db_name": "app",
"write_conn": {
"url": "mongodb://user:password@mongo-source.internal:27017"
}
},
"description": "Current MongoDB source"
}'Create a target endpoint with the same shape and a different endpoint id and connection URL.
Connection Guidance
Document the topology before planning a migration:
| Area | What to capture |
|---|---|
| Deployment type | Standalone, replica set, sharded cluster, Atlas, DocumentDB, Cosmos DB, or self-managed. |
| Databases | User databases in scope. Exclude system databases unless explicitly required. |
| Collections | Collection counts, sizes, indexes, validators, capped collections, and time-series collections. |
| Sharding | Shard keys, balancer state, chunk distribution, and zone rules. |
| Sessions | Whether applications use sessions, retryable writes, or multi-document transactions. |
| Change streams | Whether applications depend on change-stream behavior during migration. |
| Commands | Any administrative commands, destructive commands, mapReduce, aggregation pipelines, or custom driver behavior. |
Command Policy
MongoDB migrations should classify commands before mirroring or dual-writing. A conservative policy should:
- Allow common read commands for analysis and comparison.
- Mirror only commands that are safe for the target and do not mutate state unexpectedly.
- Block or require approval for destructive commands such as
drop,dropDatabase,compact,repairDatabase, and dangerous administrative operations. - Skip or isolate transaction-shaped traffic until the execution plan explicitly supports it.
- Record skip reasons so operators know which traffic was not compared.
Data Movement Planning
The planned MongoDB movement model is collection-aware:
- Discover non-system databases and collections.
- Sort work by estimated document count or size.
- Read documents in stable
_idorder where possible. - Write bounded BSON document batches to the target.
- Apply the selected conflict mode.
- Record failed documents or collections for retry or manual review.
Conflict modes should be chosen before execution:
| Mode | Behavior |
|---|---|
| Insert | Insert documents and fail if the target already has the same _id. |
| Upsert | Replace or create target documents by identity. |
| Merge | Merge fields where supported by the migration plan. |
| Manual | Record conflicts for operator review. |
Validation
Use validation checks that match the workload:
- Database and collection counts.
- Document counts per collection.
- Sampled document comparison.
- Index presence and key pattern comparison.
- Validator and collection option comparison.
- Error records for failed batches.
- Mirror divergence for safe commands.
- Latency and error-rate comparison under mirrored traffic.
Interlay Planning
When using an interlay, applications connect to Eve instead of directly to the source. For MongoDB, test driver behavior carefully:
- Initial handshake and topology discovery.
- Authentication mechanism.
- Read preference and write concern.
- Retryable writes.
- Sessions and transactions.
- Aggregation pipelines.
- Long-lived cursors and change streams.
Operational Status
The public guided workflow API documented in Migrations is Redis-specific today. MongoDB migration work should be treated as preview. Use endpoint docs, command-shape analysis, topology inventory, and architecture guidance for planning, then coordinate exact execution with the Eden team.