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

Ken Cochrane picture Ken Cochrane · Apr 9, 2011 · Viewed 71.2k times · Source

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

Answer

BMiner picture BMiner · Apr 11, 2011

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