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

ioredis vs node-redis #2658

Open
chasemcdo opened this issue Nov 22, 2023 · 5 comments
Open

ioredis vs node-redis #2658

chasemcdo opened this issue Nov 22, 2023 · 5 comments

Comments

@chasemcdo
Copy link

Description

I've been working with Redis for a couple projects, more specifically with Redis Sentinel.
I had originally been using the this package, but found it was lacking support for Sentinel. As such we migrated to ioredis in search of this support.

I am wondering why both packages exist and if there is any documentation on how someone might decide between the two if they are both supported?

@chayim
Copy link
Contributor

chayim commented Nov 23, 2023

@chasemcdo We're actually in progress, adding Sentinel support to node-redis right now. We recommend node-redis, as it's on track for being the most full fledged client for nodejs, including support for new Redis capabilities like JSON, Search, and others. Similarly, RESP3 support is almost ready as well.

@chasemcdo
Copy link
Author

chasemcdo commented Nov 23, 2023

@chasemcdo We're actually in progress, adding Sentinel support to node-redis right now. We recommend node-redis, as it's on track for being the most full fledged client for nodejs, including support for new Redis capabilities like JSON, Search, and others. Similarly, RESP3 support is almost ready as well.

@chayim does that mean ioredis will be deprecated soon? My main confusion is in why they both exist and seem to be supported. The ioredis docs contain migration guides to go from node-redis to ioredis which imply that ioredis might be the way to go.

Is Sentinel Support something that’ll be coming soon or not for a while given the issue for it was opened back in 2012 #302 ?

@sfxdoluwasegun
Copy link

@chasemcdo Would be helpful if a tentative timeframe for release is shared, would help us better manage our anticipation.
Thanks for the good work!

@stondini
Copy link

stondini commented Jan 11, 2024

Hello,

Choosing the correct NodeJS Redis library is not obvious as:

@chasemcdo's question about ioredis deprecation is relevant.

@ehaynes99
Copy link

To answer the "why both exist" question, ioredis was created as an alternative client 9 years ago by an individual: https://github.com/luin

According to his profile page:

I created ioredis, one of the most popular clients for Redis. It was acquired by Redis Ltd. in 2023.

On Jun 15, 2023, this commit was added that changed the links to reflect the new owner: redis/ioredis@9c17550

So at this point, it looks weird that both are owned by https://github.com/redis and both "supported". However, since then, only one commit has been made to remove sponsor links and such from the README, so it's effectively unmaintained now.

For a long time, it had more functionality than this library (including sentinel support). However, over time there was an increasing amount of functionality with no direct support, and those had to be hand-rolled using raw commands. e.g. JSON commands. This is especially painful with TypeScript, and I've seen/worked on custom wrappers for this in multiple projects.

This project is now a monorepo that's written in TypeScript and includes direct support for more of the modern features: https://github.com/redis/node-redis/tree/master/packages

I'm not involved with either project, just a long time user, so I can only speculate as to the deprecation strategy, but once this supports sentinel (sounds like soon: #302 (comment)), I don't know of any other reason to continue using it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants