by skjhn · 10y ago · 0 comments
Couchbase: 9 nodes on 9 AWS instances (1 node per instance). MongoDB: 18 nodes on 9 AWS instances (1 primary and 1 secondary per instance).
"Well if you pick a good shard key it should be able to go to a single node."
Not necessarily. From the docs: In some cases, when the shard key or a prefix of the shard key is a part of the query, the mongos can route the query to a subset of the shards. Otherwise, the mongos must direct the query to all shards that hold documents for that collection.
If you query your data in many ways, you have lots of queries not based on the shard key. Considers users. What do you shard on, email? What if you want to query by location, age, status, and/or preference?
hmm and good point. It does seem like shard key would be possibly limited to just 1 common query. I haven't really got to that part yet myself, just going by what I've learned so far in the class I'm taking.
edit: oh reread. 2 servers per instance, not the same amount of actual server instances. I wonder if you ran 1 per instance if you'd get better results...
I know the MongoDB people seem to hype it up and some large companies are using it. The system does seem like a good dream if it worksout.