Distributed runtime

NOTE: available only in Enteprise Edition

Node status

To retrieve the distributed configuration of a OrientDB server, execute a HTTP GET operation against the URL http://<server>:<port>/distributed/node. Example:

  1. curl -u root:root "http://localhost:2480/distributed/node"

Result:

  1. {
  2. "localId": "9e20f766-5f8c-4a5c-a6a2-7308019db702",
  3. "localName": "_hzInstance_1_orientdb",
  4. "members": [
  5. {
  6. "databases": [],
  7. "id": "b7888b58-2b26-4098-bb4d-8e23a5050b68",
  8. "listeners": [
  9. {
  10. "listen": "10.0.1.8:2425",
  11. "protocol": "ONetworkProtocolBinary"
  12. },
  13. {
  14. "listen": "10.0.1.8:2481",
  15. "protocol": "ONetworkProtocolHttpDb"
  16. }
  17. ],
  18. "name": "node2",
  19. "startedOn": "2015-09-28 13:19:09:267"
  20. },
  21. {
  22. "databases": [],
  23. "id": "9e20f766-5f8c-4a5c-a6a2-7308019db702",
  24. "listeners": [
  25. {
  26. "listen": "10.0.1.8:2424",
  27. "protocol": "ONetworkProtocolBinary"
  28. },
  29. {
  30. "listen": "10.0.1.8:2480",
  31. "protocol": "ONetworkProtocolHttpDb"
  32. }
  33. ],
  34. "name": "node1",
  35. "startedOn": "2015-09-28 12:58:11:819"
  36. }
  37. ]
  38. }

Database configuration

To retrieve the distributed configuration for a database, execute a HTTP GET operation against the URL http://<server>:<port>/distributed/database/<database-name>. Example:

  1. curl -u root:root "http://localhost:2480/distributed/database/GratefulDeadConcerts"

Result:

  1. {
  2. "autoDeploy": true,
  3. "clusters": {
  4. "*": {
  5. "servers": [
  6. "node1",
  7. "node2",
  8. "<NEW_NODE>"
  9. ]
  10. },
  11. "v": {
  12. "servers": [
  13. "node2",
  14. "node1",
  15. "<NEW_NODE>"
  16. ]
  17. }
  18. },
  19. "executionMode": "undefined",
  20. "failureAvailableNodesLessQuorum": false,
  21. "hotAlignment": false,
  22. "readQuorum": 1,
  23. "readYourWrites": true,
  24. "servers": {
  25. "*": "master"
  26. },
  27. "version": 21,
  28. "writeQuorum": 2
  29. }

Queues

OrientDB uses distributed queues to exchange messages between OrientDB servers. To have metrics about queues, execute a HTTP GET operation against the URL http://<server>:<port>/distributed/queue/<queue-name>. Use * as queue name to return stats for all he queues. Example:

  1. curl -u root:root "http://localhost:2480/distributed/queue/*"

Result:

  1. {
  2. "queues": [
  3. {
  4. "avgAge": 0,
  5. "backupItemCount": 0,
  6. "emptyPollOperationCount": 0,
  7. "eventOperationCount": 0,
  8. "maxAge": 0,
  9. "minAge": 0,
  10. "name": "orientdb.node.node1.benchmark.insert.request",
  11. "nextMessages": [],
  12. "offerOperationCount": 0,
  13. "otherOperationsCount": 0,
  14. "ownedItemCount": 0,
  15. "partitionKey": "orientdb.node.node1.benchmark.insert.request",
  16. "pollOperationCount": 0,
  17. "rejectedOfferOperationCount": 0,
  18. "serviceName": "hz:impl:queueService",
  19. "size": 0
  20. },
  21. {
  22. "avgAge": 1,
  23. "backupItemCount": 0,
  24. "emptyPollOperationCount": 0,
  25. "eventOperationCount": 0,
  26. "maxAge": 1,
  27. "minAge": 1,
  28. "name": "orientdb.node.node2.response",
  29. "nextMessages": [],
  30. "offerOperationCount": 60,
  31. "otherOperationsCount": 12,
  32. "ownedItemCount": 0,
  33. "partitionKey": "orientdb.node.node2.response",
  34. "pollOperationCount": 60,
  35. "rejectedOfferOperationCount": 0,
  36. "serviceName": "hz:impl:queueService",
  37. "size": 0
  38. },
  39. {
  40. "avgAge": 0,
  41. "backupItemCount": 0,
  42. "emptyPollOperationCount": 0,
  43. "eventOperationCount": 0,
  44. "maxAge": 0,
  45. "minAge": 0,
  46. "name": "orientdb.node.node2.benchmark.request",
  47. "nextMessages": [],
  48. "offerOperationCount": 0,
  49. "otherOperationsCount": 0,
  50. "ownedItemCount": 0,
  51. "partitionKey": "orientdb.node.node2.benchmark.request",
  52. "pollOperationCount": 0,
  53. "rejectedOfferOperationCount": 0,
  54. "serviceName": "hz:impl:queueService",
  55. "size": 0
  56. },
  57. {
  58. "avgAge": 1,
  59. "backupItemCount": 0,
  60. "emptyPollOperationCount": 0,
  61. "eventOperationCount": 0,
  62. "maxAge": 1,
  63. "minAge": 1,
  64. "name": "orientdb.node.node1.GratefulDeadConcerts.request",
  65. "nextMessages": [],
  66. "offerOperationCount": 44,
  67. "otherOperationsCount": 53,
  68. "ownedItemCount": 0,
  69. "partitionKey": "orientdb.node.node1.GratefulDeadConcerts.request",
  70. "pollOperationCount": 44,
  71. "rejectedOfferOperationCount": 0,
  72. "serviceName": "hz:impl:queueService",
  73. "size": 0
  74. }
  75. ]
  76. }