2019-06-28 18:09:14 +00:00
|
|
|
|
---
|
2020-01-18 00:18:09 +00:00
|
|
|
|
layout: docs
|
|
|
|
|
page_title: Raft - Storage Backends - Configuration
|
|
|
|
|
sidebar_title: Raft
|
2019-06-28 18:09:14 +00:00
|
|
|
|
description: |-
|
|
|
|
|
|
2020-01-18 00:18:09 +00:00
|
|
|
|
The Raft storage backend is used to persist Vault's data. Unlike all the other
|
|
|
|
|
storage backends, this backend does not operate from a single source for the
|
|
|
|
|
data. Instead all the nodes in a Vault cluster will have a replicated copy of
|
|
|
|
|
the entire data. The data is replicated across the nodes using the Raft
|
|
|
|
|
Consensus Algorithm.
|
2019-06-28 18:09:14 +00:00
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
# Raft Storage Backend
|
|
|
|
|
|
2020-01-18 00:18:09 +00:00
|
|
|
|
~> **NOTE:** Vault's Integrated Storage is currently a **_Beta_**
|
2019-11-20 15:07:35 +00:00
|
|
|
|
feature and not recommended for deployment in production.
|
2019-09-16 15:44:04 +00:00
|
|
|
|
|
2019-06-28 18:09:14 +00:00
|
|
|
|
The Raft storage backend is used to persist Vault's data. Unlike other storage
|
|
|
|
|
backends, Raft storage does not operate from a single source of data. Instead
|
|
|
|
|
all the nodes in a Vault cluster will have a replicated copy of Vault's data.
|
|
|
|
|
Data gets replicated across the all the nodes via the [Raft Consensus
|
|
|
|
|
Algorithm][raft].
|
|
|
|
|
|
|
|
|
|
- **High Availability** – the Raft storage backend supports high availability.
|
|
|
|
|
|
|
|
|
|
- **HashiCorp Supported** – the Raft storage backend is officially supported
|
|
|
|
|
by HashiCorp.
|
|
|
|
|
|
|
|
|
|
```hcl
|
|
|
|
|
storage "raft" {
|
|
|
|
|
path = "/path/to/raft/data"
|
|
|
|
|
node_id = "raft_node_1"
|
|
|
|
|
}
|
|
|
|
|
cluster_addr = "http://127.0.0.1:8201"
|
|
|
|
|
```
|
|
|
|
|
|
2020-02-14 20:25:53 +00:00
|
|
|
|
~> **Note:** When using the Raft storage backend, it is required to provide
|
|
|
|
|
`cluster_addr` to indicate the address and port to be used for communication
|
|
|
|
|
between the nodes in the Raft cluster.
|
|
|
|
|
|
|
|
|
|
~> **Note:** Raft cannot be used as the configured `ha_storage` backend at this
|
|
|
|
|
time. To use Raft for HA coordination users must also use Raft for storage and
|
|
|
|
|
set `ha_enabled = true`.
|
2019-06-28 18:09:14 +00:00
|
|
|
|
|
|
|
|
|
## `raft` Parameters
|
|
|
|
|
|
|
|
|
|
- `path` `(string: "")` – The file system path where all the Vault data gets
|
|
|
|
|
stored.
|
2019-10-28 16:43:12 +00:00
|
|
|
|
This value can be overridden by setting the `VAULT_RAFT_PATH` environment variable.
|
2019-06-28 18:09:14 +00:00
|
|
|
|
|
|
|
|
|
- `node_id` `(string: "")` - The identifier for the node in the Raft cluster.
|
2019-10-28 16:43:12 +00:00
|
|
|
|
This value can be overridden by setting the `VAULT_RAFT_NODE_ID` environment variable.
|
2019-06-28 18:09:14 +00:00
|
|
|
|
|
2020-01-18 00:18:09 +00:00
|
|
|
|
[raft]: https://raft.github.io/ 'The Raft Consensus Algorithm'
|