Design: Feature Flag Management System
Design the feature flag service, API, and integration approach with microservices. Out of scope: detailed UI design and specific microservice implementations.
Functional Requirements
Non-Functional Requirements
Jump into concepts and practice - no test required
+-------------------+ +-------------------+ +-------------------+
| | | | | |
| Management | | Feature Flag | | Microservices |
| Dashboard | <---> | Service API | <---> | (with SDKs) |
| (Web UI + API) | | | | |
+-------------------+ +-------------------+ +-------------------+
| | |
| | |
| v |
| +-------------------+ |
| | Flag Storage DB | |
| +-------------------+ |
| | |
| v |
| +-------------------+ |
| | Cache Layer | <-------------+
| +-------------------+ |
| | |
| v |
| +-------------------+ |
| | Audit Logging | |
| +-------------------+ |
+--------------------------------------------------------+feature flags in microservices?new_ui_enabled in a microservice?isEnabled returning true or false.if (featureFlags.isEnabled('beta_feature')) {
return 'Beta feature active';
} else {
return 'Beta feature inactive';
}
What will be the output if the flag beta_feature is set to false?beta_feature is enabled (true). If false, it goes to else branch.if (featureFlags.isEnabled('dark_mode')) {
disableDarkMode();
}
Why might this code not work as intended?