Upper length limit of Redis Sorted set member name

Viewed 26

I am seeking help to know what is the upper limit length for members in Redis sorted set.

For example, when I use ZADD operation, https://redis.io/commands/zadd/

ZADD myset 100 A-Really-Long-Member-Name

What is the upper size limit for the "A-Really-Long-Member-Name"? Thanks!

1 Answers

The Upper bound for a member name in a sorted set is 512 MB, not certain if this is caused directly by the sorted set itself, but RESP (the underlying protocol for redis) will not allow a bulk length greater than 512. I stress-tested it and found that I could create 500mb member values in a Sorted Set, not entirely sure what the usage model behind that would be but it does work.

Related