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

Stateless connection approach for feature flags #253

Closed

Description

@milkchocolate

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?
image

https://docs.launchdarkly.com/sdk/server-side/node-js#getting-started
Screenshot from the doc:
image

Activity

  1. eli-darkly commented on Jun 23, 2022

    @eli-darkly
    Contributor

    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.

  2. milkchocolate commented on Jun 24, 2022

    @milkchocolate
    Author

    Hi @eli-darkly, thanks for your reply 👍

  3. added a commit that references this issue on Sep 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions