MongoDB for Administrator - up1/training-courses GitHub Wiki
MongoDB for Administrator
Software requirement
Day 1: Architecture, Installation, and Security
- Core Architecture
- The Document Model: Understanding BSON vs. JSON.
- Storage Engines: Deep dive into WiredTiger (journaling, checkpoints, and compression)
- Process Overview: Understanding
mongod (the database) and mongos (the router)
- Setup and Security
- Best practices for production (ulimits, THP, and file systems)
- Configuration: Managing the mongod.conf file
- Authentication: Enabling Access Control and Creating the User Admin
- RBAC (Role-Based Access Control)
- Built-in roles (readWrite, dbAdmin, root)
- Creating custom roles for granular permissions.
- Network Security: Binding IPs and TLS/SSL configuration
- Workshop
Day 2: High Availability and Data Integrity
- Replica Sets (HA)
- Mechanics of Replication: Primary vs. Secondary nodes
- Election Process: How MongoDB handles failover automatically
- Oplog (Operations Log): The heart of data synchronization
- Workshop: Deploying a 3-node Replica Set from scratch
- Backup and Recovery
- Logical Backups: Using mongodump and mongorestore
- Physical Backups: Filesystem snapshots (LVM) and "cp" methods
- Point-in-Time Recovery (PITR): Using the Oplog to replay transactions
- Consistency Checks: Validating data integrity after a restore
- Workshop
Day 3: Performance, Scaling, and Troubleshooting
- Indexing and Performance Tuning
- Index Types: TTL, Geospatial, Compound, and Partial indexes
- ESR Rule: (Equality, Sort, Range) – The golden rule for index design
- The Explain Plan: Reading db.collection.explain() to find bottlenecks
- Profiling: Identifying slow queries using the Database Profiler
- Operations and Troubleshooting
- Monitoring Tools: Using mongostat, mongotop, and Atlas/Cloud Manager metrics
- Sharding Overview: When and how to scale horizontally (Brief intro)
- Common Issues: Handling "Connection Storms," Cursor timeouts, and Disk I/O saturation
- Maintenance: Rolling upgrades and index builds in a Replica Set
- Workshop