If redis is already a part of the stack, why is Memcached still used alongside Redis?

后端 未结 2 1115
情深已故
情深已故 2021-01-29 17:49

Redis can do everything that Memcached provides (LRU cache, item expiry, and now clustering in version 3.x+, currently in beta) or by tools like twemproxy. The performance is si

2条回答
  •  温柔的废话
    2021-01-29 18:50

    Habits are hard to break :)

    Seriously though, there are two main reasons - to my understanding - why Memcached is still used:

    1. Legacy - there developers that are comfortable and familiar with Memcached, as well as applications that support it. This also means that it is a mature and well-tested technology.
    2. Scaling - standard Memcached is easily horizontally scalable, whereas Redis (until and excluding the soon-to-be-released v3) requires more work to that end (i.e. sharding).

    However:

    1. Re. legacy - given Redis' robustness (data structures, commands, persistence...), it being actively developed and clients in every conceivable language - new applications are usually developed with it.
    2. Re scaling - besides the upcoming v3, there are solutions that can make scaling much easier. For example, Redis Cloud offers seamless scaling without data loss or service interruption. Another popular approach to scaling/sharding Redis is twemproxy.

提交回复
热议问题