dosubot[bot] commented on issue #2787: URL: https://github.com/apache/incubator-hugegraph/issues/2787#issuecomment-2952355211
<!-- Answer --> HStore(Raft+RocksDB)分布式部署时,核心配置参数如下: 1. **raft.group_peers**:必填,指定所有 Raft 节点的 RPC 地址,格式如 `raft.group_peers=192.168.230.128:8091,192.168.230.129:8091,192.168.230.130:8091`,所有节点需保持一致。[参考](https://github.com/apache/incubator-hugegraph/blob/337dc86567834acd717a2240a79fef2815d4bb6f/hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/config/ServerOptions.java) 2. **raft.mode**:已废弃,建议不要再配置,实际是否启用 raft 由 `raft.group_peers` 是否存在决定。[参考](https://github.com/apache/incubator-hugegraph/blob/337dc86567834acd717a2240a79fef2815d4bb6f/hugegraph-server/hugegraph-dist/src/assembly/static/conf/graphs/hugegraph.properties) 3. **推荐 raft 相关参数**(全部写在 `graphs/hugegraph.properties`,单位见注释): ``` # Raft 选举超时时间(毫秒,默认10000) raft.election_timeout=10000 # Raft RPC 连接超时(毫秒,默认5000) raft.rpc_connect_timeout=5000 # Raft RPC 超时(秒,默认60) raft.rpc_timeout=60 # 是否开启并行日志复制(默认true) raft.use_replicator_pipeline=true # 后端线程数(默认CPU核数) raft.backend_threads=8 # 读索引线程数(默认8) raft.read_index_threads=8 ``` 4. **rocksdb 相关建议**:合理设置 `rocksdb.write_buffer_size`、`rocksdb.max_write_buffer_number`、`rocksdb.block_cache_size`,多盘用 `rocksdb.data_disks`,定期 compact,JVM 内存建议调大。[参考](https://github.com/apache/incubator-hugegraph/issues/2762) 5. **端口分配**:每个节点的 REST、Gremlin、RPC 端口不能冲突,建议如 8081/8181/8091,8082/8182/8092,8083/8183/8093。[参考](https://github.com/apache/incubator-hugegraph/issues/2725) 6. **backend/serializer**:分布式部署推荐 `backend=hstore`,`serializer=binary`。[参考](https://github.com/apache/incubator-hugegraph/discussions/2710) 7. **初始化**:所有节点配置一致后,分别执行 `init-store.sh` 初始化,再启动服务。 注意:`raft.endpoint`、`raft.election_timeout_ms`、`raft.rpc_connect_timeout_ms`、`raft.rpc_timeout_ms` 等参数已废弃,需用上面新参数替换。[参考](https://github.com/apache/incubator-hugegraph/issues/2725) 如需详细样例或遇到具体报错可补充日志。 <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/f7b725b1-2440-48c3-8a9a-259b59376c77?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/f7b725b1-2440-48c3-8a9a-259b59376c77?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/f7b725b1-2440-48c3-8a9a-259b59376c77?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/f7b725b1-2440-48c3-8a9a-259b59376c77?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/f7b725b1-2440-48c3-8a9a-259b59376c77?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/f7b725b1-2440-48c3-8a9a-259b59376c77?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/f7b725b1-2440-48c3-8a9a-259b59376c77?feedback_type=other)</sup> [](https://go.dosu.dev/discord-bot) [! [Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/incubator-hugegraph/issues/2787) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@hugegraph.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@hugegraph.apache.org For additional commands, e-mail: issues-h...@hugegraph.apache.org