English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

简介Redis

Redis is completely open source, complies with the BSD protocol, and is a high-performance key-value database.

Redis with other key - The following are the three characteristics of the value cache product:

  • Redis supports data persistence, which can save memory data to disk, and can be loaded and used again when restarted.

  • Redis not only supports simple key-value type data, and also provides list, set, zset, hash and other data structure storage.

  • Redis support the backup of data, that is, master-奴隶模式的数据备份。

优势Redis

  • 性能极高 - Redis能读的速度是110000次/s,写的速度是81000次/s。

  • 丰富的数据类型 - Redis支持二进制案例的Strings, Lists, Hashes, Sets及Ordered Sets数据类型操作。

  • 原子 - Redis的所有操作都是原子性的,意思是要么成功执行要么完全不执行。单个操作是原子性的。多个操作也支持事务,即原子性,通过MULTI和EXEC指令包起来。

  • 丰富的特性 - Redis还支持publish/subscribe, 通知, key 过期等等特性。

Redis与其他key-value存储有什么不同?

  • Redis具有更复杂的数据结构并提供对它们的原子性操作,这是一个不同于其他数据库的进化路径。Redis的数据类型都是基于基本数据结构的同时对程序员透明,无需进行额外的抽象。

  • Redis运行在内存中但可以持久化到磁盘,因此在进行高速读写不同数据集时需要权衡内存,因为数据量不能超过硬件内存。在内存数据库方面的另一个优点是,与在磁盘上相同的复杂数据结构相比,在内存中操作起来非常简单,这样Redis可以做很多内部复杂性很强的事情。同时,在磁盘格式方面它们是紧凑的以追加的方式产生的,因为它们不需要进行随机访问。