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

scql中p2p模式中 engine 使用的通信协议 #359

Closed
friendsAI opened this issue Sep 14, 2024 · 12 comments
Closed

scql中p2p模式中 engine 使用的通信协议 #359

friendsAI opened this issue Sep 14, 2024 · 12 comments
Assignees

Comments

@friendsAI
Copy link

Issue Type

Others

Have you searched for existing issues?

Yes

Link to Relevant Documentation

No response

Question Details

注意到 config.yml 中有一个配置项,可以配置 engine 之间通信协议: protocol: http
配置后,抓包分析,发现是 prpc 协议。
请问:
1、engine之间的通信协议,是通过这个配置项指定吗?
2、http与prpc 这两个协议什么关系?
3、我如果希望 engine之间所有的通信,都是http,除了指定配置项,还需要修改什么?
@1139763082
Copy link

您抓包的结果麻烦发一下吧

@friendsAI
Copy link
Author

好的,麻烦您受累看一下
engine.zip

@jingshi-ant
Copy link
Contributor

engine的配置在gflags.conf里,broker没法配置指定engine之间的通信。具体可参考配置文档进行配置。
另外engine依赖brpc提供server,相关配置的含义brpc里有详细说明。
所有参与方engine的配置项改完后重启即可。

@friendsAI
Copy link
Author

谢谢您的耐心解答。我还有几个问题:
1、我现在的目的,是想让两个engine之间的通信使用http协议,结合您的解答,是不是设置 gflags.conf 里的peer_engine_protocol和driver_protocol 都设置为 http:proto ?
2、gflags.conf 里面的配置项 : peer_engine_protocol ,driver_protocol, 我并没有设置,而根据官网资料,默认是http,那为什么我抓出来的包是 prpc呢?
3、注意到gflags.conf有一个配置项: spu_allowed_protocols, 这个配置项 scql/.ci/broker-docker-compose/.env 中也有提及,这两个地方改一个地方即可嘛?
4、官网提供的gflags.conf 参考模板,只列出了几个配置项,如果需要设置更多的配置项,就是在gflags.conf 文件中,通过-- 配置项名称:配置值 进行增加么?

@friendsAI
Copy link
Author

在线等回复哦~~

@jingshi-ant
Copy link
Contributor

默认是http:proto协议,这个协议的说明可以参考brpc的官网,其实访问的还是pb服务,如果是包格式为http,可能需要设置为http:h2:https://brpc.apache.org/zh/docs/server/serve-httph2/

@jingshi-ant
Copy link
Contributor

3.ci路径下是集成测试用的,你需要改的是engine的gflags.conf。 4.对

@jingshi-ant
Copy link
Contributor

@jingshi-ant
Copy link
Contributor

check了下,engine默认的是baidu_std协议,所以抓出来是prpc,我们的文档有误,抱歉。

@friendsAI
Copy link
Author

谢谢您的耐心解答。我还发现存在以下问题:
1、往 gflags.conf 里加配置项会报错。我尝试只增加配置项 --spu_allowed_protocols=CHEETAH,再运行一个之前能正常运行的查询语句,报错。
image

2、同1,往 gflags.conf 里加配置项 --peer_engine_protocol=http:h2,再运行一个之前能正常运行的查询语句,报错(设置为http:proto也会报错)。

@jingshi-ant
Copy link
Contributor

创建项目的时候可以指定spu的协议,这里报错是因为任务所属的项目使用的是semi2k协议,和你allowed不match

@friendsAI
Copy link
Author

往 gflags.conf 里加配置项 --peer_engine_protocol=http, 再运行一个之前能正常运行的查询语句,报错如下:
image

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

3 participants