Introduction to Redis (redis简介)

荒凉一梦 提交于 2020-03-09 16:29:08

Redis (means REmote DIctionary Server) is an open source (BSD licensed), in-memory data structure store, used as a database, cache and message broker. It supports data structures such as strings (字符串), hashes (哈希表), lists (列表), sets (集合), sorted sets (带排序的集合)with range queries, bitmaps, hyperloglogs, geospatial indexes with radius queries 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 (集群模式).

You can run atomic operations (原子操作) on these types, like appending to a string; incrementing the value in a hash; pushing an element to a list; computing set intersection, union and difference; or getting the member with highest ranking in a sorted set.

In order to achieve its outstanding performance, Redis works with an in-memory dataset. Depending on your use case, you can persist it either by dumping the dataset to disk (RDB)every once in a while, or by appending each command to a log (AOF). Persistence can be optionally disabled, if you just need a feature-rich, networked, in-memory cache.

Redis also supports trivial-to-setup master-slave asynchronous replication (主从模式), with very fast non-blocking first synchronization, auto-reconnection with partial resynchronization on net split.

Other features include:

You can use Redis from most programming languages out there.

Redis is written in ANSI C and works in most POSIX systems like Linux, *BSD, OS X without external dependencies. Linux and OS X are the two operating systems where Redis is developed and tested the most, and we recommend using Linux for deploying. Redis may work in Solaris-derived systems like SmartOS, but the support is best effort. There is no official support for Windows builds.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!