Cassandra instead of Redis?

Source: Internet
Author: User
Tags cassandra value store

Original: Cassandra instead of Redis?

Recently with Cassandra more gradually, in addition to the previous 360 cases, at the beginning of the month Qcon Shanghai 2013 Fence also introduced its use case. The million-user fashion sharing web feed system extension Practice article refers to the case of Fashiolista and Instagram migrating from Redis to Cassandra. Considering that there are still many netizens discussing the usage of Redis, is Redis a database, memory, or key value store, and Redis and memcache in real-world scenarios, so simply talk about the difference.

First, Redis and Cassandra are completely nosql products for different usage scenarios. The former is the key value or key list data for small-scale memory, which is suitable for storing large-scale data. So this article mentions that the main reason for switching, perhaps, is that the pre-Redis usage scenario is inappropriate, and that it is understandable to quickly implement functionality with handy tools in the early stages of a startup project.

Several usage scenarios for Redis

    • Large number of visits
    • Key value or key list data structure
    • Small capacity, controllable, can be all put into memory. Because Redis is a single-threaded design, large value results in a certain blockage of subsequent requests. In addition HashSet when Hgetall due to the presence of traversal operations, it is also not suitable for collections too large. If the data exceeds the single machine capacity can be distributed to multiple machines using the conventional sharding method
    • Scenarios that need to be persisted

Above four o'clock the general condition should be the necessary condition. As a result, the user profiles and friends List of common websites are available for use with Redis. Since Redis has all the features of memcached, is there any discussion that memcache can quit? I would prefer to choose memcached rather than redis in the following cases

    • Simple key value that does not need to be persisted, such as 100 bytes or less. In this case, the use of memcached space is more economical and easier to maintain.
    • There are rolling expiration requirements, such as the session of the website, each new logged-on user periodically expires.

The relevant point of view can also refer to memcached really outdated?

Several questions

    1. Since Redis can be persisted, does the friend list saved with Redis still need to be saved to the relational database?
    2. Mobile games Clash of Clans in the Castle attribute, and the user's gold, holy water, trophy what data structure is used to save?

Cassandra instead of Redis? (ext.)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.