Quantcast
Channel: StackExchange Replication Questions
Viewing all articles
Browse latest Browse all 17268

MongoDB replica set with write concern w:0

$
0
0

I am trying to configure MongoDB on 3 nodes to provide failover in case some of the nodes are down.

Where one node is down, the election algorithm chooses a primary and both writing and reading works. But with 2 nodes down the election is not allowed since the majority cannot be obtained; the client may read but writing fails.

On the other hand, setting the write concern to 0 should allow writing with only one functional node (though inconsistencies may later arise).

My question is, is possible to have a replica set with write concern 0 to allow writing with two nodes down? It does not seem to work for me; I get a timeout exception (waiting for a server that matches WritableServerSelector).


Viewing all articles
Browse latest Browse all 17268

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>