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

Support binding on multiple host/port pairs #8098

Merged

Conversation

spinscale
Copy link
Contributor

This PR allows to bind to more than host and port using the bind_host and port properties. You can basically create differrent profiles, which can also have different tcp and buffer settings.

TODO: Documentation, explain possible options

profileSettings = settingsBuilder()
.put(profileSettings)
.put("port", profileSettings.get("port", componentSettings.get("port", this.settings.get("transport.tcp.port", "9300-9400"))))
.build();
Copy link
Member

Choose a reason for hiding this comment

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

can we check here if the port is defined on "default" profile level, and if it does, use it? and only if not, revert to the current way to configure ports?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

not sure I follow here, this check happens on the 'default' profile by calling profileSettings.get("port")...

@spinscale spinscale force-pushed the enhancement/netty-multi-port-binding branch from f8cbfc4 to 331729d Compare October 16, 2014 17:40
@spinscale
Copy link
Contributor Author

incorporated all your review comments, except the one I didnt understand, maybe have another view..

docs still need to be added

@spinscale spinscale force-pushed the enhancement/netty-multi-port-binding branch from 331729d to 0bf901b Compare October 17, 2014 15:20
transport.profiles.dmz.bind_host: 172.16.1.2
```

The `default` profile is a special. It is used as fallback for any other profiles, if those do not have a specific configuration setting set.
Copy link
Member

Choose a reason for hiding this comment

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

I would also mention that currently, the default profile is how other nodes in the cluster will connect to this node, in the future, we will allow to also have node to node communication that connect over multiple interfaces (profiles)

@kimchy
Copy link
Member

kimchy commented Oct 17, 2014

LGTM

@@ -48,6 +48,32 @@ between all nodes. Defaults to `false`.
It also uses the common
<<modules-network,network settings>>.

==== TCP Transport Profiles

Elasticsearch allows to bind to multiple ports on different interfaces by the use of transport profiles. See this example configuration

Choose a reason for hiding this comment

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

allows you to.... use of named transport profiles

This patch allows to create several netty bootstrap, each of which
listening on different ports. This will potentially allow for features
to listen to different network interfaces for node-to-node or node-to-client
communication and is also the base to listen to several interfaces, so that those
can be used to speed up cluster communication in the future.

Closes elastic#8098
@spinscale spinscale force-pushed the enhancement/netty-multi-port-binding branch from 7a162ed to b06b524 Compare October 17, 2014 21:12
@spinscale spinscale merged commit b06b524 into elastic:master Oct 17, 2014
spinscale added a commit that referenced this pull request Oct 17, 2014
This patch allows to create several netty bootstrap, each of which
listening on different ports. This will potentially allow for features
to listen to different network interfaces for node-to-node or node-to-client
communication and is also the base to listen to several interfaces, so that those
can be used to speed up cluster communication in the future.

Closes #8098
spinscale added a commit that referenced this pull request Oct 17, 2014
This patch allows to create several netty bootstrap, each of which
listening on different ports. This will potentially allow for features
to listen to different network interfaces for node-to-node or node-to-client
communication and is also the base to listen to several interfaces, so that those
can be used to speed up cluster communication in the future.

Closes #8098
@clintongormley clintongormley changed the title Netty: Support to bind on multiple host/port pair Netty: Support binding on multiple host/port pair Nov 3, 2014
@clintongormley clintongormley added the :Distributed/Network Http and internode communication implementations label Mar 19, 2015
@clintongormley clintongormley changed the title Netty: Support binding on multiple host/port pair Support binding on multiple host/port pairs Jun 7, 2015
mute pushed a commit to mute/elasticsearch that referenced this pull request Jul 29, 2015
This patch allows to create several netty bootstrap, each of which
listening on different ports. This will potentially allow for features
to listen to different network interfaces for node-to-node or node-to-client
communication and is also the base to listen to several interfaces, so that those
can be used to speed up cluster communication in the future.

Closes elastic#8098
@edagarli
Copy link

which version?

@spinscale
Copy link
Contributor Author

@edagarli the issue labels at the top show versions associated with this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Distributed/Network Http and internode communication implementations >enhancement v1.4.0 v1.5.0 v2.0.0-beta1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants