My favorites | Sign in
Logo
                
Show all Featured downloads:
redis-1.02.tar.gz
People details
Project owners:
  antirez
Project committers:
qixludo
Project contributors:
simonwillisonnet, michelan...@altamore.org, anibalrojas

Redis 1.0 stable Released! Thanks for the help you provided in this months!

Redis 1.1 work in progress (sorted sets, in memory integer compression, append-only file persistence mode, and many more!)

Redis is an advanced key-value store. It is similar to memcached but the dataset is not volatile, and values can be strings, exactly like in memcached, but also lists, sets, and ordered sets. All this data types can be manipulated with atomic operations to push/pop elements, add/remove elements, perform server side union, intersection, difference between sets, and so forth. Redis supports different kind of sorting abilities.

In order to be very fast but at the same time persistent the whole dataset is taken in memory and from time to time and/or when a number of changes to the dataset are performed it is written asynchronously on disk. You may lost the last few queries that is acceptable in many applications but it is as fast as an in memory DB (Redis supports non-blocking master-slave replication in order to solve this problem by redundancy).

Since Redis 1.1 (currently in beta) Redis supports an append-only file persistence mode, that is an alternative to snapshotting for users that want to make sure no data is lost. The append-only log supports different kinds of fsync() policies.

Redis is written in ANSI C and works in most POSIX systems like Linux, *BSD, Mac OS X, Solaris, and so on. Redis is free software released under the very liberal BSD license. Redis is reported to compile and work under WIN32 if compiled with Cygwin, but there is no official support for Windows currently.

Beyond the key-value model

It is possible to think at Redis as a data structures server, it is not just another key-value DB, see all the commands supported by Redis to get the first feeling. Redis supports operations like atomic push and pop of elements on lists, taking ranges of elements from this lists at once, trimming of lists, server-side intersections of sets and even sorting data! To show our points we wrote a simple Twitter clone with PHP + Redis: it's a very simple but still a real world example of web application, the article explains step by step how to write scalable applications with Redis.

Supported languages

(Please make sure to also check the more specific Supported Languages section of the documentation.

All the client libraries are shipped in the same tar.gz together with Redis but if you want the latest versions check the main repositories. An exception is for both the Java clients that are not still included in the tar.gz since they reached stability recently.

Also there are other Redis related projects that are not library clients:

Speed

Redis is pretty fast!, 110000 SETs/second, 81000 GETs/second in an entry level Linux box. Check the benchmarks.

Sharding

I see a bit of misinformation in different articles around the net about Redis's ability to distribute the dataset across multiple servers. Redis can do it like any other key-value DB, basically it's up to the client library. For example the Ruby client supports consistent hashing out of the box, you can specify multiple servers and the library will take care of hashing the key and put different keys into different Redis servers. With client libraries not supporting consistent hashing you can do different things, hash the key yourself, split different User-IDs data into different servers using ranges (for example from UID 1 to 100000 to server 1, from 100001 to ... to server 2 and so on). Basically sharding is a feature that is natural in every kind of key-value DB, and even in SQL DBs if they are used just to access records by a single primary key.

In the long run I could like that all the client libraries for the most used languages will implement consistent hashing automatically, possibly using the same hashing algorithm, so that it will be possible to provide tools to redistribute the keys as fast as possible when adding or removing a node from a cluster of Redis boxes.

Learn more!

We have quite a bit of documentation, take a look.

To get fresh information about the development of Redis you can follow antirez's twitter.

Programming examples

Replication Quick Start

By default you can run Redis without a config file. For replication, at least in the slave, you need to load one. Just use ./redis-server redis.conf. All you have to do to make a Redis instance a slave of some other Redis server is to uncomment the slaveof <hostname> <port> line in the config file and re-run the slave. The two servers will sync and you can ask for the same queries in both to check the slave is actually a copy of the master. Learn more about replication...

News

Redis on the press

Who is using Redis?

Please if you use Redis in your startup drop me an email or tweet me @antirez and get listed here.

Road map

Redis 1.0 was released the 3 September 2009. We are making plans for the next roadmap that will lead to Redis 1.1.

Credits

Check the Credits page









Hosted by Google Code