Fast• Even more, the bottleneck may from your network card.
Support lots of complexoperations, you don’t need to process data in client side. a lot of I/O is sometimes needed
Data types• Strings – Binary safe, with a maximum of 512MB• Lists• Sets• Sorted sets – Set with score• Hashes – Perfect to represent object
Publish–subscribe• Redis supports publish-subscribe mode.• You can subscribe some topics, and when someone publish topic matches your interest, redis send it to you.
Transactions• Redis also support transactions.• you can execute multiple command in a single step.• Either all of the commands or none are processed > MULTI OK > INCR foo QUEUED > INCR bar QUEUED > EXEC 1) (integer) 1 2) (integer) 1
Replication• Official Master-slave replication – Write in Master, Read in Slaves
Persistence• You can choose persistence yourself – RDB • Take snapshot in an interval • Fast • may loss several minutes data if kill -9 – AOF • Log-based, redo whole steps since startup • Still fast enough • may loss 1 second data if kill -9 – None(like memcached)
Partition• There are three way that is recommend by redis official group. – Redis Cluster • Official way, Under development – Twemproxy • Twitter developed, support redis and memcached. – Clients supporting consistent hashing
Twemproxy• Twemproxy is an intermediate layer between clients and Redis instances.• Reliably handle partitioning Redis instance Twem Client proxy Redis instance Redis Twem instance Client proxy Redis instance