Querying slave
I want to make master-slave replica, where master will manage new data inserts, and slave -- requests from site. I've start 2 servers, run at one of it command FOLLOW 127.0.0.1:9851> SET test test1 POINT 33 57
{"ok":true,"elapsed":"204.49335ms"}
127.0.0.1:9851> SCAN test
{"ok":true,"objects":[{"id":"test1","object":{"type":"Point","coordinates":[57,33]}}],"count":1,"cursor":0,"elapsed":"23.252424ms"}
127.0.0.1:9851>
slave server:
127.0.0.1:9851> SCAN test
(error) catching up to leader
127.0.0.1:9851> GET test test1
(error) catching up to leader
127.0.0.1:9851> info
(error) catching up to leader
127.0.0.1:9851>
You are not doing anything wrong.
catching up to leader means that the follower only has a partial dataset and is in the process of downloading the remaining data from the leader.
The solution is to wait a little longer and try again, or request the data from the leader.
The amount of time it takes to catch up depends on the size of the leader's dataset.