What is the maximum value size you can store in redis?

RedisCelery

Redis Problem Overview


Does anyone know what the maximum value size you can store in redis? I want to use redis as a message queue with celery to store some small documents that need to be processed by a worker on another server, and I want to make sure the documents aren't going to be too big.

I found one page with a reference to 1GB, but when I followed the link on the page for where they got that answer the link wasn't valid anymore. Here is the link:

http://news.ycombinator.com/item?id=1182005

Redis Solutions


Solution 1 - Redis

All string values are limited to 512 MiB. This is the size limit you probably care most about.

EDIT: Because keys in Redis are strings, the maximum key size is 512 MiB. The maximum number of keys is 2^32 - 1 = 4,294,967,295.

Values, on the other hand, can vary in size depending on their type. For aggregate data types (i.e. hash, list, set, and sorted set), the maximum value size is 512 MiB for each element, although the data structure itself can have up to 2^32 - 1 elements.

https://redis.io/topics/data-types

https://redis.io/topics/faq#what-is-the-maximum-number-of-keys-a-single-redis-instance-can-hold-and-what-is-the-max-number-of-elements-in-a-hash-list-set-sorted-set

http://groups.google.com/group/redis-db/browse_thread/thread/1c7e33fbc98734b3?fwc=2

Solution 2 - Redis

Article about Redis Memory Usage can help you to roughly determine how much memory your database would take.

Solution 3 - Redis

It's in the order of the amount of RAM you have, at least, so unless you plan on puting multi-gigabyte objects in there I wouldn't worry. I've had sets that were hundreds of megabytes big without a problem, but I don't know the exact limits.

Solution 4 - Redis

A String value can accommodate the size of max 512MB. But according to this link, the size can be increased.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionKen CochraneView Question on Stackoverflow
Solution 1 - RedisBMinerView Answer on Stackoverflow
Solution 2 - Redisyojimbo87View Answer on Stackoverflow
Solution 3 - RedisTheoView Answer on Stackoverflow
Solution 4 - RedisGunasekarView Answer on Stackoverflow