Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

异步客户端转发到leader #32

Open
gaodq opened this issue Mar 12, 2018 · 1 comment
Open

异步客户端转发到leader #32

gaodq opened this issue Mar 12, 2018 · 1 comment

Comments

@gaodq
Copy link

gaodq commented Mar 12, 2018

return worker_client_pool_->SendAndRecv(
slash::IpPortString(leader_ip, leader_port),
request, response);

如果这里用异步客户端,可以并发处理多个转发到leader的操作,是不是会加速。

@baotiao
Copy link
Contributor

baotiao commented Mar 12, 2018

yes, that's right. However, when we support asynchronized client or use multi clients, we should deal with the situation that the later logs may received before the previous logs.
You can have a try, guy. After adding multi clients, I think it violate the raft's original intention that raft is a consensus algorithm that is designed for easily understanding. However, performance is more important than understanding in industry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants