Reputation: 609
Case 1 one to many:
Card and User are 2 different micro-services
For example Each Card entity contains 1 UserID.
Which one is the best?
Case 2 many to many: If I need to join many to many in 2 micro-services, what is the best practice?
Upvotes: 0
Views: 200
Reputation: 11
To answer your question in one line, the best practice is to avoid interdependencies between microservices.
Based on my experience I have listed below the options, which needs to be chosen based on the performance & fault tolerance that your system should meet
Your front end to call card api and then user api
Consider user service as a component - if your user service is always going to be consumed by another microservice, then this would be a better option
Upvotes: 1