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

What does copy mean in redis

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

Share

Shulou(Shulou.com)05/31 Report--

This article mainly explains "what is the meaning of replication in redis". The content in the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "what is the meaning of replication in redis"?

In redis, users can have one server fetch and copy another server by executing the SLAVEOF command or setting the slaveof option.

Traditional replication is inefficient because it still goes through the whole replication process after disconnection (the master server saves rdb files, transfers files, transfers commands), and the new version of replication only executes commands that are not synchronized after disconnection (send PSYNC- from server > master server sends + CONTINUE- > synchronization command).

The principle of its implementation is very similar to seq and ack in tcp, which is made up of three parts.

1. Replication offset of master server and replication offset of slave server

two。 Replication backlog buffer for the primary server

3. The server runs ID, and each redis server, whether master or slave, has its own running ID, which is made up of 40 random hexadecimal characters. When the slave server replicates the master server for the first time, the master server passes its own running ID to the slave server, and the slave server saves the id. When disconnected and reconnected, the ID is sent for verification.

Thank you for your reading, the above is the content of "what is the meaning of replication in redis", after the study of this article, I believe you have a deeper understanding of the meaning of replication in redis, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

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