launchdarkly / dotnet-server-sdk-redis

Redis integration for the LaunchDarkly SDK for Server-side .NET
Other
2 stars 3 forks source link

try a better cache implementation that coalesces requests #5

Closed eli-darkly closed 6 years ago

eli-darkly commented 6 years ago

See the second comment here for why I think this is important. Basically, multiple simultaneous requests for the same flag are a likely scenario in real applications and we should try to optimize for that, and avoid extra load on the Redis client. That's potentially a problem in all of the SDKs (except Java, which already has the desired cache behavior) but .NET seems particularly likely to get Redis timeouts.

I would still rather not try to roll my own implementation, as I've never tried to do this before and am going on very dim memories of a tutorial I read once. Alas, I've been unable to find a reference implementation so far. I hope I haven't done anything too obviously stupid.

eli-darkly commented 6 years ago

@arun251

I trust it's going to get some coverage via integration-harness and perhaps some race detector?

Integration tests, yes (although before I can test any of the Redis stuff in the Windows/AppHarbor instances, I'll need to get us some kind of Redis cloud subscription - it looks like it's not possible to run Redis on the AppHarbor hosts themselves).

Race detector is not a thing in .NET as far as I know.