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

feat: replace the type of PeerId::addr from butil::EndPoint to string #429

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

gulu-goolu
Copy link

No description provided.

@xiaolin310
Copy link

有个问题咨询下,看起来您这种改动Init channel 时使用的API是,

int Init(const char* server_addr_and_port, const ChannelOptions* options); // www.foo.com:8080

想问下,您测试过failover情况吗,比如一个pod(deployment或者statefulset controller) 被kill -9 (或者delete pod --force, 非graceful shutdown), 这个时候新拉起的pod IP变了。

我之前的测试情况,用这个channel Init API 并不会把hostname解析成新的pod IP,因而新的RPC request根本发不到新的Pod应用。
想知道您那边的测试情况,欢迎交流~

@gulu-goolu
Copy link
Author

会有这种问题,要解决这个问题的话,可以试试 channel 的另一个初始化方法。

int Init(const char* service_url, const char* load_balancer, const ChannelOptions*);

然后协议用 dns,比如 dns://host1.default.svc.:1000 这种。具体原理是这个 domain_naming_service.h

这个方案理论上能解决你遇到的这个问题,但是因为我们的项目还比较早期,所以就还没有按照这样修改。

@xiaolin310
Copy link

@gulu-goolu PTAL

#419

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

Successfully merging this pull request may close these issues.

2 participants