Course Outline
Module 1: Introduction and MongoDB Architecture (4h)
Key Topics:
- Evolution and the MongoDB ecosystem
- Common use cases, advantages, and limitations
- Core architecture: instances, processes, and configuration
Practical Application:
- Interactive exploration: connecting using Mongo Shell/CLI
- Creating a sample database and collection
Module 2: Installation and Initial Configuration (6h)
Key Topics:
- Hardware and resource prerequisites
- Installation procedures on Linux (deb/rpm), Windows, and macOS
- YAML configuration files (mongod.conf): dataDir, logDir, bindIp, port
- Startup parameters and systemd/service management
Practical Application:
- Deploying instances on local VMs or Docker containers
- Modifying configurations for development versus production environments
- Verifying secure remote connectivity
Module 3: Data Modeling and Basic Operations (5h)
Key Topics:
- BSON documents, collections, and databases
- Data modeling strategies: embedding vs. referencing; design patterns
- Foundational indexing concepts
- Executing operations via Mongo Shell and driver-based scripting
Practical Application:
- Modeling a specific use case, such as an inventory or billing system
- Implementing CRUD (Create, Read, Update, Delete) operations
- Applying schema validation using JSON Schema in MongoDB
Module 4: Indexes and Performance (4h)
Key Topics:
- Types of indexes: simple, compound, multikey, text, and geospatial
- Analyzing query execution plans using explain()
- Impact of indexing on write performance and memory usage
Practical Application:
- Populating collections with test data
- Comparing query performance with and without indexes; interpreting explain() output
- Optimizing indexes based on access patterns
Module 5: Security (5h)
Key Topics:
- Authentication methods: SCRAM, LDAP/Kerberos (overview)
- Creating users and defining custom roles
- Implementing TLS/SSL between clients and servers
- Encryption at rest: key management configuration
- Foundational audit logging
Practical Application:
- Creating users with least-privilege access
- Configuring TLS on local instances
- Testing unauthorized access attempts and reviewing audit logs
Module 6: Replication and High Availability (6h)
Key Topics:
- Replication fundamentals: Primary, Secondary, and oplog
- Configuring replica sets: initiation, membership, and arbitration
- Monitoring cluster status and election processes
- Maintenance tasks: adding/removing members and adjusting priorities
Practical Application:
- Deploying a three-node replica set (local or VM-based)
- Simulating a primary node failure to observe failover behavior
- Rebuilding secondary nodes and restoring replica consistency
Module 7: Sharding and Horizontal Scalability (6h)
Key Topics:
- Sharding concepts: shard key, config servers, and mongos router
- Shard key selection strategies and associated risks
- Deploying config servers, shards, and mongos instances
- Data rebalancing and chunk migration
Practical Application:
- Setting up a basic sharded cluster
- Inserting large datasets to observe data distribution
- Exploring shard key modifications and understanding their limitations
Module 8: Backup, Restore, and Disaster Recovery (4h)
Key Topics:
- Native tools: mongodump/mongorestore and filesystem snapshots
- Backup strategies for replica sets and sharded clusters
- Using Cloud Manager/Ops Manager for backup operations
- Disaster Recovery (DR) planning: RTO and RPO considerations
Practical Application:
- Executing backup and restore operations on a test database
- Simulating data loss and recovering from backups
- Developing a DR plan for a hypothetical scenario
Module 9: Monitoring and Alerts (4h)
Key Topics:
- Monitoring tools: mongostat, mongotop, and Cloud Manager/Atlas Monitoring
- Integration with Prometheus and Grafana (concepts and examples)
- Key performance metrics: CPU, memory, I/O, oplog size, and latencies
- Alerting mechanisms: defining thresholds and notification workflows
Practical Application:
- Deploying a local or container-based monitoring agent
- Configuring basic dashboards with sample metrics
- Generating load to trigger and observe alerts
Module 10: Maintenance, Upgrades, and Best Practices (4h)
Key Topics:
- Upgrade strategies for replica sets and sharded clusters
- Data cleanup, compaction, and integrity verification
- Log analysis and regular audit practices
- Automating routine tasks (scripts, cronjobs, Ansible, Terraform)
- Data retention and archiving policies
Practical Application:
- Simulating minor and major upgrades in a controlled setting
- Writing automation scripts for backups and monitoring
- Creating a recurring maintenance checklist
Summary and Next Steps
Requirements
- Foundational understanding of general database concepts and data structures
- Proficiency with Linux command-line operations
- Basic knowledge of networking and system administration
Target Audience
- Database administrators and system engineers working with MongoDB
- DevOps and infrastructure teams responsible for deploying and maintaining MongoDB environments
- Developers seeking to understand MongoDB internals and best practices for deployment
Testimonials (2)
The pace of talking and explanation.
Marko Skokovic - PWO by Lottomatica Serbia
Course - MongoDB for Administrators
Sir Jose is cool and explains every detail of the commands. We appreciate the time he takes to share his knowledge with us, and it truly shows that he is an expert in this field.