4 ms·
A more useful thing to talk about could be tips and pitfalls of feature flags. - Minimize accessing databases or external services to check a feature flag beca
by Manfred 3y ago
A more useful thing to talk about could be tips and pitfalls of feature flags.
- Minimize accessing databases or external services to check a feature flag because it adds up to response times and server load.
- Always try to query the feature flag on the top level of your stack (eg. the controller in Rails) to prevent querying it repeatedly while generating the response.
- Make sure changes in feature flags are applied across processes and threads simultaneously so the flag doesn't appear to flip/flop for the user (eg. tkae rolling restarts during deploy into account).
- Use the dumbest solution possible for your use-case (eg. Rails.application.config.x.features.dark_mode_enabled = false).
- Remove feature flags as soon as they are no longer used or necessary to prevent confusion and unnecessary maintenance workload.