gpt4 book ai didi

redis - AWS Elasticache redis 安全和限制

转载 作者:IT王子 更新时间:2023-10-29 06:13:03 29 4
gpt4 key购买 nike

我正在使用 AWS Elasticache Redis 存储 AWS Lambda 的用户 session 。

  1. 为超过 1000 个用户使用 Elasticache 将键值对存储在内存 (Redis) 中并为所有这些键设置过期时间是否合适?
  2. 在 Redis 中存储 key 有什么限制吗?

最佳答案

回答问题(1):

如果您的实例有足够的 RAM 来存储数据(我假设它有)那么没问题。 Redis 旨在用于将数据存储在内存中(可以刷新到磁盘)。

我已经在生产中使用了数百万个 key ,没有出现问题。

回答问题(2):

What is the maximum number of keys a single Redis instance can hold?and what the max number of elements in a Hash, List, Set, Sorted Set?

Redis can handle up to 232 keys, and was tested in practice to handleat least 250 million keys per instance.

Every hash, list, set, and sorted set, can hold 232 elements.

In other words your limit is likely the available memory in yoursystem.

https://redis.io/topics/faq

关于redis - AWS Elasticache redis 安全和限制,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50079997/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com