Company
Date Published
Author
Redis
Word count
1345
Language
English
Hacker News points
None

Summary

Redis' replication mechanism is a simple yet effective tool for increasing availability and scaling out Redis setups by performing reads against read-only slaves. However, in certain rare scenarios where dataset size grows significantly, activation of replication can prove to be a challenging task due to various limitations such as latency due to fork, physical limits of file transfer, and time constraints. These limitations can lead to prolonged synchronization times, causing the slave to never complete synchronization and replication to start. To address this issue, Redis provides a client-throttling mechanism, which introduces delays to master server responses to application clients' requests, providing enough "breathing room" for the slave to finish transferring the file and replaying updates log before the latter runs out of space. The throttling mechanism is configured using the `slave-output-buffer-throttling` configuration variable, which allows users to set a low, high, rate, and delay threshold for optimal performance.