baidu / braft

An industrial-grade C++ implementation of RAFT consensus algorithm based on brpc, widely used inside Baidu to build highly-available distributed systems.
Apache License 2.0
3.95k stars 881 forks source link

Make BRPC connection timeout configurable. #381

Closed kishorenc closed 1 year ago

kishorenc commented 1 year ago

The default value for brpc connection timeout is 200 ms and this is too low for a braft cluster that is deployed in regions that are geographically far apart where the round-trip latency will exceed 200 ms.

This PR introduces a flag to customize the connection timeout value, but retains the brpc default of 200 ms.

kishorenc commented 1 year ago

@chenzhangyi Thanks for the review, I've updated the PR.