Is your feature request related to a problem? Please describe.
当使用http2(nginx/envoy)代理时,由于网关使用了连接池管理复用连接,而nacos仅支持单个client 使用单个连接,导致重复的连接无法建立双向流。
When using the http2 (nginx/envoy) proxy, because the gateway uses a connection pool to manage multiplexed connections, nacos only supports a single client to use a single connection, resulting in repeated connections that cannot establish a bidirectional stream.
Describe the solution you'd like
A clear and concise description of what you want to happen.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
6条答案
按热度按时间0aydgbwb1#
Nacos的连接是有意义的, 被代理复用后可能会导致数据串掉, 这个是怎么解决的?
gwo2fgha2#
这个改动很大,需要完整的设计一下。
jmp7cifd3#
数据是通过不同stream来区分的,复用一个连接,但是streamId不同,每个streamObserver不同,数据不会串。
现在的问题是复用的连接,nacos认为是重复的,没有保存到ConnectionManager,因为当前的connectionId只能代表实际的物理连接,复用这种情况其实是逻辑连接。
所以我一开始想的是给connectionId 加上双向流的streamId的属性 来达到逻辑连接的效果,但是单向流获取不到双向流的streamId,单向流里也需要使用connectionId ,所有放弃了这个想法,进而使用给客户端增加一个标识来达到类似的目的,
实现了逻辑连接的效果,那么复用的连接也会被正确register 到ConnectionManager中,每个逻辑连接注册的streamObserver是不同的,所以数据不会串。
i34xakig4#
fzwojiic5#
@shiyiyue1102 help to review this design.
cwxwcias6#
This feature is a big changes for nacos connection between server and client.
It should be an experimental feature, If want to do this, Please make sure following: