1

Simple question, can I reuse one dedicated arbiter machine for many replica sets, or do I need one arbiter machine per replica set. This is significant because in the worst-case scenario I will need one arbiter per shard, which could get expensive.

Thanks

mils
  • 1,878
  • 2
  • 21
  • 42
  • 1
    Arbiters should not be expensive: they are lightweight `mongod` processes that only exist to vote in elections where the configured number of data-bearing members in a replica set would otherwise be even. For a production environment I would recommend **not** using any arbiters where possible. For example: in a three node replica set two data-bearing nodes plus an arbiter creates asymmetric failover. If a data-bearing node fails, there is still a majority for election purposes but there is no longer a second data-bearing node available for data redundancy or acknowledging `w:majority` writes. – Stennie Nov 08 '17 at 09:26

1 Answers1

2

You can run multiple arbiters in a single "machine" by having them run on different ports. Separate replica sets would have separate arbiters.

dzm
  • 22,844
  • 47
  • 146
  • 226
  • Thanks, so should each arbiter point to a different data directory? E.g. `mongod --port 30000 --dbpath /data/arb --replSet rs` – mils Nov 06 '17 at 22:31
  • Right, they'd each have different ports and different dbpath – dzm Nov 06 '17 at 22:36