29 articles
Knowledge Base
MongoDB
29 articles in the MongoDB category · page 1 of 2.
- Oplog tailing as a CDC source: lower-level alternative to change streams Tail the MongoDB oplog directly with a tailable cursor for CDC — what you gain over change streams, what you give up, and the cluster-time bookkeeping you must do yourself.
- MongoDB sharding in depth: config servers, chunks, and balancer behaviour Run sharded MongoDB in production: pick a shard key, design chunk distribution, observe the balancer, and avoid the orphan-document and jumbo-chunk traps.
- MongoDB aggregation pipeline in depth: stages, index use, and explain Build MongoDB aggregation pipelines that use indexes, spill to disk safely, and merge results without surprising the planner — with explain output you can actually read.
- MongoDB compound indexes: a cookbook for query patterns Recipes for compound indexes in MongoDB: the ESR rule, covered queries, prefix usage, multikey caveats, and how to retire unused indexes.
- MongoDB Atlas Device Sync for offline-first mobile apps Use Atlas Device Sync (formerly Realm Sync) to keep a mobile app's local Realm database synchronized with Atlas — flexible sync, conflict resolution, and permissions.
- MongoDB encryption at rest: KMIP, AWS KMS, and local key files Enable WiredTiger encryption at rest in MongoDB Enterprise with KMIP, AWS KMS, or a local keyfile — key rotation, performance impact, and the keystore that becomes your new SPOF.
- MongoDB client-side field-level encryption (CSFLE and Queryable) Encrypt MongoDB fields on the client before they ever reach the server: CSFLE keys, JSON schema enforcement, deterministic vs random encryption, and Queryable Encryption.
- Installing MongoDB on Ubuntu with the official repository Install MongoDB 7 on Ubuntu from MongoDB Inc.'s apt repository, enable authentication, configure systemd, and prepare the host for production use.
- MongoDB Ops Manager overview: monitoring, automation, and backup Ops Manager is MongoDB's on-premises control plane — agents, project topology, automation, and continuous backup. What it actually gives you versus rolling your own.
- MongoDB point-in-time recovery with snapshots and oplog replay Restore MongoDB to a specific timestamp by combining a base snapshot with oplog replay — Atlas/Ops Manager mechanics and the self-hosted equivalent.
- MongoDB partial indexes for hot-path queries Use MongoDB partial indexes to index only the documents a query actually matches — smaller indexes, faster writes, fewer collection scans on the unhappy path.
- MongoDB Compass for debugging: schema, explain, and query analysis Use MongoDB Compass to inspect schemas, run explain plans visually, profile slow queries, and validate aggregation pipelines without typing them.
- MongoDB replica-set heartbeat tuning for flaky networks Adjust electionTimeoutMillis, heartbeatIntervalMillis, and catchUpTimeoutMillis to keep MongoDB replica-sets stable when the network is not.
- mongoexport for CSV/JSON pipelines: streaming exports without loading the host Use mongoexport to stream MongoDB data into CSV/JSON pipelines feeding warehouses, BI tools, and downstream services — query filters, field selection, and the consistency caveats.
- MongoDB replica set — three-node initiation and verification Bootstrap a three-node MongoDB replica set with keyfile auth, configure write concerns for durability, and verify primary election and replication.
- MongoDB backups with mongodump and mongorestore Logical backups for MongoDB with mongodump, parallel collection dumps, point-in-time strategies with oplog replay, and the restore drill that proves the dump works.
- MongoDB time-series collections for metrics and IoT workloads Use MongoDB time-series collections for IoT, metrics, and sensor data — automatic bucketing, columnar storage, and the operations that work differently from regular collections.
- MongoDB change streams for real-time event consumers Use MongoDB change streams to emit document-level events from a replica-set or sharded cluster: resume tokens, filtering, full-document lookup, and crash-safe consumers.
- Deploying a MongoDB 7 sharded cluster (3 config + 2 shards x PSS) on AlmaLinux 9 Stand up a horizontally scaled MongoDB 7 deployment on AlmaLinux 9 — 3-node config server replica set, two shard replica sets (PSS), mongos routers, with keyfile auth.
- MongoDB index strategies — picking, building, and verifying indexes How MongoDB indexes are stored, when to use compound or partial or TTL indexes, the ESR rule for compound order, and how to verify with explain().
- MongoDB text indexes for in-database search Use MongoDB text indexes for substring and phrase search inside the database — stemming, language analyzers, score sorting, and when to graduate to Atlas Search.
- MongoDB server-side JavaScript: $function, $accumulator, and the risks Use $function and $accumulator to run JavaScript inside MongoDB aggregation pipelines — when it's the right answer, when it's a perf footgun, and the security knobs.
- MongoDB ACID transactions: read concern, write concern, and the cost Run multi-document ACID transactions in MongoDB — when to use them, the read/write concern combination that gives you serializable behaviour, and the cost you accept versus single-document writes.
- Streaming mongodump for large datasets: archive mode and parallelism Use mongodump --archive and --numParallelCollections to stream large MongoDB backups to S3 or a remote disk without filling local storage.