Intro to Redis – A NoSQL Key-Value Store


redis-logoBlazingly fast and rapidly replicable are two of the characteristics often associated with the Redis key-value store. From its first version in 2009 by its chief developer Salvatore Sanfilippo, Redis (from REmote DIctionary Server and a play on ‘Redistribute’) has become one of the stars of the NoSQL database family. Redis can and often does work entirely in RAM. This allows reads and writes of data without involving slower disk access, and contributes to the high performance for which Redis is renowned. Data security and integrity can be enhanced by writing Redis to disk at regular intervals and by logging interim commands between writes. This allows the Redis data store to be reconstructed from a given recovery point, if necessary.

Redis Data Structure Versatility

While Redis is often categorized as a key-value store, it can also be considered to be a data structure server. It supports five types of data structure, namely, hashes, lists, sets, ordered sets and strings, and offers an individual set of commands to manipulate each type. Efficiency and speed of operation apply to all. For example, for GET and SET commands on string structures (which may be character strings, integer counters or blobs – binary large objects), Redis can perform more than 100,000 SETs per second and in excess of 80,000 GETs per second.

Platforms, Support and Licensing

Written in ANSI C, Linux and OS X are the operating systems used for Redis development and testing. Linux is then the platform of choice for deployment. Solaris or Solaris-derived systems such as SmartOS are only supported on a ‘best effort basis’. There is no official support for Redis under Windows. Redis can be used on cloud platforms that include Amazon Web Services, Heroku, Joyent, Rackspace and Windows Azure. It also benefits from bindings in many popular programming languages: ActionScript, C, C++, Erlang, Java, JavaScript, Lua, Perl, PHP, Python, Ruby and Tcl are just some examples. Redis is BSD licensed. The source and the binary code may be redistributed with or without modification subject to certain conditions such as including copyright and disclaimer notices.

When Would You Choose Redis?

Besides functioning as an ultra-fast and flexible database, Redis can also be used for caching, counting items and as an inter-process communication mechanism. Other popular reasons for using Redis include ease of replication of data across different datacenters, scalability with low latency when handling queries, and high availability. Some users mix and match technologies: they use Redis for frequently read, volatile data and then stock large volumes of less frequently consulted data in a conventional database such as MySQL. If you want to install Redis on your own Linux machine, the surest way to get the latest, stable version is to download from the link Linux package managers may not always offer the most up to date release.

Who’s using it today?

Redis is rated as the most popular key-value store available today, according to Major users include the Guardian (the UK newspaper), GitHub, and Stack Overflow.  The Hulu online video service uses Redis to support over 30 million unique viewers per month, using Redis as a data cache to store approximately 4 billion records and responding to about 7,000 queries per second.

Leave a Reply

Your email address will not be published. Required fields are marked *


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>