0
votes

Is it possible to build one master (port 6378) + two slave (read only port: 6379, 6380) "cluster" on one machine and increase the performances (especially reading) and do not use any proxy? Can the site or code connect to master instance and read data from read-only nodes? Or if I use 3 instances of Redis I have to use proxy anyway?

Edit: Seems like slave nodes don't have any data, they try to redirect to master instance, but it is not correct way, am I right?

2
Why slave nodes can not answer data? Why it redirect to master node? (error) MOVED 9686 127.0.0.1:6378 - Дмитрий Горчаков
Please use the "edit" instead of a comment if you want to add something to your question. - neuront

2 Answers

0
votes

Definitely. You can code the paths in your app so writes and reads go to different servers. Depending on the programming language that you're using and the Redis client, this may be easier or harder to achieve.

Edit: that said, I'm unsure how you're running a cluster with a single master - the minimum should be 3.

0
votes

You need to send a READONLY command after connecting to the slave before you could execute any read commands.

A READONLY command only affects during the current socket session which means you need this command for every TCP connection.