Question

When using orientdb graph model, is there a global configuration to establish all db writes to be asynchronously replicated to other nodes?

Was it helpful?

Solution

All you need is in the file $ORIENTDB_HOME/config/default-distributed-db-config.json. This is the default content:

{
    "replication": true,
    "autoDeploy": true,
    "hotAlignment": true,
    "resyncEvery": 15,
    "clusters": {
        "internal": {
            "replication": false
        },
        "index": {
            "replication": false
        },
        "*": {
            "replication": true,
            "readQuorum": 1,
            "writeQuorum": 2,
            "failureAvailableNodesLessQuorum": false,
            "readYourWrites": true,
            "partitioning": {
                "strategy": "round-robin",
                "default": 0,
                "partitions": [
                    [ "<NEW_NODE>" ]
                ]
            }
        }
    }
}

By default writeQuorum is 2. This means that it waits and checks the answer from at least 2 nodes before to send the ACK to the client. You could just set this to 1, so all the writes will be asynchronous.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top