tribe.asciidoc 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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.
  9. The `elasticsearch.yml` config file for a tribe node just needs to list the
  10. clusters that should be joined, for instance:
  11. [source,yaml]
  12. --------------------------------
  13. tribe:
  14. t1: <1>
  15. cluster.name: cluster_one
  16. t2: <1>
  17. cluster.name: cluster_two
  18. --------------------------------
  19. <1> `t1` and `t2` are arbitrary names representing the connection to each
  20. cluster.
  21. The example above configures connections to two clusters, name `t1` and `t2`
  22. respectively. The tribe node will create a <<modules-node,node client>> to
  23. connect each cluster using <<unicast,unicast discovery>> by default. Any
  24. other settings for the connection can be configured under `tribe.{name}`, just
  25. like the `cluster.name` in the example.
  26. The merged global cluster state means that almost all operations work in the
  27. same way as a single cluster: distributed search, suggest, percolation,
  28. indexing, etc.
  29. However, there are a few exceptions:
  30. * The merged view cannot handle indices with the same name in multiple
  31. clusters. By default it will pick one of them, see later for on_conflict options.
  32. * Master level read operations (eg <<cluster-state>>, <<cluster-health>>)
  33. will automatically execute with a local flag set to true since there is
  34. no master.
  35. * Master level write operations (eg <<indices-create-index>>) are not
  36. allowed. These should be performed on a single cluster.
  37. The tribe node can be configured to block all write operations and all
  38. metadata operations with:
  39. [source,yaml]
  40. --------------------------------
  41. tribe:
  42. blocks:
  43. write: true
  44. metadata: true
  45. --------------------------------
  46. The tribe node can also configure blocks on indices explicitly:
  47. [source,yaml]
  48. --------------------------------
  49. tribe:
  50. blocks:
  51. indices.write: hk*,ldn*
  52. --------------------------------
  53. When there is a conflict and multiple clusters hold the same index, by default
  54. the tribe node will pick one of them. This can be configured using the `tribe.on_conflict`
  55. setting. It defaults to `any`, but can be set to `drop` (drop indices that have
  56. a conflict), or `prefer_[tribeName]` to prefer the index from a specific tribe.