According to our understanding :
Requests are sent to server using RoundRobinBalancingStrategy from clients.
While connecting to hotrod server the complete topology is shared with the client and it contacts with the owners directly in a round robin fashion.
1 of 1 people found this helpful
HotRod protocol allows the clients to know the topology of the cluster: setting one server address to the hotrod client does not affect how the requests will be routed, after connection the HotRod client gets the topology info and therefore can contact any other server.
There are two types of owners: primary and backup. In non-transactional mode (and you can't get transactions in client-server mode) write starting in node called originator must be forwarded to primary owner first and then primary owner replicates that to backups. Reads can be served by any owner (primary or backup).
When doing a request, client always tries to contact the primary server first. If the request fails (connection timeout etc.) the client switches to the round-robin strategy mode and tries to contact any server in the cluster, eventually trying all of them. When the request arrives on a server that is not owner, it forwards the request to owners, but naturally this server has to respond to the requesting client.
Also, after cluster topology changes (adding/removing nodes), the topology info may be outdated.
1) Not always, but usually it does.
2) There's no notion of primary server with regards to client.
3) Usually directly from primary owner