mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Merge pull request #6831 from xiang90/grpc_proxy_doc
doc: add gRPC proxy start doc
This commit is contained in:
commit
0b78ef8de1
@ -47,3 +47,31 @@ TODO
|
||||
## Abusive clients protection
|
||||
|
||||
The gRPC proxy caches responses for requests when it does not break consistency requirements. This can protect the etcd server from abusive clients in tight for loops.
|
||||
|
||||
## Start etcd gRPC proxy
|
||||
|
||||
Consider an etcd cluster with the following static endpoints:
|
||||
|
||||
|Name|Address|Hostname|
|
||||
|------|---------|------------------|
|
||||
|infra0|10.0.1.10|infra0.example.com|
|
||||
|infra1|10.0.1.11|infra1.example.com|
|
||||
|infra2|10.0.1.12|infra2.example.com|
|
||||
|
||||
Start the etcd gRPC proxy to use these static endpoints with the command:
|
||||
|
||||
```bash
|
||||
$ etcd grpc-proxy start --endpoints=infra0.example.com,infra1.example.com,infra2.example.com --listen-addr=127.0.0.1:2379
|
||||
```
|
||||
|
||||
The etcd gRPC proxy starts and listens on port 8080. It forwards client requests to one of the three endpoints provided above.
|
||||
|
||||
Sending requests through the proxy:
|
||||
|
||||
```bash
|
||||
$ ETCDCTL_API=3 ./etcdctl --endpoints=127.0.0.1:2379 put foo bar
|
||||
OK
|
||||
$ ETCDCTL_API=3 ./etcdctl --endpoints=127.0.0.1:2379 get foo
|
||||
foo
|
||||
bar
|
||||
```
|
||||
|
Loading…
x
Reference in New Issue
Block a user