Microservices Architecture: Cross Service data sharing

后端 未结 4 949
醉酒成梦
醉酒成梦 2021-01-30 04:46

Consider the following micro services for an online store project:
Users Service keeps account data about the store\'s users (including first name, last name, email address,

4条回答
  •  情书的邮戳
    2021-01-30 04:52

    I usually use both approaches. Sometimes i have another service which is sitting on top on x other services and combines the data. I don't really like this approach because it is causing dependencies and coupling between services. So in general, within my last projects we tried to stick to polyglot persistence.

    Also think about, if you need to have x sub http requests for combining data in some kind of middleware service, it will lead you to higher latency. We always try to cut down the amount of requests for one task and handle everything what is possible through asynchronous queues. ( especially data sync )

提交回复
热议问题