wip: dynamic_modules: let runtime cluster hosts carry logical hostnames#46388
wip: dynamic_modules: let runtime cluster hosts carry logical hostnames#46388dio wants to merge 2 commits into
Conversation
Dynamic module cluster hosts currently derive their hostnames from the cluster name and socket address. Add a hostname-aware callback that lets modules supply the logical hostname stored on each runtime host. Preserve the existing callback, its synthesized hostname, and address-based deduplication. Expose the callback through the Rust SDK. Signed-off-by: Dhi Aurrahman <dio@rockybars.com>
Signed-off-by: Dhi Aurrahman <dio@rockybars.com>
|
Reviewer note on the Go reproducer and SDK boundary: The default scenario in https://github.com/dio/auto-sni-choose-host is a working Go-based e2e demonstration of this PR. The module supplies a concrete address and logical hostname for each runtime host, retains the returned host handles, and returns the selected handle from The demo imports Envoy SDK package paths, but its I have deliberately kept the greenfield Go cluster SDK out of this PR. If an upstream Go cluster SDK is desirable, I can propose the prepared implementation as a separate follow-up; otherwise the C ABI added here remains language-neutral and Go modules can provide their own bridge. Reviewer guidance on whether that separate Go SDK surface is wanted would be helpful. The demo also documents an optional shared-address scenario, but that uses a separate stacked Envoy patch and is not evidence or scope for this PR. |
|
/retest |
Commit Message:
dynamic_modules: let runtime cluster hosts carry logical hostnames
Additional Description:
Add an opt-in C ABI callback and Rust SDK methods that let dynamic-module clusters set a logical hostname separately from the connection address. This enables existing features such as
auto_host_sniand automatic SAN validation.The existing callback and its behavior remain unchanged. Effective-SNI-scoped TLS session caching was handled in #45982; distinct logical hosts sharing one address can be considered separately.
AI assistance was used to help implement this change. I reviewed and understand the submitted code and take responsibility for it.
Risk Level:
Medium. This adds an opt-in extension ABI and SDK surface.
API Considerations:
Adds an opt-in C ABI callback and Rust SDK methods. Existing callbacks and behavior remain unchanged.
Testing:
//test/extensions/clusters/dynamic_modules:cluster_testDocs Changes:
Added C ABI and Rust SDK API documentation.
Release Notes:
Added a dynamic-modules release note.
Fixes #46387
Refs #45962