Reputation: 144
I am running an Elasticsearch server. Apart from 9200/9300 ports, Elasticsearch opens lot of ports like below.
elasticsearch-service-x64.exe 11036 TCP Mymachine 52377 localhost 52378 ESTABLISHED
Where is the config for these ports?
Upvotes: 1
Views: 3116
Reputation: 217274
All nodes in an Elasticsearch cluster form a full-mesh cluster, which means that every node that participates in an Elasticsearch cluster needs to talk to the every other nodes of the cluster, in a bi-directional way. So there are a lot of TCP connections opened in addition to the ones opened for the clients to bind to (i.e. the 9200 and 9300 ranges).
In addition to that, Elasticsearch has a concept of "channel". A channel is a specific set of TCP connections for performing a specific type of operation, such as "recovery", "bulk", "regular", "cluster state", "ping".
So without entering too much into the details, each node has 13 TCP connections to each other node and vice versa:
In a two-nodes cluster, that means 26 connections. In a three-nodes cluster, that means 39 TCP connections, etc.
To sum it up, that's the main reason why you're seeing so many opened TCP ports on your machine.
Upvotes: 5