de Fonollosa
de Fonollosa

Reputation: 11

Is it possible to have a data delay between nodes in distributed mode Infinispan?

With Infinispan v9, my app uses a distributed async cache mode where number of cluster-wide data replicas is 3.

Let's say data owner/replica of cache entry 123 is in Nodes A, B, C.

With this, I have two questions (assuming they were not caused by network issues)

Upvotes: 1

Views: 64

Answers (1)

pruivo
pruivo

Reputation: 1334

Assuming node A as primary owner of entry 123 (each key has 1 primary owner and N-1 backup owners, where N is the number of replicas)

  • Yes, node C can read stale values due to replication lag.
  • If you have some lag, yes it can happen. When a read happens in a non-owner node (like D), it first tries to fetch the value from the primary owner (node A). If A doesn't reply in time, then it goes to the next owner (node B) and so one.

Now, if A replies in time, it won't read the stale the value. Otherwise, it may read the stale value from node B or C

You have this information (and more) in the documentation.

Upvotes: 1

Related Questions