Get the App
SLTechnology News&Howtos  ›  Database  › 

What does copy mean in redis

Shulou Source: shulou.com Published: 2022-05-31 18:54:06 11月13日 Update

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!

Tags: Server service meaning command learning running content file transfer offset synchronization verification low three traditional hexadecimal principle can pass character that is Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Tech Info Shulou Information Apple MariaDB vpn