Question

According to this link which belongs to JBoss documentation, I understood that Infinispan is a better product than JBoss Cache and kind of improvement the reason for which they recommend to migrate from JBoss Cache to Infinispan, that is supported by JBoss as well. Am I right in what I understood? Otherwise, are there differences?

One more question : Talking about replication and distribution, can any one of them be better than the other according to the need?

Thank you

Was it helpful?

Solution

Question:

Talking about replication and distribution, can any one of them be better than the other according to the need?

Answer:

I am taking a reference directly from Clustering modes - Infinispan

  • Distributed:

    • Number of copies represents the tradeoff between performance and durability of data
    • The more copies you maintain, the lower performance will be, but also the lower the risk of losing data due to server outages
    • use of a consistent hash algorithm to determine where in a cluster entries should be stored
    • No need to replicate data on each node that takes more time than just communicating hash code
    • Best suitable if no of nodes are high
    • Best suitable if size of data stored in cache is high.
  • Replicated:

    • Entries added to any of these cache instances will be replicated to all other cache instances in the cluster
    • This clustered mode provides a quick and easy way to share state across a cluster
    • replication practically only performs well in small clusters (under 10 servers), due to the number of replication messages that need to happen - as the cluster size increases

Practical Experience:

I are using Infinispan cache in my running live application on Jboss server having 8 nodes. Initially I used replicated cache but it took much longer time to respond due to large size of data. Finally we come back to Distributed and now its working fine.

Use replicated or distributed cache only for data specific to any user session. If data is common regardless of any user than prefer Local cache that's created separately for each node.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top