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 server notes

2025-04-11 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

Redis cache server notes

Redis is a high-performance key-value storage system that can be used as a caching framework and queue

But because it is an in-memory system, the data has to be stored in the database.

As a caching framework:

Create/updae/delete--- is saved to both redis and database

Query-- first checked from redis, no record before from the database, and also put a copy of the results from the database to redis

As a cache queue:

2. How to store the object Object in redis? Memcache access objects are serialized and deserialized

Use general serialization, deserialization (frequently consume cpu, use Google Protocol Buffer to type objects into binary streams)

Or use json storage (Alibaba's fast-json)

3. The client that java uses redis is generally jedis.

The native interface of jedis only supports basic data types and String, byte []

4. My understanding of the redis queue:

Important data: save to the database first, then to redis

Data that requires high response time: write to the cache first, and then write to the database through the message queue

Summary

The above are the Redis server notes introduced by the editor. I hope it will be helpful to you. If you have any questions, please leave a message for me. The editor will reply you in time. Thank you very much for your support to the website!

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

Servers

Wechat

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

12
Report