0
0
Microservicessystem_design~20 mins

Feature toggles in Microservices - Practice Problems & Coding Challenges

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

Feature toggles are widely used in microservices architectures. What is their main purpose?

ATo increase the database storage capacity for microservices
BTo monitor network traffic between microservices
CTo manage user authentication and authorization
DTo enable or disable features dynamically without redeploying services
Attempts:
2 left
💡 Hint

Think about how feature toggles help developers control features during runtime.

Architecture
intermediate
1:30remaining
Which component is best suited to centrally manage feature toggles in a microservices system?

In a microservices architecture, where should feature toggle states be stored and managed for consistency?

AIn local files on each microservice's server
BIn a centralized configuration service accessible by all microservices
CHardcoded inside each microservice's source code
DOnly in the client application that consumes the microservices
Attempts:
2 left
💡 Hint

Consider how to keep toggle states consistent and easily changeable across many services.

scaling
advanced
2:00remaining
How to design feature toggles to minimize performance impact in a high-traffic microservices system?

You have many microservices receiving thousands of requests per second. How should feature toggles be designed to avoid slowing down the system?

ACache toggle states locally in each microservice with periodic refresh from central store
BQuery the central toggle store synchronously on every request
CStore toggles only in a database and query it directly for each request
DDisable feature toggles during peak traffic to improve speed
Attempts:
2 left
💡 Hint

Think about reducing network calls and latency for each request.

tradeoff
advanced
2:00remaining
What is a key tradeoff when using feature toggles for long-term code management?

Feature toggles help deploy features safely, but what is a common downside if toggles remain in code too long?

ACode complexity increases, making maintenance harder
BSystem automatically becomes slower over time
CFeature toggles cause database corruption
DToggles prevent any new features from being added
Attempts:
2 left
💡 Hint

Consider how many toggles affect code readability and testing.

estimation
expert
2:30remaining
Estimate the storage size needed for feature toggle states in a microservices system with 1000 toggles and 50 microservices.

Each toggle state is stored as a boolean flag per microservice. Assuming each boolean uses 1 byte, estimate the total storage size in kilobytes (KB) needed to store all toggle states centrally.

AApproximately 500 KB
BApproximately 1000 KB
CApproximately 50 KB
DApproximately 20 KB
Attempts:
2 left
💡 Hint

Calculate total bytes as toggles × microservices × bytes per toggle, then convert to KB (1 KB = 1024 bytes).