Course Outline
Module 1: Introduction to MongoDB Architecture (4h)
Content:
- Overview of MongoDB’s history and ecosystem.
- Common use cases, advantages, and limitations.
- Core architecture: instances, processes, and configuration settings.
Practice:
- Interactive exploration via Mongo Shell/CLI.
- Creating a sample database and collection.
Module 2: Installation and Initial Configuration (6h)
Content:
- Hardware and resource requirements.
- Installation procedures on Linux (deb/rpm), Windows, and macOS.
- Understanding YAML configuration files (mongod.conf): dataDir, logDir, bindIp, port.
- Startup options and systemd/service management.
Practice:
- Deploying instances on local VMs or Docker containers.
- Tailoring configurations for development versus production environments.
- Verifying secure remote connectivity.
Module 3: Data Modeling and Basic Operations (5h)
Content:
- Understanding BSON documents, collections, and databases.
- Data modeling techniques: embedding vs. referencing; data design patterns.
- Introduction to basic indexes.
- Performing operations using Mongo Shell and scripting examples with drivers.
Practice:
- Modeling a real-world 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 Optimization (4h)
Content:
- Types of indexes: simple, compound, multikey, text, and geospatial.
- Utilizing explain() and analyzing performance metrics.
- Impact of indexes on write performance and memory usage.
Practice:
- Creating collections populated with test data.
- Testing queries with and without indexes; interpreting explain() output.
- Optimizing indexes based on access patterns.
Module 5: Security Measures (5h)
Content:
- Authentication mechanisms: SCRAM, LDAP/Kerberos (introduction).
- Creating users and defining custom roles.
- Implementing TLS/SSL for client-server communication.
- At-rest encryption configuration.
- Basics of audit logging.
Practice:
- Creating users with minimal necessary privileges.
- Configuring TLS on local instances.
- Verifying unauthorized access attempts and reviewing audit logs.
Module 6: Replication and High Availability (6h)
Content:
- Replication fundamentals: Primary, Secondary nodes, and oplog.
- Configuring replica sets: initiation, membership, and arbitration.
- Monitoring status and election processes.
- Maintenance tasks: adding/removing members and adjusting priorities.
Practice:
- Deploying a three-node replica set (locally or on VMs).
- Simulating primary failure and observing the failover process.
- Rebuilding secondary nodes and recovering replicas.
Module 7: Sharding and Horizontal Scalability (6h)
Content:
- Sharding concepts: shard keys, config servers, and mongos routers.
- Selecting appropriate shard keys and understanding associated risks.
- Deploying config servers, shards, and mongos instances.
- Managing data rebalancing and chunk migration.
Practice:
- Configuring a simple sharded cluster.
- Inserting large-scale data and observing distribution patterns.
- Exploring shard key modifications and their limitations.
Module 8: Backup, Restore, and Disaster Recovery (4h)
Content:
- Native tools: mongodump/mongorestore and filesystem snapshots.
- Backup strategies for replica sets and sharded clusters.
- Utilizing Cloud Manager/Ops Manager for backups.
- Disaster Recovery (DR) planning: defining RTO and RPO.
Practice:
- Executing backup and restore operations on a test database.
- Simulating failure scenarios and recovering from backups.
- Designing a DR plan for a hypothetical scenario.
Module 9: Monitoring and Alerts (4h)
Content:
- Tools: mongostat, mongotop, Cloud Manager/Atlas Monitoring.
- Integration with Prometheus + Grafana (concepts and examples).
- Key metrics to track: CPU, memory, I/O, oplog size, and latencies.
- Setting up alerts by defining thresholds and notification channels.
Practice:
- Deploying a local or container-based monitoring agent.
- Establishing basic dashboards with sample metrics.
- Simulating system load and observing alert triggers.
Module 10: Maintenance, Upgrades, and Best Practices (4h)
Content:
- 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.
- Establishing data retention and archiving policies.
Practice:
- Simulating minor and major upgrades in a controlled environment.
- Creating automation scripts for backup and monitoring tasks.
- Developing a periodic maintenance checklist.
Summary and Next Steps
Requirements
- A solid understanding of general database concepts and data structures.
- Familiarity with Linux command-line operations.
- 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 interested in understanding MongoDB internals and 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.