dispatcher: add the client connection factory to support connecting to internal listener#18105
dispatcher: add the client connection factory to support connecting to internal listener#18105lambdai wants to merge 17 commits intoenvoyproxy:mainfrom
Conversation
Signed-off-by: Yuchen Dai <silentdai@gmail.com>
Signed-off-by: Yuchen Dai <silentdai@gmail.com>
Signed-off-by: Yuchen Dai <silentdai@gmail.com>
Signed-off-by: Yuchen Dai <silentdai@gmail.com>
|
/assign @yanavlasov |
yanavlasov
left a comment
There was a problem hiding this comment.
I think the approach is sound.
/wait
|
This pull request has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in 7 days if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions! |
|
ack |
Signed-off-by: Yuchen Dai <silentdai@gmail.com>
Signed-off-by: Yuchen Dai <silentdai@gmail.com>
Signed-off-by: Yuchen Dai <silentdai@gmail.com>
This reverts commit b94abcb. Signed-off-by: Yuchen Dai <silentdai@gmail.com>
Signed-off-by: Yuchen Dai <silentdai@gmail.com>
This PR allows creating server connection but the abilitity to connect to such a listener is located in #18105. Signed-off-by: Yuchen Dai <silentdai@gmail.com>
Signed-off-by: Yuchen Dai <silentdai@gmail.com>
Signed-off-by: Yuchen Dai <silentdai@gmail.com>
Signed-off-by: Yuchen Dai <silentdai@gmail.com>
Signed-off-by: Yuchen Dai <silentdai@gmail.com>
|
/retest |
|
Retrying Azure Pipelines: |
| * | ||
| * @return the registered internal istener manager or nullopt. | ||
| */ | ||
| virtual Network::InternalListenerManagerOptRef getInternalListenerManager() PURE; |
There was a problem hiding this comment.
Could we avoid use of the dispatcher interface as a registration mechanism for factories like this one?
There was a problem hiding this comment.
It seems there was slight agreement on this so I stopped investing on bootstrap extension.
My opinion is that adding this interface to dispatcher is more straightforward, well, at the cost of adding getter/setter
CC @yanavlasov
There was a problem hiding this comment.
I think we need a client connection factory extension point that connection pools and other things can use to create connections. An eventual goal may be to completely remove the client connection creation methods from the dispatcher. But this is something that @envoyproxy/senior-maintainers may want to chime in on.
There was a problem hiding this comment.
I see two arguments here,
the first is to store the internal listener registry, here I choose dispatcher over bootstrap extension(where we can add a threadlocal registery), because the life time of dispatcher and listener manager is cleaner. The dispatcher is guaranteed existing when an internal listener is ready to add and use.
I think we can add the complexity in booting the server, and offer a hook for internal listener registry if we choose to store the internal listeners there. I feel we can do that after.
the second is to remove the thin dispatcher::createClientConnection. Again we can do that along with this PR but I prefer to do it later when signed off.
There was a problem hiding this comment.
The current approach of adding the internal listener registry to the dispatcher does not generalize to the next extension that needs to hook into the code that creates client connections. I recommend introducing a factory mechanism for client connections and transition to it, eventually deprecating the current Dispatcher::createClientConnection
There was a problem hiding this comment.
I agree with @antoniovicente that the extension behavior has leaked into core interfaces. II think it would be cleaner if the mechanism for finding the listener was completely encapsulated in the factory. For example when internal listener is created it is registering itself in the factory's thread local storage, where it can later be looked up for establishing client connections. In this way you can avoid needing to change the dispatcher interface and ConnectionHandlerImpl
|
Chatted offline and I will introduce a thread local storage slot for the internal listener registry It seems we can do that either in ListenerManager or create another bootstrap extension. This effort will be addressed in PR(back fill here) and revisit this PR after |
|
This pull request has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in 7 days if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions! |
|
This pull request has been automatically closed because it has not had activity in the last 37 days. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions! |
Commit Message:
Implements internal listener. This PR duplicates some section about internal listener config in #18104
The major functionality of this PR is to create client connection to an internal listener.
Additional Description:
Risk Level: LOW. A default client connection factory should follow the previous flow of creating TCP/Pipe connection.
Testing:
Docs Changes:
Release Notes:
Platform Specific Features:
[Optional Runtime guard:]
[Optional Fixes #Issue]
[Optional Deprecated:]
[Optional API Considerations:]