rqlite-js: How set failover array DataApiClient ?

Hi, rqlite is very light and great for building distributed databases in fast projects. I have problems with rqlite-js about failover automation when i set

const dataApiClient = new DataApiClient(['http://node1:4001','http://node2:4001','http://node3:4001'])

but when node1 is Down then wil fire Error: connect ECONNREFUSED and qlite-js not switch node2, how to automatically failover when node die. This is an important feature for the distributed database client. Thanks

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 16 (5 by maintainers)

Most upvoted comments

@tinamore jqlite-js is v2.4.1 is now available in NPM including fail over retires with exponential back off. Give it a try and let know if it work for you now.

If you want to discuss rqlite vs etcd please try the Google Group for more information https://groups.google.com/g/rqlite

@tinamore fixed in 2.5.3 with tests added