为什么启动 ArangoDB 有这么多不同的方法
Why so many different ways to start a ArangoDB
我正在评估 ArangoDB 并认为至少有 3 种方式来启动数据库。
- 阿兰戈什
- 阿兰戈德
- arangodb
- arangocli - 这个属于不同的类别
这一切都非常令人困惑,有人可以提供有关不同选项的可见性以及启动引擎的最佳方式。
谢谢
这些并不是启动 Arango 的不同方式。这些是可以与 Arango 一起使用的不同工具
arangosh 是一个 shell 工具,可用于管理数据库以及 运行ning ad-hoc 查询。它不启动服务器,它只启动连接到服务器
的shell
arangod:这是启动 Arangodb 时 运行 的守护进程。事实上,要启动服务器,您通常 运行(至少 Mac)/usr/local/Cellar/arangodb/3.4.0/sbin/arangod
arangodb:这是db安装包。例如,在 Mac 你会 运行 brew install arangodb
在你的机器上安装 arangodb
arangocli:这只是一个用于 运行 ad-hoc 查询的 cli 工具。
arangod
启动单个 ArangoDB 服务器,这足以 运行 单实例部署。 运行 更复杂的部署(例如集群、主动故障转移)需要多个 arangod
进程。
例如,一个包含 3 个代理、2 个数据库服务器和 2 个协调器的集群总共需要 8 个 arangod
进程。更多信息可以在 Cluster - Manual Start 文档中找到。
为了简化部署,建议使用arangodb
入门工具。 arangodb
的执行会为每个 dbserver、协调器和代理初始化一个 arangod
进程。例如。使用 arangodb --starter.local
启动本地 3 节点集群在内部启动 9 arangod
个进程:3 个数据库服务器、3 个协调器和 3 个代理。 运行宁arangod
进程可以用ps auxw | grep arangod
检查。
示例输出如下所示:
ps auxw | grep arangod
max 8099 1.9 0.1 114712 8736 pts/0 Sl+ 14:47 0:00 arangodb --starter.local
max 8118 3.9 2.5 635016 203736 pts/0 Sl+ 14:47 0:00 /usr/sbin/arangod -c /home/max/Documents/starter/test/local-slave-2/agent8551/arangod.conf --database.directory /home/max/Documents/starter/test/local-slave-2/agent8551/data --javascript.startup-directory /usr/share/arangodb3/js --javascript.app-path /home/max/Documents/starter/test/local-slave-2/agent8551/apps --log.file /home/max/Documents/starter/test/local-slave-2/agent8551/arangod.log --log.force-direct false --javascript.copy-installation true --agency.activate true --agency.my-address tcp://localhost:8551 --agency.size 3 --agency.supervision true --foxx.queues false --server.statistics false --agency.endpoint tcp://localhost:8531 --agency.endpoint tcp://localhost:8541
max 8165 10.5 2.6 676548 215908 pts/0 Sl+ 14:47 0:01 /usr/sbin/arangod -c /home/max/Documents/starter/test/agent8531/arangod.conf --database.directory /home/max/Documents/starter/test/agent8531/data --javascript.startup-directory /usr/share/arangodb3/js --javascript.app-path /home/max/Documents/starter/test/agent8531/apps --log.file /home/max/Documents/starter/test/agent8531/arangod.log --log.force-direct false --javascript.copy-installation true --agency.activate true --agency.my-address tcp://localhost:8531 --agency.size 3 --agency.supervision true --foxx.queues false --server.statistics false --agency.endpoint tcp://localhost:8541 --agency.endpoint tcp://localhost:8551
max 8168 5.4 2.6 705236 216828 pts/0 Sl+ 14:47 0:00 /usr/sbin/arangod -c /home/max/Documents/starter/test/local-slave-2/dbserver8550/arangod.conf --database.directory /home/max/Documents/starter/test/local-slave-2/dbserver8550/data --javascript.startup-directory /usr/share/arangodb3/js --javascript.app-path /home/max/Documents/starter/test/local-slave-2/dbserver8550/apps --log.file /home/max/Documents/starter/test/local-slave-2/dbserver8550/arangod.log --log.force-direct false --javascript.copy-installation true --cluster.my-address tcp://localhost:8550 --cluster.my-role PRIMARY --foxx.queues false --server.statistics true --cluster.agency-endpoint tcp://localhost:8531 --cluster.agency-endpoint tcp://localhost:8541 --cluster.agency-endpoint tcp://localhost:8551
max 8171 4.8 2.5 641160 204968 pts/0 Sl+ 14:47 0:00 /usr/sbin/arangod -c /home/max/Documents/starter/test/local-slave-1/agent8541/arangod.conf --database.directory /home/max/Documents/starter/test/local-slave-1/agent8541/data --javascript.startup-directory /usr/share/arangodb3/js --javascript.app-path /home/max/Documents/starter/test/local-slave-1/agent8541/apps --log.file /home/max/Documents/starter/test/local-slave-1/agent8541/arangod.log --log.force-direct false --javascript.copy-installation true --agency.activate true --agency.my-address tcp://localhost:8541 --agency.size 3 --agency.supervision true --foxx.queues false --server.statistics false --agency.endpoint tcp://localhost:8531 --agency.endpoint tcp://localhost:8551
max 8302 6.4 2.6 696532 216668 pts/0 Sl+ 14:47 0:00 /usr/sbin/arangod -c /home/max/Documents/starter/test/dbserver8530/arangod.conf --database.directory /home/max/Documents/starter/test/dbserver8530/data --javascript.startup-directory /usr/share/arangodb3/js --javascript.app-path /home/max/Documents/starter/test/dbserver8530/apps --log.file /home/max/Documents/starter/test/dbserver8530/arangod.log --log.force-direct false --javascript.copy-installation true --cluster.my-address tcp://localhost:8530 --cluster.my-role PRIMARY --foxx.queues false --server.statistics true --cluster.agency-endpoint tcp://localhost:8531 --cluster.agency-endpoint tcp://localhost:8541 --cluster.agency-endpoint tcp://localhost:8551
max 8304 26.7 2.4 744684 199052 pts/0 Sl+ 14:47 0:02 /usr/sbin/arangod -c /home/max/Documents/starter/test/local-slave-2/coordinator8549/arangod.conf --database.directory /home/max/Documents/starter/test/local-slave-2/coordinator8549/data --javascript.startup-directory /usr/share/arangodb3/js --javascript.app-path /home/max/Documents/starter/test/local-slave-2/coordinator8549/apps --log.file /home/max/Documents/starter/test/local-slave-2/coordinator8549/arangod.log --log.force-direct false --javascript.copy-installation true --cluster.my-address tcp://localhost:8549 --cluster.my-role COORDINATOR --foxx.queues true --server.statistics true --cluster.agency-endpoint tcp://localhost:8531 --cluster.agency-endpoint tcp://localhost:8541 --cluster.agency-endpoint tcp://localhost:8551
max 8306 5.8 2.6 711380 215200 pts/0 Sl+ 14:47 0:00 /usr/sbin/arangod -c /home/max/Documents/starter/test/local-slave-1/dbserver8540/arangod.conf --database.directory /home/max/Documents/starter/test/local-slave-1/dbserver8540/data --javascript.startup-directory /usr/share/arangodb3/js --javascript.app-path /home/max/Documents/starter/test/local-slave-1/dbserver8540/apps --log.file /home/max/Documents/starter/test/local-slave-1/dbserver8540/arangod.log --log.force-direct false --javascript.copy-installation true --cluster.my-address tcp://localhost:8540 --cluster.my-role PRIMARY --foxx.queues false --server.statistics true --cluster.agency-endpoint tcp://localhost:8531 --cluster.agency-endpoint tcp://localhost:8541 --cluster.agency-endpoint tcp://localhost:8551
max 8318 27.5 2.5 760064 202456 pts/0 Sl+ 14:47 0:02 /usr/sbin/arangod -c /home/max/Documents/starter/test/coordinator8529/arangod.conf --database.directory /home/max/Documents/starter/test/coordinator8529/data --javascript.startup-directory /usr/share/arangodb3/js --javascript.app-path /home/max/Documents/starter/test/coordinator8529/apps --log.file /home/max/Documents/starter/test/coordinator8529/arangod.log --log.force-direct false --javascript.copy-installation true --cluster.my-address tcp://localhost:8529 --cluster.my-role COORDINATOR --foxx.queues true --server.statistics true --cluster.agency-endpoint tcp://localhost:8531 --cluster.agency-endpoint tcp://localhost:8541 --cluster.agency-endpoint tcp://localhost:8551
max 8321 32.8 2.5 764160 202212 pts/0 Sl+ 14:47 0:02 /usr/sbin/arangod -c /home/max/Documents/starter/test/local-slave-1/coordinator8539/arangod.conf --database.directory /home/max/Documents/starter/test/local-slave-1/coordinator8539/data --javascript.startup-directory /usr/share/arangodb3/js --javascript.app-path /home/max/Documents/starter/test/local-slave-1/coordinator8539/apps --log.file /home/max/Documents/starter/test/local-slave-1/coordinator8539/arangod.log --log.force-direct false --javascript.copy-installation true --cluster.my-address tcp://localhost:8539 --cluster.my-role COORDINATOR --foxx.queues true --server.statistics true --cluster.agency-endpoint tcp://localhost:8531 --cluster.agency-endpoint tcp://localhost:8541 --cluster.agency-endpoint tcp://localhost:8551
当指定启动程序 arangodb
的选项为 --server.storage-engine rocksdb
时,此选项将传递给启动程序的所有 arangod
进程。
可以在文档的 Deployment 章节中找到各种部署模式的详细概述。
我正在评估 ArangoDB 并认为至少有 3 种方式来启动数据库。
- 阿兰戈什
- 阿兰戈德
- arangodb
- arangocli - 这个属于不同的类别
这一切都非常令人困惑,有人可以提供有关不同选项的可见性以及启动引擎的最佳方式。
谢谢
这些并不是启动 Arango 的不同方式。这些是可以与 Arango 一起使用的不同工具
arangosh 是一个 shell 工具,可用于管理数据库以及 运行ning ad-hoc 查询。它不启动服务器,它只启动连接到服务器
的shellarangod:这是启动 Arangodb 时 运行 的守护进程。事实上,要启动服务器,您通常 运行(至少 Mac)/usr/local/Cellar/arangodb/3.4.0/sbin/arangod
arangodb:这是db安装包。例如,在 Mac 你会 运行 brew install arangodb
在你的机器上安装 arangodb
arangocli:这只是一个用于 运行 ad-hoc 查询的 cli 工具。
arangod
启动单个 ArangoDB 服务器,这足以 运行 单实例部署。 运行 更复杂的部署(例如集群、主动故障转移)需要多个 arangod
进程。
例如,一个包含 3 个代理、2 个数据库服务器和 2 个协调器的集群总共需要 8 个 arangod
进程。更多信息可以在 Cluster - Manual Start 文档中找到。
为了简化部署,建议使用arangodb
入门工具。 arangodb
的执行会为每个 dbserver、协调器和代理初始化一个 arangod
进程。例如。使用 arangodb --starter.local
启动本地 3 节点集群在内部启动 9 arangod
个进程:3 个数据库服务器、3 个协调器和 3 个代理。 运行宁arangod
进程可以用ps auxw | grep arangod
检查。
示例输出如下所示:
ps auxw | grep arangod
max 8099 1.9 0.1 114712 8736 pts/0 Sl+ 14:47 0:00 arangodb --starter.local
max 8118 3.9 2.5 635016 203736 pts/0 Sl+ 14:47 0:00 /usr/sbin/arangod -c /home/max/Documents/starter/test/local-slave-2/agent8551/arangod.conf --database.directory /home/max/Documents/starter/test/local-slave-2/agent8551/data --javascript.startup-directory /usr/share/arangodb3/js --javascript.app-path /home/max/Documents/starter/test/local-slave-2/agent8551/apps --log.file /home/max/Documents/starter/test/local-slave-2/agent8551/arangod.log --log.force-direct false --javascript.copy-installation true --agency.activate true --agency.my-address tcp://localhost:8551 --agency.size 3 --agency.supervision true --foxx.queues false --server.statistics false --agency.endpoint tcp://localhost:8531 --agency.endpoint tcp://localhost:8541
max 8165 10.5 2.6 676548 215908 pts/0 Sl+ 14:47 0:01 /usr/sbin/arangod -c /home/max/Documents/starter/test/agent8531/arangod.conf --database.directory /home/max/Documents/starter/test/agent8531/data --javascript.startup-directory /usr/share/arangodb3/js --javascript.app-path /home/max/Documents/starter/test/agent8531/apps --log.file /home/max/Documents/starter/test/agent8531/arangod.log --log.force-direct false --javascript.copy-installation true --agency.activate true --agency.my-address tcp://localhost:8531 --agency.size 3 --agency.supervision true --foxx.queues false --server.statistics false --agency.endpoint tcp://localhost:8541 --agency.endpoint tcp://localhost:8551
max 8168 5.4 2.6 705236 216828 pts/0 Sl+ 14:47 0:00 /usr/sbin/arangod -c /home/max/Documents/starter/test/local-slave-2/dbserver8550/arangod.conf --database.directory /home/max/Documents/starter/test/local-slave-2/dbserver8550/data --javascript.startup-directory /usr/share/arangodb3/js --javascript.app-path /home/max/Documents/starter/test/local-slave-2/dbserver8550/apps --log.file /home/max/Documents/starter/test/local-slave-2/dbserver8550/arangod.log --log.force-direct false --javascript.copy-installation true --cluster.my-address tcp://localhost:8550 --cluster.my-role PRIMARY --foxx.queues false --server.statistics true --cluster.agency-endpoint tcp://localhost:8531 --cluster.agency-endpoint tcp://localhost:8541 --cluster.agency-endpoint tcp://localhost:8551
max 8171 4.8 2.5 641160 204968 pts/0 Sl+ 14:47 0:00 /usr/sbin/arangod -c /home/max/Documents/starter/test/local-slave-1/agent8541/arangod.conf --database.directory /home/max/Documents/starter/test/local-slave-1/agent8541/data --javascript.startup-directory /usr/share/arangodb3/js --javascript.app-path /home/max/Documents/starter/test/local-slave-1/agent8541/apps --log.file /home/max/Documents/starter/test/local-slave-1/agent8541/arangod.log --log.force-direct false --javascript.copy-installation true --agency.activate true --agency.my-address tcp://localhost:8541 --agency.size 3 --agency.supervision true --foxx.queues false --server.statistics false --agency.endpoint tcp://localhost:8531 --agency.endpoint tcp://localhost:8551
max 8302 6.4 2.6 696532 216668 pts/0 Sl+ 14:47 0:00 /usr/sbin/arangod -c /home/max/Documents/starter/test/dbserver8530/arangod.conf --database.directory /home/max/Documents/starter/test/dbserver8530/data --javascript.startup-directory /usr/share/arangodb3/js --javascript.app-path /home/max/Documents/starter/test/dbserver8530/apps --log.file /home/max/Documents/starter/test/dbserver8530/arangod.log --log.force-direct false --javascript.copy-installation true --cluster.my-address tcp://localhost:8530 --cluster.my-role PRIMARY --foxx.queues false --server.statistics true --cluster.agency-endpoint tcp://localhost:8531 --cluster.agency-endpoint tcp://localhost:8541 --cluster.agency-endpoint tcp://localhost:8551
max 8304 26.7 2.4 744684 199052 pts/0 Sl+ 14:47 0:02 /usr/sbin/arangod -c /home/max/Documents/starter/test/local-slave-2/coordinator8549/arangod.conf --database.directory /home/max/Documents/starter/test/local-slave-2/coordinator8549/data --javascript.startup-directory /usr/share/arangodb3/js --javascript.app-path /home/max/Documents/starter/test/local-slave-2/coordinator8549/apps --log.file /home/max/Documents/starter/test/local-slave-2/coordinator8549/arangod.log --log.force-direct false --javascript.copy-installation true --cluster.my-address tcp://localhost:8549 --cluster.my-role COORDINATOR --foxx.queues true --server.statistics true --cluster.agency-endpoint tcp://localhost:8531 --cluster.agency-endpoint tcp://localhost:8541 --cluster.agency-endpoint tcp://localhost:8551
max 8306 5.8 2.6 711380 215200 pts/0 Sl+ 14:47 0:00 /usr/sbin/arangod -c /home/max/Documents/starter/test/local-slave-1/dbserver8540/arangod.conf --database.directory /home/max/Documents/starter/test/local-slave-1/dbserver8540/data --javascript.startup-directory /usr/share/arangodb3/js --javascript.app-path /home/max/Documents/starter/test/local-slave-1/dbserver8540/apps --log.file /home/max/Documents/starter/test/local-slave-1/dbserver8540/arangod.log --log.force-direct false --javascript.copy-installation true --cluster.my-address tcp://localhost:8540 --cluster.my-role PRIMARY --foxx.queues false --server.statistics true --cluster.agency-endpoint tcp://localhost:8531 --cluster.agency-endpoint tcp://localhost:8541 --cluster.agency-endpoint tcp://localhost:8551
max 8318 27.5 2.5 760064 202456 pts/0 Sl+ 14:47 0:02 /usr/sbin/arangod -c /home/max/Documents/starter/test/coordinator8529/arangod.conf --database.directory /home/max/Documents/starter/test/coordinator8529/data --javascript.startup-directory /usr/share/arangodb3/js --javascript.app-path /home/max/Documents/starter/test/coordinator8529/apps --log.file /home/max/Documents/starter/test/coordinator8529/arangod.log --log.force-direct false --javascript.copy-installation true --cluster.my-address tcp://localhost:8529 --cluster.my-role COORDINATOR --foxx.queues true --server.statistics true --cluster.agency-endpoint tcp://localhost:8531 --cluster.agency-endpoint tcp://localhost:8541 --cluster.agency-endpoint tcp://localhost:8551
max 8321 32.8 2.5 764160 202212 pts/0 Sl+ 14:47 0:02 /usr/sbin/arangod -c /home/max/Documents/starter/test/local-slave-1/coordinator8539/arangod.conf --database.directory /home/max/Documents/starter/test/local-slave-1/coordinator8539/data --javascript.startup-directory /usr/share/arangodb3/js --javascript.app-path /home/max/Documents/starter/test/local-slave-1/coordinator8539/apps --log.file /home/max/Documents/starter/test/local-slave-1/coordinator8539/arangod.log --log.force-direct false --javascript.copy-installation true --cluster.my-address tcp://localhost:8539 --cluster.my-role COORDINATOR --foxx.queues true --server.statistics true --cluster.agency-endpoint tcp://localhost:8531 --cluster.agency-endpoint tcp://localhost:8541 --cluster.agency-endpoint tcp://localhost:8551
当指定启动程序 arangodb
的选项为 --server.storage-engine rocksdb
时,此选项将传递给启动程序的所有 arangod
进程。
可以在文档的 Deployment 章节中找到各种部署模式的详细概述。