8 Commits

Author SHA1 Message Date
Iwasaki Yudai
df2cc4bc8c grpcproxy: Disable fast fail on lease grant call to cluster
Problem Observed
----------------

When there is no etcd process behind the proxy,
clients repeat resending lease grant requests without delay.
This behavior can cause abnormal resource consumption on CPU/RAM and
network.

Problem Detail
--------------

`LeaseGrant()` uses a bare protobuf client to forward requests.
However, it doesn't use `grpc.FailFast(false)`, which means the method returns
an `Unavailable` error immediately when no etcd process is available.
In clientv3, `Unavailable` errors are not considered the "Halt" error,
and library retries the request without delay.
Both clients and the proxy consume much CPU cycles to process retry requests.

Resolution
----------

Add `grpc.FailFast(false))` to `LeaseGrant()` of the `leaseProxy`.
This makes the proxy not to return immediately when no etcd process is
available. Clients will simply timeout requests instead.
2017-06-16 15:09:05 -07:00
Gyu-Ho Lee
5e059fd8dc *: use metadata Incoming/OutgoingContext
Fix https://github.com/coreos/etcd/issues/7888.

Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-06-15 16:41:23 -07:00
Anthony Romano
6dd8fb6f24 Revert "Merge pull request #7732 from heyitsanthony/lease-err-ka"
This reverts commit fbbc4a4979b256125d2238f6325ad86e7f1b58bd, reversing
changes made to f254e383859a2939d5929346f6595549f424f7c5.

Fixes #7851
2017-05-02 09:36:16 -07:00
Anthony Romano
b5384ac1c0 grpcproxy: use new lease interface 2017-04-24 23:49:44 -07:00
fanmin shi
ba52bd07ba grpcproxy: add lease coalescing support 2017-02-16 11:50:50 -08:00
Gyu-Ho Lee
78cfc8db95 grpcproxy: implement 'LeaseTimeToLive' 2016-09-09 08:14:46 +09:00
Xiang Li
5271cf0160 grpcproxy: return interface 2016-07-18 16:47:58 -07:00
Xiang Li
3f74e9db0d *: add lease proxy 2016-07-18 12:06:59 -07:00