您可以在redis中存储的最大值是多少? [英] What is the maximum value size you can store in redis?

查看:478
本文介绍了您可以在redis中存储的最大值是多少?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人知道您可以在Redis中存储的最大值吗?我想将redis用作芹菜的消息队列,以将一些需要由工作人员处理的小文档存储在另一台服务器上,并且我想确保这些文档不会太大。

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.

我找到了一个引用1GB的页面,但是当我按照页面上的链接获取答案时,该链接不再有效。这是链接:

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

推荐答案

所有字符串值均限制为512 MiB。这是您可能最关心的大小限制。

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

EDIT :由于Redis中的键是字符串,因此最大键大小为512 MiB。键的最大数量为 2 ^ 32-1 = 4,294,967,295。

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.

另一方面,值的大小可能会有所不同,具体取决于在他们的类型上。对于聚合数据类型(即散列,列表,集合和排序集合),每个数据元素的最大值为512 MiB,尽管数据结构本身最多可以具有 2 ^ 32-1 元素。

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 -哈希表列表中元素的最大数量

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

这篇关于您可以在redis中存储的最大值是多少?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆