local.asciidoc 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. [[modules-gateway-local]]
  2. === Local Gateway
  3. The local gateway allows for recovery of the full cluster state and
  4. indices from the local storage of each node, and does not require a
  5. common node level shared storage.
  6. Note, different from shared gateway types, the persistency to the local
  7. gateway is *not* done in an async manner. Once an operation is
  8. performed, the data is there for the local gateway to recover it in case
  9. of full cluster failure.
  10. It is important to configure the `gateway.recover_after_nodes` setting
  11. to include most of the expected nodes to be started after a full cluster
  12. restart. This will insure that the latest cluster state is recovered.
  13. For example:
  14. [source,js]
  15. --------------------------------------------------
  16. gateway:
  17. recover_after_nodes: 1
  18. recover_after_time: 5m
  19. expected_nodes: 2
  20. --------------------------------------------------
  21. [float]
  22. ==== Dangling indices
  23. When a node joins the cluster, any shards/indices stored in its local `data/`
  24. directory which do not already exist in the cluster will be imported into the
  25. cluster by default. This functionality has two purposes:
  26. 1. If a new master node is started which is unaware of the other indices in
  27. the cluster, adding the old nodes will cause the old indices to be
  28. imported, instead of being deleted.
  29. 2. An old index can be added to an existing cluster by copying it to the
  30. `data/` directory of a new node, starting the node and letting it join
  31. the cluster. Once the index has been replicated to other nodes in the
  32. cluster, the new node can be shut down and removed.
  33. The import of dangling indices can be controlled with the
  34. `gateway.local.auto_import_dangled` which accepts:
  35. [horizontal]
  36. `yes`::
  37. Import dangling indices into the cluster (default).
  38. `close`::
  39. Import dangling indices into the cluster state, but leave them closed.
  40. `no`::
  41. Delete dangling indices after `gateway.local.dangling_timeout`, which
  42. defaults to 2 hours.