Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connection URL support for Cluster constructor #1794

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

steprescott
Copy link

@steprescott steprescott commented Aug 10, 2023

Currently to pass multiple startup nodes it can only be done by passing them as separate items in the array.

This PR adds support to allow for multiple hosts to be configured if they appear in a URL string.

Discussion points

I've tried to be light touch and assume as little as possible but a few points to think over:

  • If a url of rediss://node-1,node-2 was given would you assume all connections are using tls?
  • If a url contained options redis://node-1,node-2/1?key=value should it copy all options over to all nodes?
  • Should we add | string to Cluster constructer to allow it to be created using a URL string. Redis.Cluster("redis://node-1")

At the moment it does none of these and just takes what is supplied and continues to keep all assumptions made by ioredis as I've only added a parsing check for commas and then separate them into their own startupNode.

Happy to discuss your thoughts on the approach.

Resolves #1519

@steprescott
Copy link
Author

@luin Sorry if this is not the right approach but do I need to tag you or someone else to start the review process? I wasn't sure after reading the contribution section of the README.md.

@steprescott
Copy link
Author

@luin just bumping this in hope it can be reviewed. If you need anything further from me please do let me know.

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.

Connection URL support for Cluster constructor
1 participant