-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Connection URL support for Cluster constructor #1794
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
base: main
Are you sure you want to change the base?
Conversation
@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 |
@luin just bumping this in hope it can be reviewed. If you need anything further from me please do let me know. |
Hi @steprescott, I'm sorry for the very late reply and I'm fully aware you might not be interested or able to work on the PR anymore, but I wanted to give an update anyway, for posterity. Thank you very much for your contribution 🙏 |
No problem. Thanks for the reply. |
thank you @elena-kolevska, Are there any time frames or places to find out more about the standardisation effort? I couldn't see anything on https://github.com/redis/redis-specifications We have a self-hosted option for our product that uses Redis so keen to align our implementation with any plans. |
Yeah, it's still WIP, but here's the current state: https://github.com/redis/redis-specifications/blob/master/uri/redis.txt |
Thank you! Are there any plans or discussions around standardising Redis Cluster and Sentinel urls as they aren't covered by the current state? For example:
Appreciate that discussions are on-going so it may change but any insight is useful! |
It would be really useful to have cluster and sentinel support in the URL standardisation, as well as multiple host support. @elena-kolevska we'd be happy to contribute to a standardisation effort, and provide a JS implementation supporting these things, or just provide feedback on the standardisation work towards this. |
@mortensi can you provide some info here? 🙏 |
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:
rediss://node-1,node-2
was given would you assume all connections are using tls?redis://node-1,node-2/1?key=value
should it copy all options over to all nodes?| 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