suragys
suragys

Reputation: 15

What is internal implementation for Redis master-slave communication?

I want to use Redis Master-slave feature for replication between active and backup servers. But I want to know how the master-slave communication works? Because I have limitations in production, I cannot use Master-Slave configuration if Master makes TCP connections with the slave.

Upvotes: 1

Views: 371

Answers (1)

Imaskar
Imaskar

Reputation: 2939

  • Slave opens TCP connection to master.

  • Slave knows about his master.

  • Master only knows about currently connected slaves.

  • For a fresh (empty) or stale slave initially an RDB dump is
    transferred. Then master sends only diffs. This is done automatically.

  • There colud be cases when replication can't keep up (either very long blocking operation is happening or network is slow or interrupted). Then slave might decide to stop trying to catch up and download RDB dump again.

Upvotes: 1

Related Questions