`

twemproxy支持的redis命令

阅读更多
https://raw.github.com/twitter/twemproxy/master/notes/redis.md

Keys Command
      Command      Supported Format                                                                                                             
        DEL            Yes     DEL key key …                                                                                                    
       DUMP            Yes     DUMP key                                                                                                           
      EXISTS           Yes     EXISTS key                                                                                                         
      EXPIRE           Yes     EXPIRE key seconds                                                                                                 
     EXPIREAT          Yes     EXPIREAT key timestamp                                                                                             
       KEYS            No      KEYS pattern                                                                                                       
      MIGRATE          No      MIGRATE host port key destinationdb timeout                                                                       
       MOVE            No      MOVE key db
      OBJECT           No      OBJECT subcommand arguments arguments …                                                                        
      PERSIST          Yes     PERSIST key                                                                                                        
      PEXPIRE          Yes     PEXPIRE key milliseconds                                                                                           
     PEXPIREAT         Yes     PEXPIREAT key millisecondstimestamp
      PTTL             Yes     PTTL key                                                                                                           
     RANDOMKEY         No      RANDOMKEY                                                                                                          
      RENAME           No      RENAME key newkey
     RENAMENX          No      RENAMENX key newkey
      RESTORE          Yes     RESTORE key ttlserializedvalue
      SORT             No      SORT key BY pattern LIMIT offset count GET pattern GET pattern  ASC
       TTL             Yes     TTL key                                                                                                            
      TYPE             Yes     TYPE key                                                                                                           

Strings Command
      Command      Supported Format                                                                                                             
       APPEND          Yes     APPEND key value                                                                                                   
      BITCOUNT         Yes     BITCOUNT key start end                                                                                         
       BITOP           No      BITOP operation destkey key key
       DECR            Yes     DECR key                                                                                                           
      DECRBY           Yes     DECRBY key decrement                                                                                               
       GET             Yes     GET key                                                                                                            
      GETBIT           Yes     GETBIT key offset                                                                                                  
     GETRANGE          Yes     GETRANGE key start end                                                                                             
      GETSET           Yes     GETSET key value                                                                                                   
      INCR             Yes     INCR key                                                                                                           
      INCRBY           Yes     INCRBY key increment                                                                                               
     INCRBYFLOAT       Yes     INCRBYFLOAT key increment                                                                                          
      MGET             Yes     MGET key key
      MSET             No      MSET key value key value                                                                                      
      MSETNX           No      MSETNX key value key value                                                                                    
      PSETEX           Yes     PSETEX key milliseconds value                                                                                      
      SET              Yes     SET key value EX seconds PX milliseconds NX
      SETBIT           Yes     SETBIT key offset value                                                                                            
      SETEX            Yes     SETEX key seconds value                                                                                            
      SETNX            Yes     SETNX key value                                                                                                    
      SETRANGE         Yes     SETRANGE key offset value                                                                                          
      STRLEN           Yes     STRLEN key                                                                                                         

Hashes
      Command      Supported Format                                                                                                             
       HDEL            Yes     HDEL key field field
      HEXISTS          Yes     HEXISTS key field                                                                                                  
       HGET            Yes     HGET key field                                                                                                     
      HGETALL          Yes     HGETALL key                                                                                                        
      HINCRBY          Yes     HINCRBY key field increment                                                                                        
    HINCRBYFLOAT       Yes     HINCRBYFLOAT key field increment                                                                                   
      HKEYS            Yes     HKEYS key                                                                                                          
      HLEN             Yes     HLEN key                                                                                                           
      HMGET            Yes     HMGET key field field
      HMSET            Yes     HMSET key field value field value                                                                             
      HSET             Yes     HSET key field value                                                                                               
      HSETNX           Yes     HSETNX key field value                                                                                             
      HVALS            Yes     HVALS key                                                                                                          

Lists
      Command      Supported Format                                                                                                             
       BLPOP           No      BLPOP key key  timeout                                                                                        
       BRPOP           No      BRPOP key key  timeout                                                                                        
     BRPOPLPUSH        No      BRPOPLPUSH source destination timeout                                                                              
      LINDEX           Yes     LINDEX key index                                                                                                   
      LINSERT          Yes     LINSERT key BEFORE
      LLEN             Yes     LLEN key                                                                                                           
      LPOP             Yes     LPOP key                                                                                                           
      LPUSH            Yes     LPUSH key value value
      LPUSHX           Yes     LPUSHX key value                                                                                                   
      LRANGE           Yes     LRANGE key start stop                                                                                              
      LREM             Yes     LREM key count value                                                                                               
      LSET             Yes     LSET key index value                                                                                               
      LTRIM            Yes     LTRIM key start stop                                                                                               
      RPOP             Yes     RPOP key                                                                                                           
     RPOPLPUSH         Yes    RPOPLPUSH source destination                                                                                       
      RPUSH            Yes     RPUSH key value value
      RPUSHX           Yes     RPUSHX key value                                                                                                   

Sets
      Command      Supported Format                                                                                                             
      SADD             Yes     SADD key member member
      SCARD            Yes     SCARD key                                                                                                          
      SDIFF            Yes    SDIFF key key
     SDIFFSTORE        Yes    SDIFFSTORE destination key key
      SINTER           Yes    SINTER key key
    SINTERSTORE        Yes    SINTERSTORE destination key key
     SISMEMBER         Yes     SISMEMBER key member                                                                                               
     SMEMBERS          Yes     SMEMBERS key                                                                                                       
      SMOVE            Yes    SMOVE source destination member                                                                                    
      SPOP             Yes     SPOP key                                                                                                           
    SRANDMEMBER        Yes     SRANDMEMBER key count                                                                                            
      SREM             Yes     SREM key member member
     SUNION            Yes    SUNION key key
   SUNIONSTORE         Yes    SUNIONSTORE destination key key

Sorted Sets
      Command      Supported Format                                                                                                             
      ZADD             Yes     ZADD key score member score member                                                                             
      ZCARD            Yes     ZCARD key                                                                                                          
      ZCOUNT           Yes     ZCOUNT key min max                                                                                                 
      ZINCRBY          Yes     ZINCRBY key increment member                                                                                       
     ZINTERSTORE       Yes    ZINTERSTORE destination numkeys key key  WEIGHTS weight weight  AGGREGATE SUM
      ZRANGE           Yes     ZRANGE key start stop WITHSCORES                                                                                 
    ZRANGEBYSCORE      Yes     ZRANGEBYSCORE key min max WITHSCORES LIMIT offset count                                                        
      ZRANK            Yes     ZRANK key member                                                                                                   
       ZREM            Yes     ZREM key member member
   ZREMRANGEBYRANK     Yes     ZREMRANGEBYRANK key start stop                                                                                     
  ZREMRANGEBYSCORE     Yes     ZREMRANGEBYSCORE key min max                                                                                       
    ZREVRANGE          Yes     ZREVRANGE key start stop WITHSCORES                                                                              
  ZREVRANGEBYSCORE     Yes     ZREVRANGEBYSCORE key max min WITHSCORES LIMIT offset count                                                     
     ZREVRANK          Yes     ZREVRANK key member                                                                                                
     ZSCORE            Yes     ZSCORE key member                                                                                                  
    ZUNIONSTORE        Yes    ZUNIONSTORE destination numkeys key key  WEIGHTS weight weight  AGGREGATE SUM

PubSub
      Command      Supported Format                                                                                                             
     PSUBSCRIBE        No      PSUBSCRIBE pattern pattern
     PUBLISH           No      PUBLISH channel message                                                                                            
    PUNSUBSCRIBE       No      PUNSUBSCRIBE pattern pattern
     SUBSCRIBE         No      SUBSCRIBE channel channel
     UNSUBSCRIBE       No      UNSUBSCRIBE channel channel

Transactions
      Command      Supported Format                                                                                                             
      DISCARD          No      DISCARD                                                                                                            
       EXEC            No      EXEC                                                                                                               
       MULTI           No      MULTI                                                                                                              
      UNWATCH          No      UNWATCH                                                                                                            
       WATCH           No      WATCH key key

Scripting
      Command      Supported Format                                                                                                             
       EVAL            Yes    EVAL script numkeys key keyargarg
     EVALSHA           Yes    EVALSHA shanumkeys key keyargarg
    SCRIPT EXISTS      No      SCRIPT EXISTS script script
    SCRIPT FLUSH       No      SCRIPT FLUSH                                                                                                       
    SCRIPT KILL        No      SCRIPT KILL                                                                                                        
    SCRIPT LOAD        No      SCRIPT LOAD script                                                                                                 

Connection
      Command      Supported Format                                                                                                             
       AUTH            No      AUTH password                                                                                                      
       ECHO            No      ECHO message                                                                                                       
       PING            No      PING                                                                                                               
       QUIT            No      QUIT                                                                                                               
      SELECT           No      SELECT index                                                                                                       

Server
      Command      Supported Format                                                                                                             
    BGREWRITEAOF       No      BGREWRITEAOF                                                                                                       
      BGSAVE           No      BGSAVE                                                                                                             
    CLIENT KILL        No      CLIENT KILL ipport
    CLIENT LIST        No      CLIENT LIST                                                                                                        
    CONFIG GET         No      CONFIG GET parameter                                                                                               
    CONFIG SET         No      CONFIG SET parameter value                                                                                         
  CONFIG RESETSTAT     No      CONFIG RESETSTAT                                                                                                   
     DBSIZE            No      DBSIZE                                                                                                             
    DEBUG OBJECT       No      DEBUG OBJECT key                                                                                                   
    DEBUG SEGFAULT     No      DEBUG SEGFAULT                                                                                                     
     FLUSHALL          No      FLUSHALL                                                                                                           
     FLUSHDB           No      FLUSHDB                                                                                                            
      INFO             No      INFO                                                                                                               
     LASTSAVE          No      LASTSAVE                                                                                                           
     MONITOR           No      MONITOR                                                                                                            
      SAVE             No      SAVE                                                                                                               
     SHUTDOWN          No      SHUTDOWN NOSAVE SAVE                                                                                           
     SLAVEOF           No      SLAVEOF host port                                                                                                  
     SLOWLOG           No      SLOWLOG subcommand argument                                                                                      
      SYNC             No      SYNC                                                                                                               
      TIME             No      TIME                                                                                                               


分享到:
评论

相关推荐

    laravel项目利用twemproxy部署redis集群的完整步骤

    5. **启动 Twemproxy**:使用 `nutcracker` 命令启动代理服务,指定配置文件路径,还可以启用日志记录。 6. **Laravel 配置**:最后,在 Laravel 项目中,将 `.env` 文件中的 `REDIS_HOST` 和 `REDIS_PORT` 设置为 ...

    第三章 Redis/SSDB+Twemproxy安装与使用

    Twemproxy支持TCP和UDP协议,具有低延迟、高性能的特点,且配置简单,适合快速部署。它并不处理数据,而是直接转发请求,因此对于复杂的业务逻辑,需要在客户端进行处理。 在安装Redis时,通常需要下载源码,编译并...

    Redis 集群解决方案 Codis.zip

    架构:特性:自动平衡使用非常简单图形化的面板和管理工具支持绝大多数 Redis 命令,完全兼容 twemproxy支持 Redis 原生客户端安全而且透明的数据移植,可根据需要轻松添加和删除节点提供命令行接口RESTful APIs安装...

    Twemproxy 0.4.1

    - **命令支持**:支持大部分Redis和Memcached命令,但不支持所有命令,如Lua脚本等复杂操作。 - **故障检测**:监控后端服务器状态,自动隔离故障节点。 - **性能优化**:通过批量处理、命令合并等技术,提高网络...

    redis -3.0.501 -windows x64

    通过这个工具,你可以执行各种Redis命令,如`SET`、`GET`、`LPUSH`等,进行数据的读写操作。 7. **数据持久化**: Redis支持两种数据持久化方式:RDB(快照)和AOF(Append Only File)。RDB会在指定时间间隔或...

    redis-windows客户端

    6. **使用Redis命令**:现在你可以使用Redis命令进行数据操作,如`SET key value`用来设置键值对,`GET key`用来获取键对应的值,`DEL key`用来删除键,`KEYS *`用来查找所有键等。 7. **管理与监控**:Redis在...

    redis面试题及其答案.pdf

    事务功能是Redis支持的,它能够保证一次性执行多个命令时的原子性。通过LUA脚本,Redis能在服务器端执行更为复杂的逻辑操作。此外,Redis支持数据持久化,即把内存数据写入硬盘,以防系统重启时数据丢失。最后,...

    redis开发运维指南.pdf

    此外,文档还提到了Sharding架构,包括Redis 3.0 Cluster和Twemproxy,它们通过数据分片提供了扩展性和高可用性。 开发运维指南不仅需要涵盖基本操作和理论,还应当指导开发人员和运维人员在遇到问题时进行故障排查...

    最全50道Redis高频面试题.pdf

    twemproxy是一种代理方式,通过一致性哈希算法分发请求到多个Redis实例,并支持自动节点故障转移。codis是另一个流行的集群方案,它解决了twemproxy中的数据自动迁移问题。Redis自带的集群方案基于hash槽,并支持从...

    Redis集群_实际使用自己整理的版本.docx

    - **CodisRedis**:Codis项目维护的一个特殊版本的Redis,支持slot和数据迁移命令。 - **Codisconfig**:提供了管理工具及图形化界面,支持添加/删除节点、数据迁移等操作。 - **ZooKeeper**:分布式应用程序协调...

    Redis面试题(含答案).pdf

    - **事务(Transactions)**:Redis支持事务,可以一次性按顺序执行多个命令,保证原子性,但不支持回滚。 - **LUA脚本**:通过LUA脚本可以在服务器端执行复杂的逻辑,以原子方式执行一系列操作。 - **持久化**:...

    Redis 27道面试题及答案.docx

    对于 Redis 集群方案,常见的有 Codis、使用第三方代理如 Twemproxy 或 Redis 自带的 Redis Cluster。Redis 集群中,如果某个节点故障,可能导致部分数据无法访问,从而影响整个集群的可用性。例如,如果 A、B、C 三...

    Redis常见50问

    1. Twemproxy:作为一个代理,它将请求转发到合适的Redis实例,采用一致性哈希算法,但不支持动态调整节点。 2. Codis:类似Twemproxy,但支持在节点变化时迁移数据,提供更好的容错能力。 3. Redis Cluster:官方的...

    twemproxy源码包

    5. **多线程和线程安全**:Twemproxy支持多线程模型,可以利用多核CPU,提高并发处理能力。它的线程安全特性确保了在高并发环境下数据的一致性和完整性。 6. **缓存协议支持**:Twemproxy实现了Redis和Memcached的...

    cpp-改造twemproxy使其支持ssdb协议ssdb的分片和ssdb的读写分离

    标题中的“cpp-改造twemproxy使其支持ssdb协议ssdb的分片和ssdb的读写分离”意味着我们需要深入理解三个主要概念:C++编程、twemproxy(也称为nutcracker)以及SSDB数据库。 1. **C++编程**: C++是一种静态类型、...

    Redis面试题集

    1. Codis:与 twemproxy 类似,支持动态调整节点,数据可以在节点变化后恢复。 2. Redis Cluster 3.0:采用 hash 槽的分布式算法,支持节点备份。 3. 业务代码层实现:自行编写代码来分发和管理数据,需要处理节点...

    Codis分布式Redis解决方案-其他

    Codis是一个分布式Redis解决方案,对于上层的应用来说,...支持绝大多数 Redis 命令,完全兼容 twemproxy 支持 Redis 原生客户端 安全而且透明的数据移植,可根据需要轻松添加和删除节点 提供命令行接口 RESTful APIs

Global site tag (gtag.js) - Google Analytics