Course Outline
Module 1: Introduction and MongoDB Architecture (4h)
Core Concepts:
- Historical context and the MongoDB ecosystem
- Typical use cases, along with advantages and limitations
- General architecture: covering instances, processes, and configuration
Practical Application:
- Interactive exploration: establishing connections via Mongo Shell/CLI
- Creating sample databases and collections
Module 2: Installation and Initial Configuration (6h)
Core Concepts:
- Hardware specifications and resource requirements
- Installation procedures on Linux (deb/rpm), Windows, and macOS
- YAML configuration files (mongod.conf): managing dataDir, logDir, bindIp, and port
- Startup options and management via systemd/services
Practical Application:
- Deploying instances on local virtual machines or Docker containers
- Tuning configurations for development versus production settings
- Validating secure remote connectivity
Module 3: Data Modeling and Basic Operations (5h)
Core Concepts:
- BSON documents, collections, and database structure
- Modeling strategies: embedding versus referencing, and data design patterns
- Foundations of basic indexes
- Executing operations using the Mongo Shell and scripting examples with drivers
Practical Application:
- Modeling a specific 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 (4h)
Core Concepts:
- Types of indexes: simple, compound, multikey, text, and geospatial
- Utilizing explain() to analyze query metrics
- Impact of indexes on write performance and memory usage
Practical Application:
- Creating collections populated with test data
- Testing query performance with and without indexes; interpreting explain() output
- Optimizing indexes based on observed access patterns
Module 5: Security (5h)
Core Concepts:
- Authentication mechanisms: SCRAM, LDAP/Kerberos (overview)
- Defining users and creating custom roles
- Implementing TLS/SSL between clients and servers
- At-rest encryption: key management and configuration
- Foundational audit logging
Practical Application:
- Creating users with least-privilege permissions
- Configuring TLS on local instances
- Testing unauthorized access attempts and reviewing audit logs
Module 6: Replication and High Availability (6h)
Core Concepts:
- Replication principles: Primary, Secondary, and oplog
- Replica set configuration: initialization, membership management, and arbitration
- Monitoring status and election processes
- Maintenance tasks: adding/removing members and reassigning priorities
Practical Application:
- Deploying a three-node replica set (locally or on virtual machines)
- Simulating primary node failure and observing failover behavior
- Rebuilding secondary nodes and restoring replica health
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 Application:
- Configuring a basic sharded cluster
- Inserting large-scale datasets to observe data distribution
- Exploring shard key modifications and understanding their 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
- Utilizing Cloud Manager/Ops Manager for backup management
- Disaster Recovery (DR) planning: defining RTO and RPO
Practical Application:
- Executing backup and restore procedures on a test database
- Simulating failures and recovering from backups
- Designing a DR plan for a hypothetical scenario
Module 9: Monitoring and Alerts (4h)
Core Concepts:
- Essential tools: mongostat, mongotop, Cloud Manager/Atlas Monitoring
- Integration concepts with Prometheus and Grafana
- Key metrics to track: CPU, memory, I/O, oplog size, and latencies
- Alert management: setting thresholds and notifications
Practical Application:
- Deploying local or container-based monitoring agents
- Building basic dashboards with sample metrics
- Simulating load to observe 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 review and regular audit practices
- Automating routine tasks using scripts, cronjobs, Ansible, and Terraform
- Data retention and archiving policies
Practical Application:
- Simulating minor and major upgrades in a controlled setting
- Developing automation scripts for backup and monitoring
- Creating a periodic maintenance checklist
Summary and Next Steps
Requirements
- Fundamental understanding of general database concepts and data structures
- Proficiency with Linux command-line utilities
- Basic grasp of networking principles and system administration
Target Audience
- Database administrators and system engineers managing MongoDB
- DevOps and infrastructure teams responsible for deploying and maintaining MongoDB environments
- Developers seeking deeper 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.