Course Outline
Module 1: Introduction and MongoDB Architecture (4h)
Core Concepts:
- Evolution and the MongoDB ecosystem
- Common use cases, advantages, and limitations
- General architecture: instances, processes, and configuration files
Practical Exercises:
- Interactive exploration: establishing connections via Mongo Shell/CLI
- Creating a sample database and collection
Module 2: Installation and Initial Configuration (6h)
Core Concepts:
- 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 managing services via systemd/service
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)
Core Concepts:
- BSON documents, collections, and databases
- Data modeling strategies: embedding vs. referencing; design patterns
- Basic indexing principles (introduced in previous modules)
- Operations via Mongo Shell and scripting examples using drivers
Practical Exercises:
- Modeling a specific use case: such as an inventory or billing system
- Implementing standard CRUD operations
- Schema validation using JSON Schema within MongoDB
Module 4: Indexes and Performance (4h)
Core Concepts:
- Types of indexes: simple, compound, multikey, text, and geospatial
- Utilizing explain() and analyzing performance metrics
- The impact of indexes on write performance and memory usage
Practical Exercises:
- Creating collections populated with test data
- Comparing query performance with and without indexes; interpreting explain() output
- Refining indexes based on observed access patterns
Module 5: Security (5h)
Core Concepts:
- Authentication mechanisms: SCRAM, LDAP/Kerberos (introductory)
- Defining users and custom roles
- TLS/SSL configuration between clients and servers
- At-rest encryption: key configuration management
- Basic audit logging setup
Practical Exercises:
- Creating users with minimal required privileges
- Configuring TLS on local instances
- Testing for unauthorized access and reviewing audit logs
Module 6: Replication and High Availability (6h)
Core Concepts:
- Replication fundamentals: Primary, Secondary, and oplog concepts
- Replica set configuration: initiation, membership, and arbitration
- Monitoring status and election processes
- Maintenance tasks: adding/removing members, reassigning priorities
Practical Exercises:
- Deploying a three-node replica set (locally or on VMs)
- Simulating primary node failure and observing failover behavior
- Rebuilding secondary nodes and restoring replica consistency
Module 7: Sharding and Horizontal Scalability (6h)
Core Concepts:
- Sharding fundamentals: shard key, config servers, and mongos router
- Shard key selection strategies and associated risks
- Deploying config servers, shards, and mongos instances
- Rebalancing processes and chunk migration
Practical Exercises:
- Configuring a simple sharded cluster
- Inserting large-scale data and observing distribution patterns
- Exploring shard key changes and understanding system limitations
Module 8: Backup, Restore, and Disaster Recovery (4h)
Core Concepts:
- Native tools: mongodump/mongorestore, and filesystem snapshots
- Backup strategies for replica sets and sharded clusters
- Basic utilization of Cloud Manager/Ops Manager for backup operations
- Disaster Recovery (DR) planning: defining RTO and RPO
Practical Exercises:
- Executing backup and restore procedures on a test database
- Simulating system failure and recovering from backup
- Designing a DR plan for a hypothetical scenario
Module 9: Monitoring and Alerts (4h)
Core Concepts:
- Monitoring tools: mongostat, mongotop, and Cloud Manager/Atlas Monitoring
- Integration concepts and examples with Prometheus + Grafana
- Key metrics: CPU, memory, I/O, oplog size, and latencies
- Alerting mechanisms: defining thresholds and notification channels
Practical Exercises:
- Deploying a local or container-based monitoring agent
- Setting up basic dashboards with sample metrics
- Simulating load spikes and observing alert triggers
Module 10: Maintenance, Upgrades, and Best Practices (4h)
Core Concepts:
- Upgrade strategies for replica sets and sharded clusters
- Data cleanup, compaction, and integrity checks
- Log analysis and regular audit procedures
- 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 grasp of fundamental database concepts and data structures
- Proficiency with Linux command-line interfaces
- Basic proficiency in 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 insight into 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.