# Distributed cache

> Mediated Wiki article. Canonical URL: https://mediated.wiki/source/Distributed_cache
> Markdown URL: https://mediated.wiki/source/Distributed_cache.md
> Source: https://en.wikipedia.org/wiki/Distributed_cache
> Source revision: 1341825407
> License: Creative Commons Attribution-ShareAlike 4.0 International (https://creativecommons.org/licenses/by-sa/4.0/)

{{Short description|Type of computer cache}}
{{Use dmy dates|date=May 2023}}
In [computing](/source/computing), a '''distributed cache''' is an extension of the traditional concept of [cache](/source/cache_(computing)) used in a single [locale](/source/Locale_(computer_hardware)). A distributed cache may span multiple servers so that it can grow in size and in transactional capacity. It is mainly used to store application data residing in [database](/source/database) and web [session](/source/session_(computer_science)) data. The idea of distributed caching<ref>
{{cite journal
| last        = Paul
| first       = S
|author2=Z Fei
| date        = 2001-02-01
| title       = Distributed caching with centralized control
| journal     = Computer Communications
| volume      = 24
| issue       = 2
| pages       = 256–268
| doi         = 10.1016/S0140-3664(00)00322-4
| citeseerx       = 10.1.1.38.1094
}}<!--| accessdate  = 2009-11-18-->
</ref> has become feasible now because [main memory](/source/Random-access_memory) has become very cheap and [network cards](/source/Network_interface_controller) have become very fast, with 1&nbsp;Gbit now standard everywhere and 10&nbsp;Gbit gaining traction.{{when|date=October 2022}} Also, a distributed cache works well on lower cost machines usually employed for [web server](/source/web_server)s as opposed to [database server](/source/database_server)s which require expensive hardware.<ref>
{{cite journal
| last          = Khan
| first         = Iqbal
| title         = Distributed Caching on the Path To Scalability
| journal      = MSDN
| issue         = July 2009
| url           = http://msdn.microsoft.com/en-us/magazine/dd942840.aspx
| accessdate    = 2012-03-30
}}
</ref>
An emerging internet architecture known as [Information-centric networking](/source/Information-centric_networking) (ICN) is one of the best examples of a distributed cache network. The ICN is a network level solution hence the existing distributed network cache management schemes are not well suited for ICN.<ref>{{cite journal|author=Bilal, Muhammad|display-authors=etal|title=A Cache Management Scheme for Efficient Content Eviction and Replication in Cache Networks|journal=IEEE Access |volume=5|pages=1692–1701|doi=10.1109/ACCESS.2017.2669344|doi-access=free|bibcode=2017arXiv170204078B|year=2017|arxiv=1702.04078|s2cid=14517299 }}</ref> In the [supercomputer](/source/supercomputer) environment, distributed cache is typically implemented in the form of [burst buffer](/source/burst_buffer). 

In distributed caching, each cache key is assigned to a specific [shard](/source/Shard_(database_architecture)) (a.k.a. partition). There are different sharding strategies:<ref>{{Cite book |title=Foundations of Scalable Systems |publisher=O'Reilly Media |year=2022 |isbn=9781098106034}}</ref> 

* Modulus sharding
* Range-based sharding
* [Consistent hashing](/source/Consistent_hashing) evenly distributes cache keys across shards, even if some of the shards crash or become unavailable.<ref>{{Cite book |title=Designing Distributed Systems Patterns and Paradigms for Scalable, Reliable Services |publisher=O'Reilly Media |year=2018 |isbn=9781491983607}}</ref>

== Examples ==
* [Aerospike](/source/Aerospike_(database))
* [Apache Ignite](/source/Apache_Ignite)
* [Couchbase](/source/Couchbase_Server)
* [Ehcache](/source/Ehcache)
* [GigaSpaces](/source/GigaSpaces)
* [Hazelcast](/source/Hazelcast)
* [Infinispan](/source/Infinispan)
* [Memcached](/source/Memcached)
* [Oracle Coherence](/source/Oracle_Coherence)
* [Riak](/source/Riak)
* [Redis](/source/Redis)
* [Tarantool](/source/Tarantool)
* [Velocity](/source/Velocity_(memory_cache))/AppFabric

== See also ==
* [Cache algorithms](/source/Cache_algorithms)
* [Cache coherence](/source/Cache_coherence)
* [Cache-oblivious algorithm](/source/Cache-oblivious_algorithm)
* [Cache stampede](/source/Cache_stampede)
* [Cache language model](/source/Cache_language_model)
* [Database cache](/source/Database_cache)
* [Cache manifest in HTML5](/source/Cache_manifest_in_HTML5)

== References ==
{{Reflist}}

Category:Cache (computing)
Category:Distributed computing

---
Adapted from the Wikipedia article [Distributed cache](https://en.wikipedia.org/wiki/Distributed_cache) by Wikipedia contributors ([contributor history](https://en.wikipedia.org/wiki/Distributed_cache?action=history)). Available under [Creative Commons Attribution-ShareAlike 4.0 International](https://creativecommons.org/licenses/by-sa/4.0/). Changes may have been made.
