Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mixing Linux and Windows MongoDB replica set and is equal hardware important for sharding

My first question is really simple, I just want to know if I can mix Linux and Windows mongodb servers in my sharding/replica cluster, ofc with same version like 2.2?

For 2nd question, can someone explain what heppens if I have sharding servers with this hardware

  • Server 1 : High Cpu, SSD disk
  • Server 2 : Normal CPU, Sata disk
  • Server 3 : Normal CPU , SSD disk

How will sharding work when we have different hardware servers?

Is it important to build clusters on machines with almost the same hardware?

like image 555
Novkovski Stevo Bato Avatar asked Sep 09 '12 17:09

Novkovski Stevo Bato


1 Answers

There shouldn't be a problem mixing Linux and Windows servers, assuming (as you stated) that the MongoDB versions are equivalent.

Regarding differences in hardware, MongoDB tries to distribute data evenly across shards, and each server will use as many available resources as possible to give the best performance possible. When another process on a server requests some resources, Mongo will relinquish those resources. This will usually mean swapping some data to disk until more RAM becomes available again.

Because your servers will do this, and other operations, at different speeds, the important question becomes "What happens when one server in a shard is running slowly". According to the FAQ:

If a shard is responding slowly, mongos will merely wait for the shard to return results.

So in practice, parts of your sharded collections will be slower than others, but everything should work just fine. You would probably have a better experience if the hardware matched, but it doesn't have to.

like image 61
Kelvin Avatar answered Oct 10 '22 04:10

Kelvin