how does one connect to a distributed setup in orientdb. I have 3 servers cluster setup and running. They are communicating and data from one is available from the other. But how do I connect to them as a cluster in my program? in mongo there is the connection URI :
mongodb://[username:password@]host1[:port1][,...hostN[:portN]][/[database][?options]]
is there something similar in orientdb? Currently, I connect to just one and insert my data but the program stops when this server stops for some reason. can I automatically have the program connect to one of the other servers and continue? All 3 are masters in this case, no replication servers.
You need to first authenticate the user, using basic auth, with the /connect/ API which will return the OSESSIONID as a cookie. Then pass the OSESSIONID as a header to other APIs (in postman it is auto passed to other APIs). Some of the OrientDB REST APIs require basic auth - they document it as "Requires additional authentication to the server."