Home United States USA — software Distributed Vs Replicated Cache

Distributed Vs Replicated Cache

206
0
SHARE

Caching facilitates faster access to data that is repeatedly being asked for. So in this article, we discuss the pros of distributed vs replicated caches.
Join the DZone community and get the full member experience. Caching facilitates faster access to data that is repeatedly being asked for. The data might have to be fetched from a database or have to be accessed over a network call or have to be calculated by an expensive computation. We can avoid multiple calls for these repeated data-asks by storing the data closer to the application (generally, in memory or local disc). Of course, all of this comes at a cost. We need to consider the following factors when cache has to be implemented: Caching becomes more complicated when we think of distributed systems. Let us assume we have our application deployed in a 3-node cluster: Usage of distributed/replicated caches would help us in addressing the above problems. Here we will see when to use a distributed vs replicated cache and the pros-cons of each of them. In a replicated cache, all nodes in a cluster hold all cached entries. If an entry exists on one node, it will also exist on all other nodes too. So the size of cache is uniform across all the nodes of cluster. As the data is stored in multiple nodes, it can contribute towards higher availability of application.

Continue reading...