Skip to content
This repository has been archived by the owner on May 30, 2024. It is now read-only.

Support Redis Cluster store via ioredis #122

Closed
seanxiesx opened this issue Sep 20, 2018 · 9 comments
Closed

Support Redis Cluster store via ioredis #122

seanxiesx opened this issue Sep 20, 2018 · 9 comments
Labels
enhancement Stale waiting for feedback Indicates LaunchDarkly is waiting for customer feedback before issue is closed due to staleness.

Comments

@seanxiesx
Copy link

https://github.com/luin/ioredis

@seanxiesx seanxiesx changed the title Support Redis cluster as a store via ioredis Support Redis Cluster store via ioredis Sep 20, 2018
@rmanalan
Copy link
Contributor

@eli-darkly I'm going to take a stab at swapping out redis with ioredis. We need this as well.

@eli-darkly
Copy link
Contributor

eli-darkly commented Nov 27, 2018

@rmanalan We hadn't had a chance to look into this yet, so I'd certainly be curious whether you run into any problems. Thanks.

@eli-darkly
Copy link
Contributor

@rmanalan By the way, as of v5.6.1 there is an optional new helper mechanism for building a feature store integration that makes things quite a bit simpler. You can take a look at https://github.com/launchdarkly/node-dynamodb-store for an example of how it can be used. In that example, it specifies the Node SDK as a peer dependency so it does actually require that v>=5.6.1 be present, but if you want to be more backward-compatible you could also just pull in the Node SDK code as a regular dependency so as to use the helper stuff from it.

@rmanalan
Copy link
Contributor

@eli-darkly I have a working version using ioredis, however, I need to make it generic so that it doesn't break existing users. Also, I introduced a lock mechanism so that in clustered multi-process environments, you only have one process that writes to redis at a time. This might eliminate the need to run ld-relay in large clustered environments. I'll work on a PR soon.

@eli-darkly
Copy link
Contributor

@rmanalan I'm not sure what you mean by "I need to make it generic"; could you clarify?

@rmanalan
Copy link
Contributor

@eli-darkly our service uses Electrolyte for DI. Redis in our env is defined as a component. So, my version of the redis feature store doesn't actually connect to redis... it just uses the already instantiated component. So, what I mean by making it generic is I need to make sure that you can either pass in an already instantiated redis client or the standard connection params that the original redisFeatureStore supports. I think this is a good addition anyway since in most environments devs might want to use an existing client.

@eli-darkly
Copy link
Contributor

@rmanalan Got it. Yes, we've generally taken that approach in our other SDKs, but I guess we didn't think of it in the Node one.

@kinyoklion
Copy link
Member

@seanxiesx

The new version of the SDK, v8, supports ioredis.

The new version has a new location and package.

The new version is located here: https://github.com/launchdarkly/js-core/tree/main/packages/sdk/server-node
It also has a new package name, @launchdarkly/node-server-sdk.

The redis package is also moved and renamed.

Github: https://github.com/launchdarkly/js-core/tree/main/packages/store/node-server-sdk-redis
Npm: https://www.npmjs.com/package/@launchdarkly/node-server-sdk-redis

Thank you,
Ryan

@kinyoklion kinyoklion added the waiting for feedback Indicates LaunchDarkly is waiting for customer feedback before issue is closed due to staleness. label Jun 29, 2023
@github-actions
Copy link

This issue is marked as stale because it has been open for 30 days without activity. Remove the stale label or comment, or this will be closed in 7 days.

@github-actions github-actions bot added the Stale label Jul 30, 2023
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Aug 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Stale waiting for feedback Indicates LaunchDarkly is waiting for customer feedback before issue is closed due to staleness.
Projects
None yet
Development

No branches or pull requests

5 participants