0
0
Microservicessystem_design~20 mins

Feature flags in Microservices - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Feature Flags Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
1:30remaining
What is the primary benefit of using feature flags in microservices?

Feature flags allow teams to control features dynamically. Which of the following best describes their main benefit?

AThey enable turning features on or off without redeploying services.
BThey automatically fix bugs in deployed microservices.
CThey replace the need for version control systems.
DThey increase the size of the microservice codebase significantly.
Attempts:
2 left
💡 Hint

Think about how feature flags help with deployment flexibility.

Architecture
intermediate
1:30remaining
Which component is essential for managing feature flags centrally in a microservices architecture?

In a microservices system using feature flags, which component should hold the flag configurations to ensure consistency?

AA database that only the frontend accesses for feature flags.
BEach microservice stores its own feature flags locally without coordination.
CFeature flags embedded directly in the client-side code only.
DA centralized feature flag service accessible by all microservices.
Attempts:
2 left
💡 Hint

Consider how to keep feature flag states consistent across services.

scaling
advanced
2:00remaining
How to design a feature flag system that scales to thousands of microservices with minimal latency?

You need a feature flag system for thousands of microservices worldwide. Which design choice best supports low latency and scalability?

AEmbed feature flags in static config files updated monthly.
BUse a distributed cache with local caching in each microservice and periodic refresh.
CStore feature flags only in a single central server without caching.
DMake each microservice query the central database for flags on every request.
Attempts:
2 left
💡 Hint

Think about reducing network calls and load on central systems.

tradeoff
advanced
2:00remaining
What is a key tradeoff when using feature flags for rapid deployment in microservices?

Feature flags enable quick feature toggling but introduce complexity. What is a major tradeoff to consider?

AAutomatic scaling of microservices without configuration.
BComplete elimination of bugs in production code.
CIncreased code complexity and risk of stale flags causing unexpected behavior.
DReduced need for testing before deployment.
Attempts:
2 left
💡 Hint

Think about what happens if flags are not cleaned up or managed well.

estimation
expert
2:30remaining
Estimate the storage needed for feature flags in a microservices system with 5000 services and 100 flags each.

Each feature flag state is stored as a boolean (1 byte). Estimate the total storage in megabytes needed to store all flags for all services.

AApproximately 0.5 MB
BApproximately 5 MB
CApproximately 500 MB
DApproximately 50 MB
Attempts:
2 left
💡 Hint

Calculate total flags and convert bytes to megabytes (1 MB = 1,048,576 bytes).