-
Notifications
You must be signed in to change notification settings - Fork 3.9k
netty: support listening on multiple port #5067
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's an alternative approach I was considering: let ServerImpl contain multiple InternalServers. That way the different ports could have different security configuration, and potentially even mixing transport types. It also seems like it'd be pretty easy (not that this solution was hard).
Having multiple connectors is a nice feature for services that serve both internal and external requests. If I also have the ability to omit the encryption or use a different certificate set for internal services that would be awesome. |
Discussed offline with @beschmi and confirmed that this change can solve an internal requirement. For this requirement, it doesn't really need the multiple InternalServers. I don't expect API changes for the multiple InternalServer approach (at least for the existing APIs like getPorts). if this is true, we can support the multiple InternalServer on top of this change. |
@carl-mastrangelo Can I somehow check which endpoint was used to connect to the server/receive a request? EDIT: Oh this might already be present via Attributes |
Can we assign special names or attributes for each address? Like |
@ejona86 It seems like this approach will work for @creamsoup 's work. I believe this change should be ready to review because:
|
This change includes invasive changes to NettyServer that would need to be reverted if we go with the alternative approach, and this change won't likely be automatically revertable due to conflicts. So I want to get some basic understanding of how hard it would be to do it in the ServerImpl. |
dcb9aef
to
82b7630
Compare
82b7630
to
6b1e974
Compare
@ejona86 This is ready to be reviewed again. NSB is a little more awkward because it has to create a list of transport servers, but aside from that it should be pretty straight forward. Still not exposing an API, since I haven't thought what it should look like for InProcess. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seemed straight-forward.
I did my best to make sure this was thread safe, please be forgiving!