You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 30, 2024. It is now read-only.
Repository navigation
This repository was archived by the owner on May 30, 2024. It is now read-only.
Stateless connection approach for feature flags #253
Hi team, I'm using LaunchDarkly for my projects, it's awesome. I have some questions about how the client connects to the server.
Why is the connection stateful? It adds complexities for using the sdk client. Is it possible to use stateless connection for reading feature flags from the server.
For a stateless connection approach, can I initialize the client just before I read a feature flag and then shut down the client right after I finish the reading?
If you haven't seen our docs page on client-side and server-side SDKs, that might help to clarify things. Like all of the server-side LaunchDarkly SDKs, the server-side Node SDK is designed mainly for use in a long-running application that will need to evaluate feature flags frequently for many different users. In such a context, it's highly desirable to not have to make a new network request just to evaluate one flag. Instead, the SDK downloads the full flag configuration data first and holds it internally, so that when you request flag values for various users, the flags can be evaluated entirely within the SDK. And since flag configurations can be changed at any time, it's also desirable to maintain a streaming connection so that changes can be pushed from LaunchDarkly to the SDK if and when they occur, rather than requiring lots of polling requests to find out if anything has changed.
I don't know the details of your use case, but if what I've said doesn't seem applicable, it might be that what you really want is the client-side Node SDK rather than the server-side one.
Activity
eli-darkly commentedon Jun 23, 2022
If you haven't seen our docs page on client-side and server-side SDKs, that might help to clarify things. Like all of the server-side LaunchDarkly SDKs, the server-side Node SDK is designed mainly for use in a long-running application that will need to evaluate feature flags frequently for many different users. In such a context, it's highly desirable to not have to make a new network request just to evaluate one flag. Instead, the SDK downloads the full flag configuration data first and holds it internally, so that when you request flag values for various users, the flags can be evaluated entirely within the SDK. And since flag configurations can be changed at any time, it's also desirable to maintain a streaming connection so that changes can be pushed from LaunchDarkly to the SDK if and when they occur, rather than requiring lots of polling requests to find out if anything has changed.
I don't know the details of your use case, but if what I've said doesn't seem applicable, it might be that what you really want is the client-side Node SDK rather than the server-side one.
milkchocolate commentedon Jun 24, 2022
Hi @eli-darkly, thanks for your reply 👍
Merge pull request #253 from launchdarkly/eb/sc-107301/remove-lockfile