Skip to content

Local evaluation in distributed environnment in .NET #203

Description

@tlabetup

Feature request

Is your feature request related to a problem?

Yes. We are using a .NET application deployed across 7 instances and would like to rely on PostHog’s feature flag system to control feature rollouts on a per-client basis. However, the .NET SDK does not currently provide an external cache provider. As a result, each instance maintains its own cache, which can lead to inconsistent feature flag states across instances for the same client.

Describe the solution you'd like

We would like to have an external/shared cache provider available for the .NET SDK (for example Redis or another distributed cache). This would allow all application instances to share the same feature flag state, ensuring consistency across instances and preventing any flickering issues for end users.

Ideally, this cache provider would be officially supported and configurable in a similar way to what is available in other SDKs.

Describe alternatives you've considered

We have considered:
• Implementing our own custom caching layer around feature flags, but this adds complexity and maintenance overhead.
• Avoiding server-side feature flags in .NET and handling feature toggles elsewhere, which defeats the purpose of using PostHog’s feature flag system.

Additional context

Our use case requires strict consistency of feature flag states per client across multiple instances. A shared cache provider for .NET would be essential for safely rolling out features client by client in a distributed environment.

Debug info

- [ ] PostHog Cloud, Debug information: [please copy/paste from https://us.posthog.com/settings/project-details#variables]
- [ ] PostHog Hobby self-hosted with `docker compose`, version/commit: [please provide]
- [ ] PostHog self-hosted with Kubernetes (deprecated, see [`Sunsetting Kubernetes support`](https://posthog.com/blog/sunsetting-helm-support-posthog)), version/commit: [please provide]

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions