This article is more than 1 year old

Redis releases respectable revision, tiptoes through tricky political terminology

Database more adept at replication, memory control

Redis, the moderately popular in-memory open-source database has just hit its 4.0.0 milestone, to the delight of some.

Project creator Salvatore Sanfilippo, who presently oversees development of the NoSQL info store at Redis Labs, celebrated the event with a Google Groups note to fans.

Conceding Redis is not yet magically perfect – a claim seldom attempted by those outside of Apple – Sanfilippo described the release as "a very important, measurable step forward" because it removes some prior limitations.

Among the new features is PSYNC2, a new replication engine. According to Sanfilippo, the way Redis handles replication and the way it propagates changes between masters and slaves has changed.

"Now slaves promoted to masters are able to accept the old slaves (reconfigured to point to the new master) without the need to do a full resynchronization," wrote Sanfilippo. "Similarly slaves can be stopped, upgraded and restarted, and can continue with the master with just a partial resynchronization."

Master and servant

Sanfilippo is aware that "slave" and "master" represent culturally fraught terminology, at least for some portion of the political spectrum. In a post on Hacker News, he said that while he's not convinced traditional database language needs to change, he has tried to offer reminders about what human slavery was, and in parts of the world, still is.

Toward that end, Redis since version 1.0.0 has offered the SLAVEOF NO ONE command, which turns a server acting as a slave into a master. Though hardly a salve for history, it has a peculiar appeal.

Redis 4.0.0 implements modules to extend the database's functions. Manish Gupta, chief marketing officer at Redis Labs, in a phone interview with The Register, said modules have been for a while "but until 4.0, people couldn't necessarily put them into production."

Tague Griffith, head of developer advocacy, said Redis users appear to be particularly enthusiastic about the the expansion of Redis' eviction algorithm, by which the database cache gets cleansed, to include support for a Least Frequently Used (LFU) policy, in addition to Least Recently Used (LRU).

The commands DEL, FLUSHDB and FLUSHALL can now be run in different threads, which in conjunction with the new SWAPDB command, allows atomic dataset swapping while offering reduced latency sensitivity and improved replication setup times.

The Raspberry Pi is now a supported platform for Redis and there's a new MEMORY command for – you guessed it – better insight into memory usage and how it is allocated across objects.

Redis Cluster, a way to shard data across multiple Redis nodes, has seen some improvement but more substantive changes are planned for version 4.2

Finally, Redis 4.0.0 adds active memory defragmentation. The database will now help scan memory keyspace allocations and rearrange things to help reduce memory fragmentation.

"As you go along, your memory gets fragmented, split up, and it becomes expensive to reclaim all these little bits of memory so they can be be reallocated to larger objects," said Griffith. "Now Redis can work with the defragmentation systems built into the Linux kernel to reclaim memory more efficiently."

Asked about Redis usage, Gupta said he didn't have overall usage figures for the open source database, but Redis Labs had over 67,000 enterprise accounts on its cloud service, with more than 7,100 paying customers. ®

More about


Send us news

Other stories you might like