launchdarkly / node-server-sdk

LaunchDarkly Server-side SDK for Node
Other
79 stars 65 forks source link

How can i define limited feature keys with redis feature store to sync with redis. #168

Closed vgupta closed 4 years ago

vgupta commented 4 years ago

I have more than 1000 feature keys. some keys used by 1 microservice and some keys used by another microservice. Each microservice has their own redis database.

how can set limited feature keys to sync with redis feature store specific to microservice.

Example. I have feature keys key1, key2, key3 key4, key5. Microservice 1 is using key1, key2, key3 microservice 2 is using key4, key5.

Each microservice has own redis database. I want that only key1, kye2 and key3 are stored in redis of microservice 1 and key3,key 4 stored in redis of microservice 2.

eli-darkly commented 4 years ago

There's not currently a way to do that with the LaunchDarkly SDK for any platform (so this is not really a Node SDK issue), if you are keeping those unrelated feature flags within the same LaunchDarkly project. That is really what multiple projects are for. The SDKs always request all of the flags for a given project (since the SDK key is specific to a project and environment) at once, and store them all at once.

vgupta commented 4 years ago

Yes. In microservices architecture, many microservices can part of same project. I think, there should be a way to pass in configuration to tell either all keys or limited keys should fetch/sync. This will be a great feature.

eli-darkly commented 4 years ago

Just to be clear, this is not something we can implement in the Node SDK without changes to the entire LaunchDarkly platform. The LaunchDarkly service endpoints do not provide a way to receive only a subset of flags.

Could you clarify why you want to use the same project for multiple microservices? Is it that there is some overlap between the sets of flags used by the different services? In your example, there isn't— they seem to be completely separate.

vgupta commented 4 years ago

Some of flags are shared across multiple microservices but some are not. I am looking to sync only those flags are shared and specific flags to microservice with respective redis store.

eli-darkly commented 4 years ago

Have you considered using a single shared Redis database and having it be populated by a Relay Proxy instance, or is that not possible in your service architecture?

eli-darkly commented 4 years ago

Closing this due to lack of response, and because it's not a Node SDK issue.