-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
Support for multiple proxy addresses in remote cluster connection #82366
Comments
Pinging @elastic/es-distributed (Team:Distributed) |
@tbrooks8 mentioned that during For Remote Cluster security design, I think we need Proxy Mode Questions:
Remote Sniff Mode Question:
|
I don't know what Let's discuss the remote sniff mode question elsewhere to keep this conversation on-topic for this issue about proxy mode. |
When I original wrote the design document with @ywelsch I had called the mode "direct" or "simple" mode and it accepted a list of socket addresses where we open direct tcp connections to with no sniffing or knowledge of the remote cluster topology. I had originally named it that since it did not matter if we were going through a proxy or directly connecting to remote nodes. Just a list of addresses that we round robin connect to. But then there was the decision that since we were specifically designing this for a proxy we would call it proxy mode and only support a single address. We can modify |
That's a good point, although we're not exactly strict about singular/plural things in other settings' names either. Even when using a proxy we've encountered users who want to use multiple for resiliency, and that's really the case I think we should address here. Technically you don't need a proxy today to use proxy mode, you can just point it to one of the nodes in your cluster (or a DNS alias that resolves to a list of multiple nodes). OTOH if you're able to connect directly to the nodes of the remote cluster then you could reasonably use sniff mode, so if you're not doing that then this kind of implies that you're using something like a proxy. |
Note, sniff mode won't work for the new Remote Cluster Security. Remote will need to be on new port, with the option to use API Key instead of TLS client cert. |
Is further discussion required, or can we agree to add Tagging @gwbrown @jakelandis @n1v0lg. |
I am planning to start a PR to add |
Agreed to add support for multiple proxy addresses. I think we should just extend the existing setting though, rather than requiring a plural here - we support singleton strings as well as lists of strings for the same field in many other APIs, so it aligns well there and will make backwards compatibility easier. I'm also not sure why this should be behind the feature flag, as it's not reliant on any other bits from RCS 2.0 to function and has value in the existing security model as well. |
A highly available setup running with
proxy
-mode remote cluster connections needs to be able to handle a failure of the proxy. Today aproxy
-mode remote cluster connection accepts only a single address for the proxy. If the entry is a DNS name then it is resolved afresh on each connection attempt, but we only use the first resolved address each time. In practice this works ok if DNS is configured to return multiple addresses in different orders on each request but it's not ideal and may take a long time to re-establish connectivity if DNS happens to select an address to which connection attempts time out instead of actively failing. Some users configure additional middleware, or orchestrate IP address migrations, to work around this limitation.I believe we should support multiple proxy addresses in remote cluster connections to improve the availability of remote clusters without needing additional middleware or complex orchestration steps. We should accept a list of addresses or names in the config, and recognise that each DNS name may resolve to multiple addresses too. Each connection attempt should distribute across multiple addresses properly, and ideally could keep track of connection failures and avoid known-bad addresses.
The text was updated successfully, but these errors were encountered: