Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does Redis Db has built-in compression option

Tags:

redis

Redis is "memory monster". Storing data as "compressed json string" minimizes memory usage. Is there any built-in compression option in Redis Db?

like image 572
Oguz Karadenizli Avatar asked Jun 06 '12 07:06

Oguz Karadenizli


People also ask

What happens if Redis goes down?

When Redis goes down, you have to deal with it. It is the same as if your file system is gone or your SQL Server is down. A lot of those systems disable all writes and set their cluster in maintenance state.

Is Redis persistent storage?

Within Redis, there are two different ways of persisting data to disk. One is a method called snapshotting that takes the data as it exists at one moment in time and writes it to disk. The other method is called AOF, or append—only file, and it works by copying incoming write commands to disk as they happen.

How does Redis DB work?

Redis employs a primary-replica architecture and supports asynchronous replication where data can be replicated to multiple replica servers. This provides improved read performance (as requests can be split among the servers) and faster recovery when the primary server experiences an outage.


1 Answers

Redis uses LZF light data compressor at the dump time, so it won't lessen the memory consumption. Implying that the redis does not compresses the data in memory and stores it as a string.You must deploy your own client side compression code.
The lua scripting also provides the compression algorithm but the branch is relatively new and therefore won't be advisable to use at production level.

like image 161
dan-boa Avatar answered Sep 21 '22 09:09

dan-boa