We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Tars中每个Servant似乎都是独立的IP和端口。如果想把服务接口分割成多个Servant,每个Servant负责少量的服务接口。这样的话似乎并不是太友好。
多个Servant可以共享同一套IP端口吗?
The text was updated successfully, but these errors were encountered:
看代码是可以的,最终Server都缓存在一个map中的,所以不同名字应该是可以的。 var goSvrs map[string]*transport.TarsServer var httpSvrs map[string]*http.Server
Sorry, something went wrong.
应该不可以,底层是根据port对servant进行路由的,另外也没有使用socket的reuseaddr,所以不能对同一个端口进行多次listen
看了TarsGo源码,不同Servant不能同享同一IP,假如协议是tcp:那么底层是每个Servant专门开启一个.netListenTCP
不行的,servant是用来寻址IP 和port的
No branches or pull requests
Tars中每个Servant似乎都是独立的IP和端口。如果想把服务接口分割成多个Servant,每个Servant负责少量的服务接口。这样的话似乎并不是太友好。
多个Servant可以共享同一套IP端口吗?
The text was updated successfully, but these errors were encountered: