Skip to content

Adds ReadOnly mode for Standalone/Cluster mode#69

Merged
luin merged 2 commits into
redis:masterfrom
trademob:feature/readonly_standalone
Jun 11, 2015
Merged

Adds ReadOnly mode for Standalone/Cluster mode#69
luin merged 2 commits into
redis:masterfrom
trademob:feature/readonly_standalone

Conversation

@nakulgan
Copy link
Copy Markdown
Contributor

  • Cluster slots are now served with both Master and Slave instances.

The purpose is to use the client in a readonly mode to scale reads.

Each client individual issues a readonly once ready.
Each node in the cluster is connected to, maintaining a pool of Master nodes and SlaveNodes.

 - Cluster slots are now server with both Master and Slave instances

 - Fixes issue where slave node may be used for a write
@luin
Copy link
Copy Markdown
Collaborator

luin commented Jun 10, 2015

Awesome! I'll check it out ASAP.

Comment thread lib/redis.js Outdated
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since readOnly only works in cluster mode, we'd better only have it in cluster.js and listen to the ready event in the createNode method of cluster.js

@luin
Copy link
Copy Markdown
Collaborator

luin commented Jun 10, 2015

Just added some comments

@nakulgan
Copy link
Copy Markdown
Contributor Author

Cool, I agree on both of them. I'll update the PR with changes accordingly later today.

- Readonly is issued from cluster only and is removed from standalone client
luin added a commit that referenced this pull request Jun 11, 2015
Adds ReadOnly mode for Standalone/Cluster mode
@luin luin merged commit c06abec into redis:master Jun 11, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants