|
|
|
|
|
by umbrant
1672 days ago
|
|
One idea to avoid keeping all the flag tokens in memory is to populate them dynamically based on information known at request time. For instance, if the request is scoped to a user and application, we can fetch the flag tokens related to that user and application in request handler middleware. Slap an LRU cache on it, and the performance is pretty good. This doesn't work as well if feature flags need to target based on tokens that aren't known at request time, since you can't always asynchronously fetch additional flag tokens from a synchronous context. But, you can provide a separate async API for these situations. |
|