Mastering MongoDB 6.x: Expert techniques to run high-volume and fault-tolerant database solutions using MongoDB 6.x, 3rd Edition
- Length: 460 pages
- Edition: 3
- Language: English
- Publisher: Packt Publishing
- Publication Date: 2022-08-30
- ISBN-10: 1803243864
- ISBN-13: 9781803243863
- Sales Rank: #0 (See Top 100 Books)
Design and build solutions with the most powerful document database, MongoDB
Key Features
- Learn from the experts about every new feature in MongoDB 6 and 5
- Develop applications and administer clusters using MongoDB on premise or in the cloud
- Explore code-rich case studies showcasing MongoDB’s major features followed by best practices
Book Description
MongoDB is a leading non-relational database. This book covers all the major features of MongoDB including the latest version 6. MongoDB 6.x adds many new features and expands on existing ones such as aggregation, indexing, replication, sharding and MongoDB Atlas tools. Some of the MongoDB Atlas tools that you will master include Atlas dedicated clusters and Serverless, Atlas Search, Charts, Realm Application Services/Sync, Compass, Cloud Manager and Data Lake.
By getting hands-on working with code using realistic use cases, you will master the art of modeling, shaping and querying your data and become the MongoDB oracle for the business. You will focus on broadly used and niche areas such as optimizing queries, configuring large-scale clusters, configuring your cluster for high performance and availability and many more. Later, you will become proficient in auditing, monitoring, and securing your clusters using a structured and organized approach.
By the end of this book, you will have grasped all the practical understanding needed to design, develop, administer and scale MongoDB-based database applications both on premises and on the cloud.
What you will learn
- Understand data modeling and schema design, including smart indexing
- Master querying data using aggregation
- Use distributed transactions, replication and sharding for better results
- Administer your database using backups and monitoring tools
- Secure your cluster with the best checklists and advice
- Master MongoDB Atlas, Search, Charts, Serverless, Realm, Compass, Cloud Manager and other tools offered in the cloud or on premises
- Integrate MongoDB with other big data sources
- Design and deploy MongoDB in mobile, IoT and serverless environments
Who this book is for
This book is for MongoDB developers and database administrators who want to learn how to model their data using MongoDB in depth, for both greenfield and existing projects. An understanding of MongoDB, shell command skills and basic database design concepts is required to get the most out of this book.
Mastering MongoDB 6.x Third Edition Contributors About the author About the reviewers Preface Who this book is for What this book covers To get the most out of this book Download the example code files Download the color images Conventions used Get in touch Share Your Thoughts Part 1 – Basic MongoDB – Design Goals and Architecture 1 MongoDB – A Database for the Modern Web Technical requirements The evolution of SQL and NoSQL The evolution of MongoDB MongoDB for SQL developers MongoDB for NoSQL developers MongoDB’s key characteristics and use cases Key characteristics Use cases for MongoDB MongoDB criticism MongoDB configuration and best practices Operational best practices Schema design best practices Best practices for write durability Best practices for replication Best practices for sharding Best practices for security Best practices for AWS Reference documentation and further reading Summary 2 Schema Design and Data Modeling Technical requirements Relational schema design MongoDB schema design Data modeling Data types Modeling data for atomic operations Read isolation and consistency Modeling relationships One-to-one One-to-many and many-to-many Modeling data for keyword searches Modeling data for Internet of Things Connecting to MongoDB Connecting using Ruby Connecting using Python Connecting using PHP Summary Part 2 – Querying Effectively 3 MongoDB CRUD Operations Technical requirements CRUD using the shell Scripting for the mongo shell Administration MapReduce in the mongo shell Aggregation framework Securing the shell Authentication with MongoDB The new mongosh shell MongoDB Stable API Summary 4 Auditing Technical requirements Auditing and logging differences Audit setup in MongoDB Enterprise Edition Audit events and format Audit filters Audit guarantee Audit setup in MongoDB Atlas JSON audit filter Audit logging access Audit case study MongoDB CLI Mongo shell and audit logs Summary 5 Advanced Querying Technical requirements MongoDB CRUD operations CRUD using the Ruby driver CRUD in Mongoid CRUD using the Python driver CRUD using PyMODM CRUD using the PHP driver CRUD using Doctrine Update operators Smart querying Change streams Introduction Queryable encryption Summary 6 Multi-Document ACID Transactions Technical requirements Transactions background Exploring ACID properties Atomicity Consistency Isolation Durability When do we need ACID in MongoDB? Building a digital bank using MongoDB E-commerce using MongoDB The best practices and limitations of multi-document ACID transactions Summary 7 Aggregation Technical requirements Why aggregation? Aggregation options Single-purpose aggregation methods Aggregation operators Aggregation pipeline stages Aggregation pipeline expression operators Literal expression operator Miscellaneous operators Object expression operators Expression string operators Text expression operators Timestamp expression operators Trigonometry expression operators Type expression operators Time series collections MongoDB views Limitations Optimizing aggregation pipelines Aggregation use case Summary 8 Indexing Index internals Index types Building and managing indexes Using indexes efficiently Further reading Summary Part 3 – Administration and Data Management 9 Monitoring, Backup, and Security Technical requirements Monitoring clusters What should we monitor? Monitoring memory usage in WiredTiger Tracking page faults Working set calculations Monitoring tools Cluster backups Backup options EC2 backup and restore Incremental backups Securing our clusters Authentication Role-based access control-based authorization Network-level security Auditing security Special cases Overview Summary 10 Managing Storage Engines Pluggable storage engines WiredTiger Encrypted at rest Client-side field-level encryption In-memory Other storage engines Locking in MongoDB Lock reporting Lock yield Commonly used commands and locks Commands requiring a database lock Further reading Summary 11 MongoDB Tooling Technical requirements Introduction to MongoDB tools MongoDB Atlas Setting up a cluster MongoDB Atlas Search MongoDB Kubernetes Operator An introduction to Kubernetes Enterprise Kubernetes Operator MongoDB Atlas Serverless MongoDB Realm Realm Sync Realm Sync data model Realm Sync mode Realm Application Services MongoDB Charts MongoDB Compass MongoDB Connector for Business Intelligence MongoDB Cloud Manager MongoDB Ops Manager Summary 12 Harnessing Big Data with MongoDB Technical requirements What is big data? The big data landscape Message queuing systems Data warehousing MongoDB as a data warehouse Big data use case with servers on-premises Setting up Kafka Setting up Hadoop Using a Hadoop-to-MongoDB pipeline Setting up a Spark connection to MongoDB MongoDB Atlas Data Lake Summary Further reading Part 4 – Scaling and High Availability 13 Mastering Replication Technical requirements Replication Logical or physical replication Different high availability types An architectural overview How do elections work? What is the use case for a replica set? Setting up a replica set Converting a standalone server into a replica set Creating a replica set Read preference Write concern Priority settings for replica set members Production considerations Connecting to a replica set Replica set administration How to perform maintenance on replica sets Initial sync Resyncing a member of a replica set Changing the oplog’s size Reconfiguring a replica set when we have lost the majority of our servers Chained replication Streaming replication Flow control Cloud options for a replica set Amazon DocumentDB Microsoft Azure Cosmos DB MongoDB Atlas Replica set limitations Summary 14 Mastering Sharding Technical requirements Why do we need sharding? Architectural overview Development, continuous deployment, and staging environments Planning ahead with sharding Setting up sharding Choosing the shard key Choosing the correct shard key Sharding administration and monitoring Balancing data – how to track and keep our data balanced Chunk administration Sharding limitations Querying sharded data The query router Hedged reads Querying using Ruby Performance comparison with replica sets Sharding recovery mongos mongod Config server A shard goes down The entire cluster goes down Further reading Summary 15 Fault Tolerance and High Availability Application design Schema-less doesn’t mean schema design-less Design patterns Design anti-patterns Read performance optimization Defensive coding Elevating operations Boosting security Enabling security by default Isolating our servers Checklists Summary Further reading Index Why subscribe? Other Books You May Enjoy Packt is searching for authors like you Share Your Thoughts
Donate to keep this site alive
How to download source code?
1. Go to: https://github.com/PacktPublishing
2. In the Find a repository… box, search the book title: Mastering MongoDB 6.x: Expert techniques to run high-volume and fault-tolerant database solutions using MongoDB 6.x, 3rd Edition
, sometime you may not get the results, please search the main title.
3. Click the book title in the search results.
3. Click Code to download.
1. Disable the AdBlock plugin. Otherwise, you may not get any links.
2. Solve the CAPTCHA.
3. Click download link.
4. Lead to download server to download.