KeyDB icon indicating copy to clipboard operation
KeyDB copied to clipboard

[BUG] Active Replica gives error LOADING Redis is loading the dataset in memory on full sync

Open teyeheimans opened this issue 4 years ago • 0 comments

Describe the bug

Active Replica Setup (Active Active) is not a good solution for fail-over scenarios. When a server goes down and comes back up, it forces the "online" server to do a full sync, causing the only live server to be unavailable. This causes errors like "LOADING Redis is loading the dataset in memory".

To reproduce

Create two servers with an active-active setup. Put HAProxy in front of it as described in the docs: https://docs.keydb.dev/docs/haproxy

Haproxy will connect to the live servers. Put 1 server in maintenance in HAproxy and wait untill all connections are drained from the server which should go down.

Now reboot the machine. After it will come up, it will ask a full sync from the live server. However, after that, the live server also do a full sync with the rebooted server. This last action causes that the connections going to the only live server are broken and they receive the error "LOADING Redis is loading the dataset in memory".

Expected behavior

The live server should not go down. Currently it is not an high availability solution.

Additional information

See also this forum post for more information: https://community.keydb.dev/t/active-replica-loading-redis-is-loading-the-dataset-in-memory-on-full-sync/137

teyeheimans avatar Sep 20 '21 08:09 teyeheimans