OrientJS how to define connection string if there are multiple server hosts?

27 views
Skip to first unread message

Suyog Kale

unread,
Aug 16, 2016, 7:12:47 AM8/16/16
to OrientDB

I have distributed orientDb nodes hosted separately on different machine with static IP. How I can define connection string in my node application using OrientJS?

In case of one node goes down I want to make sure my client is supported by another orientDB node.


Suyog Kale

unread,
Aug 18, 2016, 4:33:01 AM8/18/16
to OrientDB
I am able to connect OrientDB multiple hosts with as below:

var OrientDB = require('orientjs');
var server = OrientDB({
   host:     'Host 1 IP',
   port:     2424,
   username: 'user',
   password: 'pwd',
   servers:  [{host: 'Host 2 IP', port: 2424}]
});
Reply all
Reply to author
Forward
0 new messages