Reputation: 51
My Config: 4 nodes/machines each with 2 separate JVMs = total 8 apps in the cluster sharing data via HazelCast.
I'm facing some issue with HazelCast TCP/IP based port config wherein ports are not available, seems we have configured less number of ports compared to what is needed at a minimum. Can someone help w.r.t. below points,
While there are number of pages explaining port configuration aspect, I could not find anything focusing on these aspects.
Thanks, Abhilash
Upvotes: 2
Views: 1859
Reputation: 51
Thanks everyone, here are some observations
Either use default configuration or assign a range. Deciding range depends upon your deployment config.
In my case there are 8 apps each wanting to connect with each other. Each app will need at least 7 ports to connect with other 7 apps. Since each node has 2 apps, we need at least 14 distinct ports on a particular node.
Assume you have 4 nodes each with 3 apps, so in total there are 12 apps wanting to connect with each other. Each app will need at least 11 ports to connect with other 11 apps. Since each node has 3 apps, we need at least 33 distinct ports on a particular node.
Only 1 inbound port. And N outbound ports depending on the default or range configuration. Assigning an outbound port range may hurt performance in long run if more ports are needed for parallel processing.
nope
It remains assigned.
Thanks again!
Note: I came to know about these numbers by multiple start/stop of my nodes/jvms and watching console and port allocation, try this if you want to see Hazel's behavior in detail.
Upvotes: 2
Reputation: 3370
From what I understand, you are running 2 instances or your application per physical machine.
In this case, if both nodes are configured to use the same ports, you are going to run into problems.
Upvotes: 1