在看一个slideshare的PPT结果没有下载,只好做下笔记了
key-value store
all data lives in memory
keys can expire(or not)
fast,light-weight
persistence
multiple databases
Queryable keyspace
Support for integer counters
higher level data structures
atomic operations
ability to paginate lists without mutating them
master-slave replication
Optional VM feature(new)
ervery write command is logged ASAP
Commands replayed when the server is restarted
Configurable speed/safety(safest by default)
use the select command;0-15 are valid by default,but you can add more in redis.conf
useful for segmemting key namespaces,especially when key queries are needed
MOVE command can be used as a locking primitive
Data Structures
Strings
Strings-as-integers(used by INCR/DECR)
List of Strings
Set of Strings(unique list)
Sorted Set of String(and weights)(ZSET)
Command overview
strings:get,set,increment,decrement
Lists:lrpush,lpop,llen,lrange,ltrim
sets:add,remove,move,length,intersect,union,diff,random
others:save,lastsave can be used to force&verify disk persistence
Atomic Operations
LPUSH/RPUSH:append to head/tail of list
LPOP/RPOP:return & remove first/last element of list
RPOPLPUSH:return & remove the last element of source list and push to the head of the destination list
GETSET:set a key to a new value and return the old value
MGET/MSET:get or set multiple keys to multiple values
SMOVE:move a value from one set to another
Replication
Slave can be used for scalability or redundancy
A master can have multiple slaves.
Slaves are able to accept other slave connections
Redis replication is non-blocking on the master,but blocking on the slave(can't respond to uqeries during initial sync)
Slaves are able to automatically reconnect after an outage
Memcache Replacement
Why? Same as Memcached,but you get more "for free";
Many databases from a single instance of REdis(instead of using namespaces)
Ability to easily backup/transfer state(dump.rdb)
Watch live command on a running instance with the MONITOR command (instead of restarting with -v)
Opportunity to use Redis for other things once you've switched
Work Queue
LPUSH and RPOP were made for this
Resque
Created by Chris Wanstrath.Heavily inspired by DelayedJob.Currently used by GitHub.
Provides:
A Ruby library for creating,querying,and processing jobs
A Rake task for starting a worker which processes jobs
A Sinatra app for monitoring queues,jobs,and workers.
Replace MySQL ORDER BY RAND()
ORDER BY RAND() is very slow(even with a LIMIT clause)
DUplicating the list of IDs as a Redis set is relatively cheap
SRANDMEMBER is fast
Other Interesting Uses of Redis
Nginx HTTP Redis module for cacheing with Redis(ngx_http_redis)
LLOOG.com:Realtime site usage statistics,use alongside Google analytics
EZMobius'Fair Work Scheduler example
Sikwamic:Simple Redis-backend Comet server
RestMQ-A REST/JSON/HTTP based message queue built on Redis
redis-textsearch A simple full-text search for multiple data stores
分享到:
相关推荐
redis ppt 介绍
在提供的压缩包中,包含了一个名为 "PPT-PDF" 的文件,这可能是一个关于 Redis 的 PowerPoint 演示文稿转换成的 PDF 文件。这个资源可能涵盖了 Redis 的基础概念、安装步骤、命令使用、数据结构以及最佳实践等内容。...
Redis分布式缓存中间件培训PPT Redis是完全开源免费的高性能key-value数据库,可以满足高可用、高并发的要求。Redis支持数据的持久化,可以将内存中的数据保存在磁盘中,重启的时候可以再次加载进行使用。同时,...
Redis数据库从入门到实践 Redis是一种快速、高性能的键值对数据库,常用于缓存和会话管理等功能。该数据库采用内存存储数据,使得读取和写入速度非常快。同时,Redis还支持丰富的数据类型和命令,方便用户进行数据...
ppt格式的redis介绍,包括redis的原理,机制使用方法
redis 学习ppt 初学者 入门
国际上最大的redis用户是谁?在众多的NOSQL数据库与传统的关系数据库中为什么会出现redis? 传统的key-value数据库(文档,string类型)有什么不足?----数据结构需求 传统的关系型数据库IO操作性能问题?----性能...
redis快速入门详解PPT,做的非常不错的PPT,非常值得下载
Redis培训 Redis培训
redis讲解入门PPT介绍
如果有想学习redis,或者需要为redis进行介绍的,欢迎下载
Redis是一款开源的高性能键值对存储数据库,由意大利软件开发者Salvatore Sanfilippo创造,后被VMware公司收购。它支持存储的值包括字符串(strings)、哈希(hashes)、列表(lists)、集合(sets)、有序集合...
### Redis介绍与内部实现机制详解 #### 一、Redis特性 **(一)存储结构** Redis,即Remote Dictionary Server的缩写,是一种基于字典结构的高性能键值存储系统。这种设计使得Redis能够高效地处理各种类型的数据...
redis的简单ppt,东西不多.之前有次开会做的,希望有用
Redis 是一款高性能的开源键值存储系统,常用于数据缓存、消息队列以及数据库等领域。它的速度极快,能够处理每秒数十万次的读写操作,这得益于其内存存储特性以及高效的命令处理机制。 在Linux环境下安装Redis的...
Redis是一种开源的高性能键值对存储数据库,它支持数据的网络访问、基于内存的数据处理方式,并且以NoSQL的形式出现。Redis能够以键值对的方式存储数据,同时它也提供了丰富的数据类型,比如字符串(String)、列表...
Redis 快速入门详解 Redis 是一款开源的、高性能的键值存储系统(key-value store),常被称作是一款数据结构服务器(data structure server)。Redis 的键值可以包括字符串(strings)类型,同时它还包括哈希...
燕十八高性能架构班,redis数据库课程ppt
redis使用入门.ppt
Redis 是一款高性能的 NoSQL 数据库,以键值对存储为主,同时也支持多种数据结构如列表、集合、有序集合和哈希表等。它的名称 Remote Dictionary Server 表明其最初设计目的是作为远程字典服务,但随着时间的发展,...