Any recommended readings for setting up mongodb for sharding/scalability?
I’m looking for best practices. i don’t know a lot about sharding or scaling db solutions. are there examples out there with practical real world examples?
i apologize if i’m using the wrong terms.
- Is my understanding correct in that mongodb acts like a “single database” but knows how to distribute data across disparate instances of mongodb (maybe located in different locations, etc)
- Are each of those instances called shards? is that data replicated across all instances?
MongoDB provides two types of scaling.
Those links are a reasonable place to start.
There are also numerous slides and videos from the multiple Mongo conferences that have run recently. Here are some recent ones with use cases.
Think of a shard as a “slice” of your data. Each shard is generally composed of a replica set. So each shard has multiple computers managing replication of data.
Sharding allows MongoDB to automatically distribute writes. But there’s a little more to it, so I think it’s best you work through some of the presentations.