Course Outline
Module 1: Introduction and MongoDB Architecture (4h)
Topics covered:
- Historical context and the broader MongoDB ecosystem
- Common use cases, along with advantages and limitations
- Core architecture: instances, processes, and configuration structures
Practical Application:
- Interactive exploration: Establishing connections via Mongo Shell or CLI
- Creating a sample database and associated collections
Module 2: Installation and Initial Configuration (6h)
Topics covered:
- Hardware specifications and resource requirements
- Installation procedures on Linux (deb/rpm), Windows, and macOS
- Configuring YAML files (mongod.conf): dataDir, logDir, bindIp, and port settings
- Startup parameters and management via systemd or service controls
Practical Application:
- Deploying instances on local virtual machines or Docker containers
- Tailoring configurations for development versus production environments
- Verifying secure remote connectivity
Module 3: Data Modeling and Basic Operations (5h)
Topics covered:
- Understanding BSON documents, collections, and databases
- Modeling strategies: embedding versus referencing; core data design patterns
- Foundations of basic indexes
- Executing operations using the Mongo Shell and driver-based scripting
Practical Application:
- Modeling a specific use case, such as an inventory or billing system
- Implementing standard CRUD operations
- Applying schema validation using JSON Schema within MongoDB
Module 4: Indexes and Performance (4h)
Topics covered:
- Types of indexes: simple, compound, multikey, text, and geospatial
- Utilizing explain() for analysis and metric interpretation
- Evaluating the impact of indexes on write performance and memory usage
Practical Application:
- Creating collections populated with test data
- Comparing query execution with and without indexes; analyzing explain() output
- Optimizing indexes based on observed access patterns
Module 5: Security (5h)
Topics covered:
- Authentication mechanisms: SCRAM, and an introduction to LDAP/Kerberos
- Defining users and custom roles
- Implementing TLS/SSL between clients and servers
- Configuring at-rest encryption: key management
- Establishing basic audit logging
Practical Application:
- Creating users with minimal necessary privileges
- Configuring TLS on local instances
- Testing unauthorized access attempts and reviewing audit logs
Module 6: Replication and High Availability (6h)
Topics covered:
- Core replication concepts: Primary, Secondary nodes, and oplog mechanics
- Replica set configuration: initiation, membership management, and arbitration
- Monitoring cluster status and election processes
- Maintenance tasks: adding or removing members and reassigning priorities
Practical Application:
- Deploying a three-node replica set (locally or via VMs)
- Simulating primary node failure to observe failover behavior
- Rebuilding secondary nodes and recovering replica states
Module 7: Sharding and Horizontal Scalability (6h)
Topics covered:
- Sharding fundamentals: shard keys, config servers, and the mongos router
- Strategies for shard key selection and associated risks
- Deploying config servers, shards, and mongos routers
- Managing rebalancing and chunk migration
Practical Application:
- Configuring 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)
Topics covered:
- Native tools: mongodump/mongorestore, and filesystem snapshots
- Backup strategies for replica sets and sharded clusters
- Utilizing Cloud Manager/Ops Manager for backup operations
- Disaster Recovery (DR) planning: defining RTO and RPO
Practical Application:
- Executing backup and restore procedures on a test database
- Simulating failures and restoring data from backups
- Designing a DR plan for a hypothetical scenario
Module 9: Monitoring and Alerts (4h)
Topics covered:
- Essential tools: mongostat, mongotop, and Cloud Manager/Atlas Monitoring
- Integrating with Prometheus and Grafana (concepts and practical examples)
- Key metrics: CPU, memory, I/O, oplog size, and latencies
- Alerting: setting thresholds and configuring notifications
Practical Application:
- Deploying local or container-based monitoring agents
- Creating basic dashboards using sample metrics
- Simulating system load to trigger and observe alerts
Module 10: Maintenance, Upgrades, and Best Practices (4h)
Topics covered:
- Upgrade strategies for replica sets and sharded clusters
- Data cleanup, compaction, and integrity checks
- Log review and regular audit procedures
- Automating routine tasks (scripts, cronjobs, Ansible, Terraform)
- Defining data retention and archiving policies
Practical Application:
- Simulating minor and major upgrades in a controlled environment
- Developing automation scripts for backup and monitoring tasks
- Creating a periodic maintenance checklist
Summary and Next Steps
Requirements
- A solid grasp of fundamental database concepts and data structures
- Proficiency in using the Linux command-line interface
- Foundational knowledge of networking principles and system administration
Target Audience
- Database administrators and system engineers working directly with MongoDB
- DevOps and infrastructure teams responsible for deploying and maintaining MongoDB environments
- Developers seeking to understand MongoDB internals and adopt deployment best practices
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.