Closed dschmidt closed 6 months ago
Personally I've used ioredis in other projects and have been very happy with it, but yea porting redis-emitter might be non trivial, so I'm not sure if this is something that will be prioritised any time soon.
Hehe ... well, see the patch - that's what I needed to make it work for me.
If we/you agree on an approach, I will send a PR... thinking about it again, I could have sent one from the beginning on 😁
I'm not against this change but I would be curious what the cons are of migrating. Is it breaking for custom providers? Is there functionality node-redis
has which ioredis
doesn't have?
Initial checklist
Problem
When I was talking to dev ops about companion deployment, they would have liked it to support redis sentinel natively, which apparently currently is not the case.
Solution
I'm no expert on this topic, but afaict ioredis has sophisticated support for this, while node-redis does not. When I saw
connect-redis
abstracts them away, I was thinking it would be super straightforward to switch fromnode-redis
toioredis
- it was until it wasn't :trollface:Porting
createClient
was easy,redis-emitter
not sooo much.I'm not sending a PR because switching libraries is usually rather controversial and I would like to discuss options first.
Have you considered switching to
ioredis
or are there reasons not to do it? Possibly a breaking change if someone is passing advanced options to the library...Alternatives
ioredis
completelyioredis
andnode-redis
simultaneouslyredis-connect
which is slightly outdated)Excerpt from my patch