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

Advantages and Application scenarios of Redis

2025-04-08 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

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

The knowledge points of this article include: the security advantages of redis, the installation of redis, the difference between redis and memcached, and the application scenario of redis. I believe you have a certain understanding of redis after reading the complete article.

[introduction]

REmote DIctionary Server (Redis) is a key-value storage system written by Salvatore Sanfilippo.

It is often called a data structure server because the value can be of types such as String, Hash, list, sets, and sorted sets.

[three characteristics of redis]

1. What are the characteristics of redis?

A:

① Redis supports data persistence. You can save the data in memory in the disk photo and load it again when you restart it.

② Redis not only supports simple key-value type data, but also provides storage of data structures such as list,set,zset,hash.

③ Redis supports data backup, that is, data backup in master-slave mode.

2. What are the advantages of redis?

A:

① performance is extremely high-Redis can read 110000 times per second and write 81000 times 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, meaning either successful execution or failure to execute at all. A single operation is atomic. Multiple operations also support transactions, that is, atomicity, wrapped by MULTI and EXEC instructions.

④ 's rich features-Redis also supports publish/subscribe, notification, key expiration, and so on.

[installation]

1. Windows installation is extremely simple

Run under the cmd window: redis-server.exe redis.windows.conf

2. Under Linux, run. / redis-server

Of course, this installation is the default configuration.

3. The difference between Redis and Memcached?

A:

① data types: redis provides five data types: string,hash,list,set and zset (sorted set); all values of Memcached are String. From this point of view, Redis is an extension of Memcached and an inclusion relationship.

② storage mode: all Memcached data is stored in memory, power outage will be lost, the storage capacity must not exceed the memory size; Redis has part of the data stored on the hard disk, which can ensure the persistence of the data. Thus it can be seen that Memcached compares low

Capacity of ③ single data: redis can reach 1GB at most, while memcache only has 1MB

④ underlying model: Redis builds its own VM mechanism directly.

4. The application scenario of Redis?

Answer: session cache (Session Cache), full page cache (FPC), message queue, ranking / counter, publish / subscribe.

If you can read this, congratulations, you have the most profound experience of Redis from theory to practice. If you want to read more related articles, you are welcome to follow the industry information channel!

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

Internet Technology

Wechat

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

12
Report