简体   繁体   中英

How to configure orientdb for asynchronous replication

使用OrientDB图形模型时,是否存在全局配置来建立所有数据库写入以异步复制到其他节点?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM