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

Working principle and advantages of redis

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

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

This article will explain in detail the working principle and advantages of redis. The content of the article is of high quality, so the editor will share it with you for reference. I hope you will have a certain understanding of the relevant knowledge after reading this article.

How redis works

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 hashs (hash type)

These data types support push/pop, add/remove, join and difference sets and richer operations, and these operations are atomic.

On this basis, redis supports a variety of different sorting methods. Like memcached, data is cached in memory to ensure efficiency.

The difference is that redis periodically writes updated data to disk or changes to an appended record file, and realizes master-slave (master-slave) synchronization on this basis.

Advantages of Redis:

Extremely high performance-Redis can support read and write frequencies of more than 100K + per second.

Rich data types-Redis supports Strings, Lists, Hashes, Sets and Ordered Sets data type operations for binary cases.

Atom-all operations of Redis are atomic, and Redis also supports atomicity after several operations have been merged.

Rich features-Redis also supports publish/subscribe, notification, key expiration, and so on.

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 writing is 110000 times / s and the speed of reading is 81000 times / s.

About the working principle of redis and its advantages to share here, I hope that the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.

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