Hot Rod clients establishes a connection with all servers in a JDG cluster.

Solution In Progress - Updated -

Environment

  • Red Hat JBoss Data Grid (JDG)
    • 7.x
  • Hot Rod client

Issue

  • Hotrod client connect to unlisted JDG server.
  • When hotrod client is configured to connect to let's say 2 JDG instances and , if in total 3 JDG instances are in cluster among themselves , we can see that hotrod client is as well making connection to the unlisted JDG instance. We have configured hotrod client to connect to 2 JDG instances (running on port 11222,11322) as below and have in total 3 JDG instances in cluster(running on port 11222,11322,11422)
ConfigurationBuilder builder = new ConfigurationBuilder();
            builder.addServer().host("127.0.0.1").port(11222).addServer().host("127.0.0.1").port(11322);
            remoteCMgr = new RemoteCacheManager(builder.build());

  • Upon deploying the Hotrod Application WAR in EAP (having the above configuration) and trying to access the application from EAP we can see the below logging in EAP console i.e hotrod is as well able to connect directly to JDG instances running on port 11422 along with 2 JDG instances running on port 11222 and 11322 , with all the 3 JDG instances being in cluster among themselves.
22:04:22,124 INFO  [org.infinispan.client.hotrod.impl.protocol.Codec20] (default task-1) ISPN004006: /127.0.0.1:11222 sent new topology view (id=8) containing 3 addresses: [/127.0.0.1:11222, /127.0.0.1:11322, /127.0.0.1:11422]
22:04:22,125 INFO  [org.infinispan.client.hotrod.impl.transport.tcp.TcpTransportFactory] (default task-1) ISPN004014: New server added(/127.0.0.1:11422), adding to the pool.

Resolution

  • Hot Rod connects directly to all JDG servers , The initial servers configured in the client are to initially find a JDG server. Once it connects to one, it gets the full cluster view and connects to all of the JDG instances in the cluster.

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.