-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Closed
Labels
:Distributed Coordination/Discovery-PluginsAnything related to our integration plugins with EC2, GCP and AzureAnything related to our integration plugins with EC2, GCP and Azure>buggood first issuelow hanging fruitlow hanging fruithelp wantedadoptmeadoptme
Description
Currently UnicastHostsProvider#buildDynamicNodes is called multiple times during the pinging rounds. Once on start, one more after 1.5 seconds (by default) and last time at the end (3s by default). My guess is that this done in an attempt to get the latest information possible when connect to EC2 / GCE/ Azure's API. This does have a nasty side effect on the FileBasedUnicastHostsProvider, which currently reads it's file on ever call. The file reading is not a problem on it's own as it is just as fast as an EC2 call. The problem part is that each read generates nodes with new node ids, meaning that UnicastZenPing will setup new connections with each of these rounds.
I see two relatively easy ways of solving it:
- Call
buildDynamicNodesonce at the beginning of each round (might be the simplest). - Add an "onStartPing" method to
UnicastHostsProviderwhich is guaranteed to be called at the beginning of each pinging round.FileBasedDiscoverycan read the file contents in that method.
Metadata
Metadata
Assignees
Labels
:Distributed Coordination/Discovery-PluginsAnything related to our integration plugins with EC2, GCP and AzureAnything related to our integration plugins with EC2, GCP and Azure>buggood first issuelow hanging fruitlow hanging fruithelp wantedadoptmeadoptme