Skip to content

Commit 838645f

Browse files
committed
Merge pull request #402 from philips/add-header-docs
feat(README): document the etcd request headers
2 parents 4fb8e79 + 18bf886 commit 838645f

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,21 @@ Since the `get` and `watch` commands do not change state in the store, they do n
110110
You may notice that in this example the index is `2` even though it is the first request you sent to the server.
111111
This is because there are internal commands that also change the state like adding and syncing servers.
112112

113+
### Response Headers
114+
115+
etcd includes a few HTTP headers that provide global information about the etcd cluster that serviced a request:
116+
117+
```
118+
X-Etcd-Index: 35
119+
X-Raft-Index: 5398
120+
X-Raft-Term: 0
121+
```
122+
123+
- `X-Etcd-Index` is the current etcd index as explained above.
124+
- `X-Raft-Index` is similar to the etcd index but is for the underlying raft protocol
125+
- `X-Raft-Term` this number will increase when an etcd master election happens. If this number is increasing rapdily you may need to tune the election timeout. See the [tuning][tuning] section for details.
126+
127+
[tuning]: #tuning
113128

114129
### Get the value of a key
115130

@@ -1117,6 +1132,9 @@ When creating the cert be sure to reference it in the `-extensions` flag:
11171132
openssl ca -config openssl.cnf -policy policy_anything -extensions ssl_client -out certs/machine.crt -infiles machine.csr
11181133
```
11191134

1135+
### Tuning
1136+
1137+
TODO
11201138

11211139
## Project Details
11221140

0 commit comments

Comments
 (0)