Redis 2.0 and 2.2Nearing the final release, Redis 2.0 contains a new AOF (Aggregate Objective Function) tool, a new testing suite, and "ridiculous speed improvements," said Sanfilippo. Other new features in Redis 2.0 include VM optimization and Pub/Sub matching support. In version 2.2, the focus is on increasing Redis' reliability, enhancing documentation, and reducing memory footprint. There are several features that Sanfilippo wanted to add, such as stronger string type controls, MULTI/EXEC with CAS support, and a good clustering solution, but right now he's slowing down the process of adding new things.
Currently the Redis developers are working on facilitating DEL replication on expires in slaves and append only files. This 2.2 feature will make it possible to perform write operations against expiring keys. In addition to that, the developers have already made Redis 2.2 an order of magnitude less memory-hungry for aggregates.
Lowering the Memory FootprintSanfilippo and Peter Noordhuis together implemented some tricks for the Hash data type and reworked the top-level key->value dictionary to save memory. Together, these changes greatly reduced the amount of memory used by Redis on several different types of datasets. Those datasets include:
- Many keys containing lists with an average length of 10, 100, 300, 500 elements
- Many keys containing sets of integers with less than 1000 elements
- Many keys containing hashes representing objects with 10, 20, 50 fields
As a result, one million keys, for example, with 500 elements list in each key costs 2GB, and one million keys with a Hash representing a user with name, surname, and 10 more random fields costs 300 MB on Redis 2.2. There are also plans to enhance documentation and increase reliability in 2.2, but Sanfilippo hasn't mentioned any features in those areas just yet.