[SERVER-3084] What is better practice? 2-3 larger shards, or 20-30 smaller shards? Created: 11/May/11  Updated: 12/Jul/16  Resolved: 12/May/11

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Question Priority: Major - P3
Reporter: Colin Davis Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:

 Description   

We're trying to understand the best way to grow our Mongo installs.

Assuming an even distribution shard-key, so that it could shard to N servers effectively, Which would be a better strategy?

2 physical servers with 32GB each, or 32 physical servers with 2GB each?

The second scenario would make more CPUs available, and more disk spindles available, but it would mean that data is less likely to be adjacent on the same server, and that more data would require crossing the network.

Can you advise on which way, in general, is better to proceed?



 Comments   
Comment by Eliot Horowitz (Inactive) [ 12/May/11 ]

I would agree with @andrew.
Overall, fewer shards is generally easier to manage.

Comment by Andrew Armstrong [ 12/May/11 ]

Personally I would pick fewer shards.

Data locality and touching the least amount of servers as possible are good traits to have when doing queries.

Maintenance is another thing to worry about when you start to have many servers, so less is better I think if you can get by.

I'd personally try and start with just one replica set (a single shard), then expand when needed to meet demand.

Generated at Thu Feb 08 03:02:02 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.