🥇 Best Practices
🧑🏫 Full Courses from Atlas
📄 Schema Patterns
💰 Transactions Background
📺 Videos Tutorials
🧑🔧 Big Data Pipeline
MongoDB World 2019: Raiders of the Anti-patterns: A Journey Towards Fixing Schema Mistakes in MongoDBAs a software adventurer, Charles "Indy" Sarrazin, has brought numerous customers through the MongoDB world, using his extensive knowledge to make sure they always got the most out of their databases. Let us embark on a journey inside the Document Model, where we will identify, analyze and fix anti-patterns.https://www.slideshare.net/mongodb/mongodb-world-2019-raiders-of-the-antipatterns-a-journey-towards-fixing-schema-mistakes-in-mongodb
Anti-patterns commonly found with MongoDB
Practical MongoDB Aggregations BookLearn how to develop effective and optimal data manipulation and analytics pipelines with this book, using the MongoDB Aggregation Frameworkhttps://www.practical-mongodb-aggregations.com/
MongoDB Aggregation Pipeline Cookbook
View original embedded content on Notion
This is a set of tools to view/process the MongoDB logs for debugging and perf tuning
How To SELECT ... FOR UPDATE inside MongoDB Transactions | MongoDB BlogThe most common question that I receive as a MongoDB Consultant since we introduced Multi-document ACID transactions in MongoDB 4.0 is: "How can I be sure that the documents that I am reading inside a transaction are not modified by another operation before the commit?"https://www.mongodb.com/blog/post/how-to-select--for-update-inside-mongodb-transactions
Record level locks
Improve MongoDB Performance Using ProjectionThis article documents all my findings and analysis on how much performance was improved using projection in MongoDB. At the end of this article, we will be able to know whether MongoDB query performance will be improved by leveraging projection. Without further ado, let's start.https://betterprogramming.pub/improve-mongodb-performance-using-projection-c08c38334269
Building with Patterns: The Bucket PatternOne frequently asked question when it comes to MongoDB is "How do I structure my schema in MongoDB for my application?" The honest answer is, it depends. Does your application do more reads than writes? What data needs to be together when read from the database? What performance considerations are there?https://www.mongodb.com/developer/how-to/polymorphic-pattern/
Pre-paginated records grouped into buckets (with a continuation token)
Repeatable Performance Tests: CPU Options Are Best Disabled | MongoDB BlogIn an effort to improve repeatability, the MongoDB Performance team set out to reduce noise on several performance test suites run on EC2 instances. At the beginning of the project, it was unclear whether our goal of running repeatable performance tests in a public cloud was achievable.https://www.mongodb.com/blog/post/repeatable-performance-tests-cpu-options-best-disabled
When optimizing IOPS, optimizing CPU utilization will increase performance and consistency significantly
blog.insiderattack.nethttps://blog.insiderattack.net/implementing-event-sourcing-and-cqrs-pattern-with-mongodb-66991e7b72be
5 successful tips you need to optimise MongoDBIncrease performance four times and reduce the size of your MongoDB by 83 % with these five suggestions. Go through our optimization experiments and see how we've reached these results. Relational databases have been around for a long time and they have been the primary way to store data in a consistent way.https://medium.com/tech-hunters/optimising-size-performance-mongodb-ad7ea5f30dc5
MongoDB: Storage Optimization Just by Using Shorter Filed-Names/Enum-Values.This is an easy small straightforward change not used much, We might not want to shorten the field-name/enum values present for the existing collection, but keeping this in mind when creating a new collection will help, will see how. Filed name size/length contributes to the document size as MongoDB stores all field names in every document.https://medium.com/swlh/mongodb-use-shorter-filed-names-enum-values-optimize-disk-memory-f73f64db324e
Short name optimization Frank previously mentioned
View original embedded content on Notion
Generate fake data to use in performance testing with MongoDB
Configuration File OptionsThe following page describes the configuration options available in MongoDB 5.0. For configuration file options for other versions of MongoDB, see the appropriate version of the MongoDB Manual. You can configure and instances at startup using a configuration file. The configuration file contains settings that are equivalent to the and command-line options.https://docs.mongodb.com/manual/reference/configuration-options/#mongodb-setting-storage.journal.commitIntervalMs
Lower values increase the durability of the journal, at the expense of disk performance.
Advanced Options for MongoDB Deployments - MongoDB Ops Manager upcomingThe following mongod and mongos configuration options are available through the Ops Manager Advanced Configuration Options field when you deploy MongoDB. You select advanced options when deploying: The Ops Manager Advanced Configuration Options map to the MongoDB configuration options and parameters described as follows.https://docs.opsmanager.mongodb.com/current/reference/deployment-advanced-options/
All options for MongoDB instances
Reducing Queue Times by Using Speculative Execution | MongoDB BlogWhen solving concurrency problems in software, the simplest solution is often to make the trickiest part of the problem serial. Here at MongoDB, this is exactly the approach we took to implement a commit queue, where engineers submit code changes to be tested and then merged into a repository.https://www.mongodb.com/blog/post/reducing-queue-times-using-speculative-execution
Honestly not sure I understand this one, but it looks like it could allow parallel processing with bull queues needed to scale horizontally.
Available block sizes
Any document that is larger than the block size, will double the IOPS consumption when performing actions on that document
64 KB
128 KB
256 KB
512 KB
1 MB
2 MB
4 MB
8 MB
15 MB
Considerations for Shard-Key
- Cardinality
- Key distribution across cardinal values
- Hot spot consideration
- Hashed strategy — Optimal write scalability but read scalability is limited
- Range strategy (with and without Tags) — Optimal read scalability
MongoDB: ShardingSharding is Mongo's answer for scaling. It is a way of distributing both work and data. More work over more data. And it is required for big-data problems - really really big data. So it is important to understand It achieves the scaling requirements by scaling out, i.e.https://sarada-sastri.medium.com/mongodb-sharding-95871e5dea1c
✦You made it. Thanks for reading.