0
0
Microservicessystem_design~20 mins

Service decomposition strategies in Microservices - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Service Decomposition Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Identifying the primary principle of domain-driven design (DDD) in service decomposition
Which of the following best describes the main idea behind using domain-driven design (DDD) for decomposing microservices?
ADecompose services based on technical layers like UI, business logic, and database
BCreate one service per database table to simplify data access
CSplit services according to business capabilities and bounded contexts
DGroup all functionalities into a single service to reduce communication overhead
Attempts:
2 left
💡 Hint
Think about how business domains guide service boundaries.
Architecture
intermediate
2:00remaining
Choosing the best decomposition strategy for a retail platform
A retail platform wants to decompose its monolith into microservices. Which decomposition strategy would best isolate the payment processing functionality?
ADecompose by technical layers: UI service, payment service, and database service
BDecompose by business capabilities: separate payment service from order and inventory services
CDecompose by database tables: one service per table including payment table service
DDecompose by user roles: one service for customers, one for admins, one for payment
Attempts:
2 left
💡 Hint
Consider which approach isolates business functions clearly.
scaling
advanced
2:00remaining
Scaling challenges with database-per-service pattern
What is a common scaling challenge when using the database-per-service pattern in microservices?
AData consistency becomes difficult due to distributed transactions across multiple databases
BAll services must use the same database technology, limiting flexibility
CServices cannot scale independently because they share a single database
DScaling is automatic and requires no additional design considerations
Attempts:
2 left
💡 Hint
Think about how data consistency is managed across services.
tradeoff
advanced
2:00remaining
Tradeoff of fine-grained vs coarse-grained service decomposition
What is a key tradeoff when choosing fine-grained service decomposition over coarse-grained in microservices?
AFine-grained services increase the number of network calls and operational overhead
BFine-grained services reduce network calls but increase code complexity
CCoarse-grained services always improve fault isolation compared to fine-grained
DCoarse-grained services eliminate the need for service discovery mechanisms
Attempts:
2 left
💡 Hint
Consider how service size affects communication and management.
estimation
expert
2:00remaining
Estimating service count from bounded contexts
A system has 5 bounded contexts identified by domain experts. Each bounded context is expected to be decomposed into 3 microservices on average. What is the estimated total number of microservices after decomposition?
A5
B8
C20
D15
Attempts:
2 left
💡 Hint
Multiply the number of bounded contexts by the average services per context.