Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

When several gateway receivers have the same value for hostname-for-senders (for example when running Geode under kubernetes and a load balancer balances the load among the remote servers), it has been observed that number of connections in gw GW senders pool used for sending ping message is much greater then number of dispatcher threads, although in this case only one connection could be used (since destinations have same address and port ). There are 2 reasons for this behavior:

  1. Since all Ping tasks are triggered in parallel, generally each task will request same connection at the same time, and we will create new connection for each task.
  2. For example if we have configured only one dispatcher thread on local server, and remote site have five servers, pool will try to ping for example server0. It will open new connection trying to reach server0 but (because all servers are sharing VIP:PORT) will probably get some other, let's say server1. It will use this connection to ping server0 and distributed ping functionality will do the magic on the receiving side. However, GW sender pool will notice it has new endpoint now - server1 - and it will want to ping it as well. So, now we need to ping server0 and server1. And finally we could end up pinging all 5 servers, and actually we only need server0.

Anti-Goals


Solution

Solution for described problems is:

  1. introduce configurable option to gradually activate pinging toward destination. This can be accomplish by increasing initial delay of each ping task.
  2. For Ping task (which as prerequisite has defined destination endpoint), when sending ping message, in case connected endpoint is different than the destination endpoint, don't register this new endpoint.

PR with proposed solution: https://github.com/apache/geode/pull/7347Describe your solution and how it’s going to solve the problem. This is likely the largest section of your proposal and might even include some high-level diagrams if you are proposing code changes. While all important aspects need to be covered, also keep in mind that shorter documents are more likely to be read.

Changes and Additions to Public Interfaces

...