MongoDB sharding on Windows using Docker containers
Budget $10-30 USD
You don't have to do everything by yourself. You can also tell me how can we solve the problem. If your solution works then you will get paid, guranteed. :)
We have a large MongoDB collection ( around 60 million documents ). We tried to shard the collection but got an error when tried to add a shard to the mongos.
The error message is "Failed to refresh the balancer settings:: caused by :: Could not find host matching read preference { mode: "nearest"} for set cfgrs"
"cfgrs" is the config server
We have 4 shards. shard 1, config servers and monogs (router) is on the main PC ( DESKTOP-4KCIA3T). We can add shard 1 without any problem but the error occurs when we try to add other shards from different PC.
### Shards for `pages` collection
### Config Server
PC name: `DESKTOP-4KCIA3T`
Disk Type: `SSD`
Containers: `[cfgsvr1]`
Replicas: `[cfgrs]`
PORTS: `[40001]`
IP: `[....]`
#### Shard 1
PC name: `DESKTOP-4KCIA3T`
Disk Type: `SSD`
Containers: `[shard1svr1]`
Replicas: `[shard1rs]`
PORTS: `[50001]`
IP: `[....]`
#### Shard 2
PC name: `NEWDATAPC 7`
Disk Type: `SSD`
Containers: `[shard2svr1]`
Replicas: `[shard2rs]`
PORTS: `[50001]`
IP: `[.....]`
#### Shard 3
PC name: `NEWDATAPC 6`
Disk Type: `SSD`
Containers: `[shard3svr1]`
Replicas: `[shard3rs]`
PORTS: `[50001]`
IP: `[.....]`
#### Shard 4
PC name: `Post-Match-Main`
Disk Type: `SSD`
Containers: `[shard4svr1]`
Replicas: `[shard4rs]`
PORTS: `[50001]`
IP: `[.....]`
If you have any idea what we are doing wrong please let us know. Let us know if you have any questions.
2 freelancers are bidding on average $33 for this job
Hi - I am a mongoDB certified DBA and developer with over 5 years of experience handling mongo databases. I have experience in setting up and configuring shard clusters so I can look into the issue you are facing, if y More
I am a Mongodb database certified administrator and even worked alot on performance optimizations i can help you in creating shards and sharing concepts please contact me in case if your serious about this sharing More