Redis : a must-have for your LAMP stack

Let me introduce Redis

Redis is an open source, advanced key-value store. It is often referred to as a data structure server since keys can contain stringshashes,listssets and sorted sets.

You can run atomic operations on these types, like appending to a stringincrementing the value in a hashpushing to a listcomputing set intersectionunion and difference; or getting the member with highest ranking in a sorted set.

In order to achieve its outstanding performance, Redis works with an in-memory dataset. Depending on your use case, you can persist it either by dumping the dataset to disk every once in a while, or by appending each command to a log.

Redis also supports trivial-to-setup master-slave replication, with very fast non-blocking first synchronization, auto-reconnection on net split and so forth.

Other features include a simple check-and-set mechanismpub/sub and configuration settings to make Redis behave like a cache.

You can use Redis from most programming languages out there.

Redis is written in ANSI C and works in most POSIX systems like Linux, *BSD, OS X and Solaris without external dependencies. There is no official support for Windows builds, although you may have some options.

Redis is a must-have for any modern LAMP stack. Its 2.2.1 release is now available on Dotdeb for Debian 6.0 “Squeeze” in amd64 and i386 flavors. If you want to use it with PHP, please install the php5-redis package.

Links :