Redis 介紹
Redis 介紹
Redis 是一個開源的 (BSD licensed) in-memory 的資料存放結構,可以被使用作為 Database,快取,訊息媒介。支援豐富的資料型態,包括: strings, hashes, lists, sets, stored sets, bitmaps, hyperloglogs 以及 geospatial indexes 儲存格式。
Redis 功能包括 replication, Lua scripting, LRU eviction, transactions,不同層級的 on-disk persistence(定時寫入硬碟,保持持久性), Redis Sentinel 的高可用性功能,以及 Redis Cluster 自動分區
你可以將上面的結構進行 atomic operations (原子操作。原子意思是不可分割的最小粒子,原子操作意思為不可中斷的一系列操作) ,例如: appending to a string incrementing the value in a hash pushing an element to a list computing set intersection, union and difference getting the member with highest ranking in a sorted set.
為了能有出色的執行效能,Redis 使用了 in-memory dataset 的方式來運作。並且能依照你習慣的方式,可以每次都將資料儲存在硬碟中,或者將每一個指令都寫入 log。如果你需要的是功能豐富、散播快且以記憶體的方式快取,就可以關掉持久性的寫入硬碟設定。
Redis 同時支援更細節的設定 主從異步複製(master-slave asynchronous replication),具有快速的非阻斷式優先同步、對於傳輸過程遺失部分片段,可採自動重新連結的方式,將網路節點中的小部分資料再重新同步。
其他還包括下列特性:
- Transactions
- Pub/Sub
- Lua scripting
- Keys with a limited time-to-live
- LRU eviction of keys
- Automatic failover
你可以從這個連結查看有哪些程式語言能使用 Redis Clients
Continue Reading
本文翻譯自 




圖 by 