North wang Xiongguan wanli, zhuang zai haodangchang. More and better articles, please pay attention to the public number [mushroom can’t sleep], there are knowledge points dry goods and brush related sharing.

Why use NoSQL when you have MySQL?

The emergence of any technology is not overnight, but gradually evolved. When a site at the beginning, the traffic is not large, the standalone MySQL can be done, but when the site traffic increases, it is necessary to master the replication of MySQL, read and write separation and even sub-library sub-table operations to meet the needs. But when the volume of data is larger and accessed very frequently, an intermediate layer is needed to relieve the pressure on the DB, and this is NoSQL.

The difference between Redis and MemberCache?

In NoSQL, Redis and MemberCache are the most famous. Below is a picture of the differences between Redis and other databases taken from Redis In Action.

You can see:

  • Redis is not just a simple K/V format data structure. It also supports List, Hash, Set, Sorted Set, and so on.
  • Redis supports data persistence, mainly RDB, AOF two ways;
  • Redis supports data backup, that is, data backup in master-slave mode.

What is Redis?

Here is a brief introduction to Redis on the official website.

Redis is an open source (BSD licensed), in-memory data structure store, used as a database, cache, and message broker. Redis provides data structures such as strings, hashes, lists, sets, sorted sets with range queries, bitmaps, hyperloglogs, geospatial indexes, and streams. Redis has built-in replication, Lua scripting, LRU eviction, transactions, and different levels of on-disk persistence, and provides high availability via Redis Sentinel and automatic partitioning with Redis Cluster.

Redis is an open source (BSD-licensed) store of in-memory data structures that is used as a database, cache, and message broker. Redis provides data structures including: strings, hashes, lists, collections, sorted collections with range queries, bitmaps, hyperlogs, geospatial indexes, and streams. Redis has built-in replication, Lua scripting, LRU elimination policies, transactions, and different levels of disk persistence, as well as high availability through automated partitioning of Redis Sentinel and Redis Cluster.

conclusion

Redis is an open source NoSQL database, can be used as a cache to relieve DB pressure, rich data structure, can deal with a variety of scenarios; And support persistence, can be through the RDB and AOF way to do fault recovery; Redis can also be used for distributed locks; Wait… (I will explain these points in detail in the next article.)

The last

In the next chapter, I will give a detailed introduction to the data structure of Redis. If you want to see more wonderful articles and more tips on how to brush the questions, you can follow my official account [Mushroom can’t Sleep].