tribe.asciidoc 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. [[modules-tribe]]
  2. == Tribe node
  3. The _tribes_ feature allows a _tribe node_ to act as a federated client across
  4. multiple clusters.
  5. The tribe node works by retrieving the cluster state from all connected
  6. clusters and merging them into a global cluster state. With this information
  7. at hand, it is able to perform read and write operations against the nodes in
  8. all clusters as if they were local. Note that a tribe node needs to be able
  9. to connect to each single node in every configured cluster.
  10. The `elasticsearch.yml` config file for a tribe node just needs to list the
  11. clusters that should be joined, for instance:
  12. [source,yaml]
  13. --------------------------------
  14. tribe:
  15. t1: <1>
  16. cluster.name: cluster_one
  17. t2: <1>
  18. cluster.name: cluster_two
  19. --------------------------------
  20. <1> `t1` and `t2` are arbitrary names representing the connection to each
  21. cluster.
  22. The example above configures connections to two clusters, name `t1` and `t2`
  23. respectively. The tribe node will create a <<modules-node,node client>> to
  24. connect each cluster using <<unicast,unicast discovery>> by default. Any
  25. other settings for the connection can be configured under `tribe.{name}`, just
  26. like the `cluster.name` in the example.
  27. The merged global cluster state means that almost all operations work in the
  28. same way as a single cluster: distributed search, suggest, percolation,
  29. indexing, etc.
  30. However, there are a few exceptions:
  31. * The merged view cannot handle indices with the same name in multiple
  32. clusters. By default it will pick one of them, see later for on_conflict options.
  33. * Master level read operations (eg <<cluster-state>>, <<cluster-health>>)
  34. will automatically execute with a local flag set to true since there is
  35. no master.
  36. * Master level write operations (eg <<indices-create-index>>) are not
  37. allowed. These should be performed on a single cluster.
  38. The tribe node can be configured to block all write operations and all
  39. metadata operations with:
  40. [source,yaml]
  41. --------------------------------
  42. tribe:
  43. blocks:
  44. write: true
  45. metadata: true
  46. --------------------------------
  47. The tribe node can also configure blocks on selected indices:
  48. [source,yaml]
  49. --------------------------------
  50. tribe:
  51. blocks:
  52. write.indices: hk*,ldn*
  53. metadata.indices: hk*,ldn*
  54. --------------------------------
  55. When there is a conflict and multiple clusters hold the same index, by default
  56. the tribe node will pick one of them. This can be configured using the `tribe.on_conflict`
  57. setting. It defaults to `any`, but can be set to `drop` (drop indices that have
  58. a conflict), or `prefer_[tribeName]` to prefer the index from a specific tribe.
  59. [float]
  60. === Tribe node settings
  61. The tribe node starts a node client for each listed cluster. The following
  62. configuration options are passed down from the tribe node to each node client:
  63. * `node.name` (used to derive the `node.name` for each node client)
  64. * `network.host`
  65. * `network.bind_host`
  66. * `network.publish_host`
  67. * `transport.host`
  68. * `transport.bind_host`
  69. * `transport.publish_host`
  70. * `path.home`
  71. * `path.conf`
  72. * `path.logs`
  73. * `path.scripts`
  74. * `shield.*`
  75. Almost any setting (except for `path.*`) may be configured at the node client
  76. level itself, in which case it will override any passed through setting from
  77. the tribe node. Settings you may want to set at the node client level
  78. include:
  79. * `network.host`
  80. * `network.bind_host`
  81. * `network.publish_host`
  82. * `transport.host`
  83. * `transport.bind_host`
  84. * `transport.publish_host`
  85. * `cluster.name`
  86. * `discovery.zen.ping.unicast.hosts`
  87. [source,yaml]
  88. ------------------------
  89. path.scripts: some/path/to/config <1>
  90. network.host: 192.168.1.5 <2>
  91. tribe:
  92. t1:
  93. cluster.name: cluster_one
  94. t2:
  95. cluster.name: cluster_two
  96. network.host: 10.1.2.3 <3>
  97. ------------------------
  98. <1> The `path.scripts` setting is inherited by both `t1` and `t2`.
  99. <2> The `network.host` setting is inherited by `t1`.
  100. <3> The `t3` node client overrides the inherited from the tribe node.