Replication Queries

34 views
Skip to first unread message

Raman Gupta

unread,
Jun 23, 2017, 11:05:52 AM6/23/17
to Redis DB

Hi,

I am new to experimenting with Redis and have a few system engineering question about Redis esp. replication.

Environment:
-----------------------
) OS: Centos EL7
) Version: redis-3.2.3-1.el7.x86_64

System:
---------------
) One single Redis Master. Clients of master will mostly write to Redis database and rarely read.
) Hundreds of Redis slaves (500 <= slaves <= 1000). Clients of Redis slave will typically read from slave Redis database and rarely write.
) Clients of master or slave redis will be trivial in number.
) Redis Master is a central server and slaves are on embedded systems.
) Redis cluster is NOT used.

Persistence:
---------------------
) Both AOF and RDB enabled for maximum durability.

Connection:
---------------------
) Master connected to slaves over satellite links i.e. slow (700 msec RTT), lossy(10% pkt loss) and expensive.
) Master-Slave connection is sometimes down, sometimes even for hours. At times slaves are themselves powered off.
) When slaves are up again and/or Master-Slave connection is back, the slaves will attempt to reconnect to Redis master.
  So at any point of time a few slaves will always be requesting PSYNC/SYNC. 

Key-Value datastore size:
----------------------------------------
) Approx 200 - 300 million bytes (200MB - 300MB). 
) Data is organised in Set. Sample data "Key:222222222 Value1:4444444444444 Value2:33333333333333".
) Each record ~50 bytes. Total records approx 5-6 million. 

=======================
Replication Queries:
=======================
) Can a single master Redis server handle hundreds of slave?
) During replication (SYNC/PSYNC) does Redis compresses data to save bandwidth? If yes, typically how much ratio of actual data is transferred over connection.
) If slave is powered on, is it possible to only do partial resync(RESYNC) and not full resync (SYNC) and thus save bandwidth?
) What configurations can be changed to allow bandwidth savings in general bteween master and slave? I have made following config changes:
    repl-backlog-size 100mb
    repl-backlog-ttl 0
    repl-disable-tcp-nodelay yes
    appendonly yes


Thank You,

Raman Gupta

unread,
Jul 2, 2017, 4:07:39 AM7/2/17
to Redis DB

From my experiments and analysis:

> ) During replication (SYNC/PSYNC) does Redis compresses data to save bandwidth? If yes, typically how much ratio of actual data is transferred over connection.
NO.

> ) If slave is restarted, is it possible to only do partial resync(RESYNC) and not full resync (SYNC) and thus save bandwidth?
In release >= 4.0, but not in 3.x
'
Reply all
Reply to author
Forward
0 new messages