Course Outline
Module 1: Introduction to MongoDB Architecture (4h)
Content:
- Historical context and the MongoDB ecosystem
- Typical use cases, advantages, and limitations
- Core architecture: instances, processes, and configuration
Practical Exercises:
- Interactive exploration using Mongo Shell and CLI
- Creation of sample databases and collections
Module 2: Installation and Initial Configuration (6h)
Content:
- Hardware and resource prerequisites
- Installation procedures for Linux (deb/rpm), Windows, and macOS
- YAML configuration files (mongod.conf): dataDir, logDir, bindIp, and port settings
- Startup options and management via systemd or services
Practical Exercises:
- Deploying instances on local VMs or Docker containers
- Adjusting configurations for development versus production scenarios
- Verifying secure remote connectivity
Module 3: Data Modeling and Basic Operations (5h)
Content:
- BSON documents, collections, and databases
- Modeling strategies: embedding versus referencing; data design patterns
- Overview of basic indexes
- Operations via Mongo Shell and driver-based scripting
Practical Exercises:
- Designing a 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 performance metric analysis
- Impact of indexing on write performance and memory usage
Practical Exercises:
- Creating collections populated with test data
- Testing queries with and without indexes; interpreting explain() outputs
- Refining indexes based on access patterns
Module 5: Security Implementation (5h)
Content:
- Authentication mechanisms: SCRAM, and introductory concepts of LDAP/Kerberos
- User definition and custom role creation
- TLS/SSL encryption between clients and servers
- At-rest encryption: key management configuration
- Basic audit logging procedures
Practical Exercises:
- Creating users with minimal necessary privileges
- Configuring TLS on local instances
- Testing unauthorized access and reviewing audit logs
Module 6: Replication and High Availability (6h)
Content:
- Replication fundamentals: Primary, Secondary, and oplog
- Replica set configuration: initiation, membership, and arbitration
- Monitoring cluster status and election processes
- Maintenance tasks: adding or removing members, reassigning priorities
Practical Exercises:
- Deploying a three-node replica set on local machines or VMs
- Simulating primary failures to observe failover behavior
- Rebuilding secondary nodes and recovering replica sets
Module 7: Sharding and Horizontal Scalability (6h)
Content:
- Sharding fundamentals: shard key, config servers, and mongos router
- Shard key selection criteria and associated risks
- Deployment of config servers, shards, and mongos routers
- Rebalancing strategies and chunk migration
Practical Exercises:
- Configuring a basic sharded cluster
- Inserting large-scale data to observe distribution
- Exploring shard key changes and understanding system 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
- Basic utilization of Cloud Manager/Ops Manager for backups
- Disaster Recovery (DR) planning: RTO and RPO concepts
Practical Exercises:
- Executing backup and restore operations on a test database
- Simulating failures and performing recovery from backups
- Designing a DR plan for a hypothetical scenario
Module 9: Monitoring and Alerting (4h)
Content:
- Essential tools: mongostat, mongotop, and Cloud Manager/Atlas Monitoring
- Integration concepts for Prometheus and Grafana
- Key performance metrics: CPU, memory, I/O, oplog size, and latencies
- Alerting strategies: defining thresholds and notification methods
Practical Exercises:
- Deploying local or container-based monitoring agents
- Setting up basic dashboards with sample metrics
- Simulating load to observe 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
- Log review and regular audit practices
- Automation of routine tasks using scripts, cronjobs, Ansible, or Terraform
- Data retention and archiving policies
Practical Exercises:
- Simulating minor and major upgrades in a controlled environment
- Developing automation scripts for backup and monitoring
- Creating a periodic maintenance checklist
Summary and Next Steps
Requirements
- A solid understanding of general database concepts and data structures
- Proficiency with Linux command-line interfaces
- Foundational knowledge of networking and system administration
Target Audience
- Database administrators and system engineers utilizing MongoDB
- DevOps and infrastructure teams responsible for deploying and maintaining MongoDB environments
- Developers seeking insight into 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.