官术网_书友最值得收藏!

Data storing and sharing

Another problem is data storing and sharing. An effective microservice needs to be independent of other microservices, and ideally, should not share a database. What does this mean for our hotel booking app?

Again, that raises a lot of questions such as the following:

  • Do we use the same users' IDs across all databases, or do we have independent IDs in each service and keep it as a hidden implementation detail?
  • Once a user is added to the system, do we replicate some of her information in other services databases via strategies like data pumping, or is that overkill?
  • How do we deal with data removal?

These are hard questions to answer, and there are many different ways to solve those problems, as we'll learn throughout the book.

Avoiding data duplication as much as possible while keeping microservices in isolation is one of the biggest challenges in designing microservices-based applications.
主站蜘蛛池模板: 吉木萨尔县| 新兴县| 化隆| 慈溪市| 孝义市| 桐乡市| 新乡县| 达拉特旗| 达日县| 巫溪县| 油尖旺区| 临猗县| 界首市| 马龙县| 萨嘎县| 孝昌县| 石柱| 利川市| 鹿邑县| 宁德市| 鄱阳县| 勃利县| 河南省| 河津市| 宝坻区| 昌邑市| 轮台县| 甘南县| 都匀市| 马关县| 武川县| 乐业县| 九寨沟县| 安丘市| 兴国县| 大丰市| 西丰县| 井研县| 女性| 衢州市| 漠河县|