Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Redis can store several key

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

How many key can redis store? Perhaps many people do not understand, in order to let you understand better, the editor summed up the following content, I hope you can gain something according to this article.

Redis is a key-value storage system. Similar to Memcached, it supports relatively more value types, including string (string), list (linked list), set (collection), zset (sorted set-ordered collection), and hash (hash type). The emergence of redis makes up for the deficiency of key/value storage such as memcached to a great extent, and can play a good complementary role to relational database in partial situations. It provides clients such as Java,C/C++,C#,PHP,JavaScript,Perl,Object-C,Python,Ruby,Erlang, which is easy to use.

How many key can redis save?

Officials say that a single case can handle key: 250 million, see link: https://redis.io/topics/faq, here are the exact words:

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 2 ^ 32 keys, and was tested in practice to handle at least 250 million keys per instance.

Every hash, list, set, and sorted set, can hold 2 ^ 32 elements.

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

The storage capacity varies from data type to data type:

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

Strings type: a value of String type can store up to 512m

Lists type: the maximum number of elements in list is 2 ^ 32-1, that is, 4294967295.

Sets type: the maximum number of elements is 2 ^ 32-1, that is, 4294967295.

Hashes type: the maximum number of key-value pairs is 2 ^ 32-1, that is, 4294967295.

Sorted sets type: similar to Sets type.

Performance introduction of redis:

Here are the official bench-mark figures:

The test completed 50 concurrent execution of 100000 requests.

The value set and obtained is a 256-byte string.

Linux box is running Linux 2.6, which is X3320 Xeon 2.5 ghz.

Text execution uses the loopback interface (127.0.0.1).

Results: the speed of reading is 110000 times / s, and the speed of writing is 81000 times / s.

After reading the above, do you have any further understanding of redis's value storage key? If you want to know more about it, you are welcome to follow the industry information channel. Thank you for reading.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report