Bird
0
0

What is the best way to fix this boundary issue?

medium📝 Conceptual Q14 of 15
Microservices - Migration from Monolith
A team notices that their UserService and NotificationService are tightly coupled because UserService calls NotificationService directly for every user update. What is the best way to fix this boundary issue?
AMake NotificationService call UserService instead
BMerge both services into one to avoid communication
CUse an event-driven approach where UserService emits events and NotificationService listens
DRemove NotificationService and handle notifications inside UserService
Step-by-Step Solution
Solution:
  1. Step 1: Understand tight coupling problem

    Direct calls create dependencies that reduce service independence.
  2. Step 2: Apply event-driven design

    Emitting events decouples services, allowing independent scaling and deployment.
  3. Final Answer:

    Use an event-driven approach where UserService emits events and NotificationService listens -> Option C
  4. Quick Check:

    Event-driven decoupling = C [OK]
Quick Trick: Use events to decouple services, not direct calls [OK]
Common Mistakes:
  • Merging services unnecessarily
  • Reversing call direction without decoupling
  • Ignoring decoupling benefits

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Microservices Quizzes