-
1. Re: Hotrod Server/client cluster with distributed cache question
prashant.thakur Aug 14, 2014 12:30 AM (in response to hsaid123)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.
-
2. Re: Hotrod Server/client cluster with distributed cache question
rvansa Aug 14, 2014 3:58 AM (in response to hsaid123)1 of 1 people found this helpfulHotRod 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.
Therefore:
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