ONgDB集群如何应对写入节点发生自动切换

 

Here’s the table of contents:

  1. 请求无法自动切换
  2. 请求可以自动切换
  3. bolt+routing自动路由机制

请求无法自动切换

bin/cypher-shell -a bolt://ip:port -u username -p password

请求可以自动切换

bin/cypher-shell -a bolt+routing://ip:port -u username -p password

bolt+routing自动路由机制

  • 命令行执行cql
    echo 'MATCH (n) RETURN n LIMIT 10;' | /home/ongdb/ongdb-enterprise-3.5.22/bin/cypher-shell -a bolt+routing://10.20.12.173:7687 -u neo4j -p testlab%pro
    
    echo 'CALL custom.task('\''主数据'\'');' | /home/ongdb/ongdb-enterprise-3.5.22/bin/cypher-shell -a bolt+routing://10.20.12.173:7687 -u neo4j -p testlab%pro
    
  • 命令行执行cql脚本文件
    cat ./test.cql | /home/ongdb/ongdb-enterprise-3.5.22/bin/cypher-shell -a bolt+routing://10.20.12.173:7687 -u neo4j -p testlab%pro