Skip to content
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

Add a well-known attribute for additional addresses #245

Merged
merged 1 commit into from
Sep 22, 2022

Conversation

fyrchik
Copy link
Contributor

@fyrchik fyrchik commented Sep 20, 2022

The task says "external" but wouldn't "internal" be better here? I mean for backwards compatibility we have a single address to which user connects and optional internal addresses to use for storage nodes.

Signed-off-by: Evgenii Stratonikov [email protected]

@cthulhu-rider
Copy link
Contributor

Agree with internal: external endpoints are currently presented in addresses field.

@carpawell
Copy link
Member

carpawell commented Sep 20, 2022

Well, the idea as I got it: internal communications are something that any node always has, that is expected to be the "main" node's communication, that is usually kept unchanged and that is always present in every node's lifecycle.
Optionally, every node may specify a preferable channel for external clients. If it is present, it does not affect the "main" channel, and all the nodes should always use addresses in Node-Node connections (and check if there are any optional attrs only in emergency cases). I believe that netmap is more of an internal entity rather than an external one.

If we use attrs for internal channels, that "optionality" is not that clear: it changes the "main" Node-Node interaction and mixes communication with the old nodes that do not know they should pass their traffic through the new interface.

I think @realloc could help us here.

@realloc
Copy link

realloc commented Sep 20, 2022

It has to declare endpoints for external communication with clients. Internal communication relies on existing mechanism of address declaration in netmap.

Copy link

@realloc realloc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It has to describe addresses for external communication. Applications and gates should use those addresses.

@realloc
Copy link

realloc commented Sep 21, 2022

According to current behviour, nodes get peer address from the network map entries. Client software either does the same or uses endpoint set in config.

If a node admin wants to use separate interfaces for serving clients and for p2p communication with other storage nodes, he sets one more listening address in node config and uses it as connection endpoints in clients (protocol gateways, applications, etc).

Adding well known attributes for additional endpoint could simplify this process. Client libraries used in, for example, protocol gateways could correctly discover and use proper endpoints without mixing client traffic with internal replication traffic.

carpawell
carpawell previously approved these changes Sep 21, 2022
@realloc realloc merged commit 4d01409 into nspcc-dev:master Sep 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Node's optional attribute for external communications
4 participants