Skip to content

Redis is an in-memory database that persists on disk. The data model is key-value, but many different kind of values are supported: Strings, Lists, Sets, Sorted Sets, Hashes, HyperLogLogs, Bitmaps.

License

Notifications You must be signed in to change notification settings

wonechao/redis

 
 

Repository files navigation

Introduction

XRedis is ctrip redis branch. Ctrip is a leading provider of travel services including accommodation reservation, transportation ticketing, packaged tours and corporate travel management.

Features

  • all features of redis 3.0.7 are inherited.
  • xslaveof command support
  • psync2 support

Details

xslaveof command

Suppose that redis slave is connectted to redis master(ip1 port1), at the mean time command slaveof ip2 port2 is sent to this slave. Then redis will do the following:

  1. Slave try this full resynchronization at the cron time(one time per second by default)

xslaveof ip port is a promotion for slaveof:

  1. Slave try this partial resynchronization as soon as possible

psync2 support

Here is the document for psync2

force full sync

* 命令 `refullsync`
force all slaves reconnect itself, and fullsync with slaves

slave read only mode can replicate all commands to it's slaves

WARN: dangerous, you have to know what you are doing when using this comman

config set slave-repl-all yes
config set slave-repl-all no
  1. Config remain in memory, never persist to disk
  2. Cofig will automatically become yes when server become master

About

Redis is an in-memory database that persists on disk. The data model is key-value, but many different kind of values are supported: Strings, Lists, Sets, Sorted Sets, Hashes, HyperLogLogs, Bitmaps.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C 79.5%
  • Tcl 16.8%
  • Ruby 2.7%
  • Shell 0.6%
  • Makefile 0.3%
  • C++ 0.1%