Reputation: 219
I have been trying to understand how replication is handled in oracle coherence distributed caching if a member node goes down.
Say, my coherence cluster has 3 nodes, A, B, and C. As per my understanding, each node has its backup. Is backup data stored on disk? And if a node C goes does, does the coherence distributed caching algorithm retrieves the data from the backup of the node C, and equally distributes it among other two-nodes? Could someone please confirm my understanding?
Also, as per my understanding, each node handles only a piece of data. Is it possible for a node to get a request for data that it does not handle? How is such a scenario handled in oracle coherence distributed caching?
Upvotes: 0
Views: 437
Reputation: 189
The backup is just stored in different node(s). With backup count of one (the default), 2 nodes will have the same piece of data, with one of them acts as the primary node for the data, and the other as the backup node.
If a node fails, it will become unreachable and the other nodes will become aware of this. Once they are aware of it, each node that have the failed node's "backup" piece of data will be promoted to be the primary node for the piece of data, and each of this data will have a new backup on one of the surviving nodes. If the failed node were responsible for a backup data, the primary node of said data will simply elect a new node to be the new backup.
Each node maintains a kind of index which let them map any stored piece of data to the node that is responsible for it. A node is highly possible to get a request that it does not responsible to. When it does happen in a distributed cache, the node will request the piece of data to the responsible node, and pass it back to the requester. The maximum of extra network hop is exactly once.
To better understand about how distributed cache works in Coherence, see: Introduction to Coherence Caches. (The images are sourced from there.)
Upvotes: 1