0

I want to know how does nodejs driver behave when PRIMARY GOES DOWN.

Issue db.shutdownServer() on Primary "SECONDARY" become Primary right away. But driver takes at least 11 second hanging before issuing another write command again.

I test with various number for connectTimeoutMS & socketTimeoutMS & haInterval But it does not help.

Connection String:

"mongodb://xxx:xxx@1.10.21.67:27017,1.10.21.98:27017/test?replicaSet=hhawsmongo&poolSize=1&autoReconnect=true&reconnectTries=100&connectTimeoutMS=1000&socketTimeoutMS=1000&haInterval=500&forceServerObjectId=true"

https://jira.mongodb.org/browse/NODE-973

Vince Bowdren
  • 8,326
  • 3
  • 31
  • 56
Mike
  • 351
  • 2
  • 12
  • Are you sure that the secondary becomes primary _right away_? Typically it takes a few seconds for the nodes to be sure that there is a communication problem, to agree to holding a new election, to elect a node to be primary, and for that node to transition. – Vince Bowdren Mar 29 '17 at 09:06
  • I can see with rs.status() it may take a couple of seconds. But driver takes more then 10 seconds. But they make it critical issue. So I believe I am right :) and they are trying to fix – Mike Mar 30 '17 at 03:41

0 Answers0