2 ms·
"Did they test against a single MongoDB server or cluster?" Couchbase: 9 nodes on 9 AWS instances (1 node per instance). MongoDB: 18 nodes on 9 AWS instances (
by skjhn 10y ago
"Did they test against a single MongoDB server or cluster?"
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?
- Keverw 10y agoOh wow. More MongoDB servers and it did worse? That's really surprising and disappointing for MongoDB. 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.
- skjhn 10y agoSort of. One of the requirements was replication. The databases had to replicate every document so that it was stored on two different nodes. This ensures availability. The only way to do that with MongoDB is to run secondary nodes too. Now, it's possible to do say 4 primary and 4 secondaries, but performance would go down because only 4 nodes could do the writing. The problem is that it rarely works out. It's fine at first, but down the road...