Course Outline
Module 1: Introduction to MongoDB Architecture (4 hours)
Content:
- History of MongoDB and its ecosystem.
- Typical use cases, advantages, and limitations.
- General architecture: instances, processes, and configuration.
Practice:
- Interactive exploration: connecting via the Mongo Shell/CLI.
- Creating a sample database and collection.
Module 2: Installation and Initial Configuration (6 hours)
Content:
- Hardware and resource requirements.
- Installation procedures on Linux (deb/rpm), Windows, and macOS.
- YAML configuration files (mongod.conf): dataDir, logDir, bindIp, port.
- Startup options and systemd/service management.
Practice:
- Deploying instances on local VMs or Docker containers.
- Tuning configurations for development versus production environments.
- Verifying secure remote connectivity.
Module 3: Data Modelling and Basic Operations (5 hours)
Content:
- BSON documents, collections, and databases.
- Modelling strategies: embedding versus referencing; data design patterns.
- Introduction to basic indexes.
- Performing operations using the Mongo Shell and scripting examples with drivers.
Practice:
- Modelling 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 Optimisation (4 hours)
Content:
- Simple, compound, multikey, text, and geospatial indexes.
- Utilising explain() and analysing performance metrics.
- The 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.
- Refining indexes based on access patterns.
Module 5: Security Implementation (5 hours)
Content:
- Authentication mechanisms: SCRAM, LDAP/Kerberos (introduction).
- Defining users and custom roles.
- TLS/SSL encryption between clients and servers.
- At-rest encryption: key configuration.
- Basic audit logging.
Practice:
- Creating users with minimal necessary privileges.
- Configuring TLS for local instances.
- Verifying protection against unauthorised access and reviewing audit logs.
Module 6: Replication and High Availability (6 hours)
Content:
- Replication concepts: Primary, Secondary, and oplog.
- Replica set configuration: initiation, membership, and arbitration.
- Monitoring status and election processes.
- Maintenance tasks: adding/removing members, reassigning priorities.
Practice:
- Deploying a three-node replica set (on local machines or VMs).
- Simulating primary failure and observing failover.
- Rebuilding secondary nodes and recovering replicas.
Module 7: Sharding and Horizontal Scalability (6 hours)
Content:
- Sharding concepts: shard key, config servers, and mongos router.
- Selecting shard keys and associated risks.
- Deploying config servers, shards, and mongos instances.
- Rebalancing and chunk migration.
Practice:
- Configuring a simple sharded cluster.
- Inserting large-scale data and observing distribution.
- Introducing shard key changes and understanding limitations.
Module 8: Backup, Restore, and Disaster Recovery (4 hours)
Content:
- Native tools: mongodump/mongorestore, filesystem snapshots.
- Backing up replica sets and sharded clusters.
- Basic utilisation of Cloud Manager/Ops Manager for backup.
- Disaster Recovery (DR) planning: defining RTO and RPO.
Practice:
- Performing backup and restore on a test database.
- Simulating failure and executing recovery from backup.
- Designing a DR plan for a hypothetical scenario.
Module 9: Monitoring and Alerts (4 hours)
Content:
- Tools: mongostat, mongotop, Cloud Manager/Atlas Monitoring.
- Integration with Prometheus and Grafana (concepts and examples).
- Key metrics: CPU, memory, I/O, oplog size, and latencies.
- Alerts: defining thresholds and notifications.
Practice:
- Deploying a local or container-based monitoring agent.
- Setting up basic dashboards with sample metrics.
- Simulating load and observing alert responses.
Module 10: Maintenance, Upgrades, and Best Practices (4 hours)
Content:
- Upgrade strategies for replica sets and sharded clusters.
- Data cleanup, compaction, and integrity checks.
- Reviewing logs and conducting regular audits.
- Automating routine tasks (scripts, cronjobs, Ansible, Terraform).
- Data retention and archiving policies.
Practice:
- Simulating minor and major upgrades in a controlled environment.
- Creating automation scripts for backup and monitoring.
- Developing a periodic maintenance checklist.
Summary and Next Steps
Requirements
- A solid understanding of general database concepts and data structures.
- Familiarity with using the Linux command-line interface.
- Foundational knowledge of networking and system administration.
Audience
- Database administrators and system engineers who work with MongoDB.
- DevOps and infrastructure teams responsible for deploying and maintaining MongoDB environments.
- Developers keen on 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.