Redis 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 and geospatial indexes with radius queries. 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 every once in a while, or by appending each command to a log. 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:
- Transactions
- Pub/Sub
- Lua scripting
- Keys with a limited time-to-live
- LRU eviction of keys
- Automatic failover
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 more tested, 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, but Microsoft develops and maintains a Win-64 port of Redis.
Redis 是一个开源的基于内存的数据结构存储器。通常可作为数据库,缓存和消息中介。它支持的数据结构有:字符串、哈希表、列表、集合、支持范围查询的有序集合、位图、hyperloglogs和带查询半径的地理空间索引。Redis有内置的复制、Lua脚本、LRU缓存、事务和不同层级的磁盘持久化功能,还通过Redis Sentinel提供了高可用性,通过Redis集群实现了自动化分割。
你可以在这些类型上使用原子操作,比如在尾部追加字符串,增加哈希表中的值,在列表中添加一个元素,计算集合的交集、并集和差值,或者得到有序集合中最高排位的成员。
为了取得更高效的性能,Redis的数据集合放置在内存中。根据你的使用场景,你可以通过时常复制数据到硬盘或者将操作指令写到日志里来达到持久化的目的。当然,如果你仅仅需要一个性能丰富支持网络的内存缓存,你可以选择禁止持久化功能。
Redis还支持主从异步复制,并且配置起来很简单,首次同步就能无阻塞的达到很快的速度,在网络断开的时候还可以部分再同步的自动重连。
其他特性还包括:
你可以在这里找到在大多数语言下使用Redis的方法。
Redis使用ANSIC C编写,并且能不依靠外部依赖在Linux、*BSD、OS X等基于POSIX的系统下工作。Linux和OS X是Redis开发和测试用得最多的两个操作系统,并且我们建议在Linux上面进行部署。Redis可能会在衍生于Solaris的SmartOS系统上正常工作,但是没有可靠性保证。Windows上面没有官方的支持,但是微软开发维护了一个win-64版本的Redis。
Redis 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 and geospatial indexes with radius queries. 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 every once in a while, or by appending each command to a log. 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:
- Transactions
- Pub/Sub
- Lua scripting
- Keys with a limited time-to-live
- LRU eviction of keys
- Automatic failover
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 more tested, 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, but Microsoft develops and maintains a Win-64 port of Redis.