Microservices offers a denouement . You must split the application into independent domains. Each domain can have a database. If other MSs require access to data belonging to some other microservices, they must communicate over the network.
If you feel that there are too many dependent services and there would be too many network calls, then you can define the domain by combining the dependent services.
For example, suppose I have an online test testing service in which a company manager can publish tests, and he can view the results of all employees in his department.
My Microservices for this scenario will be:
Initial design
- User Service: for login and user information.
- Testing Service: A service for evaluating tests.
- :
- : CRUD
- : CRUD
, , , , /API, . .
. mongoDB NoSql DB, .
, .