Home Development of Websites Redis- a high-performance data warehouse

Redis- a high-performance data warehouse

by admin

Cheerful day, hubro-humans!

What is Redis?

Redis – is a high-performance non-relational distributed data store.Unlike Memcached, which can delete your data at any time, crowding out old records with new ones, Redis stores information all the time, so it’s like MemcacheDB

How is Redis different from existing solutions?

APIto work with Memcached (MemcacheDB) allows to store arrays, but these arrays will be serialized and stored as strings, so atomic operations on such arrays are not possible.
Redis allows to store both strings and arrays, to which atomic pop / push operations can be applied, to select from such arrays, to sort elements, to get union and intersection of arrays.

Performance

110, 000 SET requests per second, 81, 000 GET requests per second on an entry level Linux server ( tests ).
The high speed of Redis is ensured by the fact that data is stored in RAM and saved to disk either at regular intervals or when a certain number of unsaved requests are exceeded. This means that if you use Redis, you may lose the results of the last few requests, which is quite acceptable for most web applications, since Redis accesses the memory at the same speed as the memory. However, losses can be avoided through redundancy – Redis supports non-blocking master-slave replication.

Sharding

Redis as well as Memcached can work as distributed storage on many physical servers. This functionality is implemented in client libraries, and unfortunately this functionality is only implemented "out of the box" in RubyAPI so far, but that doesn’t stop you from hashing the key yourself and getting the ID of the server this key is addressed to.

API

The API is available for the following languages :

  • Ruby
  • Python
  • PHP
  • Erlang
  • Tcl
  • Perl
  • Lua
  • Java

The API for PHP is available both as a module written in C and as a PHP5 class which communicates with the Redis server via sockets, so no module has to be installed.
There is also a PHP5 class from a domestic developer (with named trustworthy. I mean it. ) – IMemcacheClient (Thank you. DYPA for at vodka)

Prospects for development

Redis 0.900 (1.0 release candidate 1) is available now and will become version 1.0 very soon
In the near future the authors promise to implement some interesting features, including data compression.

License and supported platforms

Redis is written in ANSI C and works on most POSIX systems (Linux, MacOS X). It is free open source software under the BSD license =)
Up: Rediska – handy PHP-client for Redis key-value database Official site

You may also like