Course Outline
Module 1: Introduction and MongoDB Architecture (4h)
Topics Covered:
- History and the MongoDB ecosystem
- Common use cases, advantages, and limitations
- Core architecture: instances, processes, and configuration
Practical Exercises:
- Interactive exploration: connecting via Mongo Shell/CLI
- Creating a sample database and collection
Module 2: Installation and Initial Configuration (6h)
Topics Covered:
- Hardware and resource requirements
- Installation on Linux (deb/rpm), Windows, and macOS
- YAML configuration files (mongod.conf): dataDir, logDir, bindIp, port
- Startup options and systemd/service management
Practical Exercises:
- Deploying instances on local VMs or Docker containers
- Tuning configurations for development versus production environments
- Verifying secure remote connectivity
Module 3: Data Modeling and Basic Operations (5h)
Topics Covered:
- BSON documents, collections, and databases
- Modeling strategies: embedding vs. referencing; data design patterns
- Basic indexes (introduced in previous sections)
- Operations using Mongo Shell and scripting examples with drivers
Practical Exercises:
- Modeling a specific use case, such as an inventory or billing system
- Implementing CRUD operations
- Applying schema validation using JSON Schema in MongoDB
Module 4: Indexes and Performance (4h)
Topics Covered:
- Simple, compound, multikey, text, and geospatial indexes
- Using explain() to analyze query metrics
- The impact of indexes on write performance and memory usage
Practical Exercises:
- Creating collections populated with test data
- Testing queries with and without indexes; interpreting explain() output
- Optimizing indexes based on access patterns
Module 5: Security (5h)
Topics Covered:
- Authentication mechanisms: SCRAM, LDAP/Kerberos (overview)
- Defining users and custom roles
- Configuring TLS/SSL between clients and servers
- At-rest encryption: key configuration
- Implementing basic audit logging
Practical Exercises:
- Creating users with minimal necessary privileges
- Configuring TLS in local instances
- Verifying unauthorized access attempts and reviewing audit logs
Module 6: Replication and High Availability (6h)
Topics Covered:
- Replication concepts: Primary, Secondary, and oplog
- Replica set configuration: initialization, membership, and arbitration
- Monitoring cluster status and election processes
- Maintenance tasks: adding/removing members and reassigning priorities
Practical Exercises:
- Deploying a three-node replica set (locally or on VMs)
- Simulating primary failure to observe failover behavior
- Rebuilding secondary nodes and recovering replica sets
Module 7: Sharding and Horizontal Scalability (6h)
Topics Covered:
- Sharding concepts: shard key, config servers, and mongos router
- Shard key selection and associated risks
- Deploying config servers, shards, and mongos instances
- Rebalancing and chunk migration processes
Practical Exercises:
- Configuring a basic sharded cluster
- Inserting large-scale data to observe distribution
- Introducing shard key changes to understand limitations
Module 8: Backup, Restore, and Disaster Recovery (4h)
Topics Covered:
- Native tools: mongodump/mongorestore and filesystem snapshots
- Backups within replica sets and sharded clusters
- Basic use of Cloud Manager/Ops Manager for backup management
- Disaster Recovery (DR) planning: RTO and RPO definitions
Practical Exercises:
- Performing backup and restore operations on a test database
- Simulating system failure and recovering from backups
- Designing a DR plan for a hypothetical scenario
Module 9: Monitoring and Alerts (4h)
Topics Covered:
- Tools: mongostat, mongotop, and Cloud Manager/Atlas Monitoring
- Integration with Prometheus + Grafana (concepts and examples)
- Key metrics: CPU, memory, I/O, oplog size, and latencies
- Alerts: defining thresholds and setting up notifications
Practical Exercises:
- Deploying a local or container-based monitoring agent
- Setting up basic dashboards with sample metrics
- Simulating load to observe alert triggers
Module 10: Maintenance, Upgrades, and Best Practices (4h)
Topics Covered:
- Upgrade strategies for replica sets and sharded clusters
- Data cleanup, compaction, and integrity checks
- Reviewing logs and conducting regular audits
- Automating routine tasks using scripts, cronjobs, Ansible, and Terraform
- Data retention and archiving policies
Practical Exercises:
- Simulating minor and major upgrades in a controlled environment
- Creating automation scripts for backup and monitoring workflows
- Developing a periodic maintenance checklist
Summary and Next Steps
Requirements
- A solid understanding of general database concepts and data structures
- Proficiency with Linux command-line usage
- Foundational 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.