How microservices implement federated queries

Under the microservice architecture, basic data such as user information and organization information are used in multiple systems. How to design the database? For example, we now have a core system to store agent information, and we need to develop an agent management subsystem, which will use both the agent's name and the agency to which it belongs. How to deal with the database design?

Ideas:
1. Design redundant fields in the agent subsystem database
Disadvantages: Consistency problem, once the main system changes the information, Subsystem synchronization update is complicated

2. Synchronize agent information to the subsystem
Disadvantages: This cannot achieve real-time synchronization, and requires regular data synchronization, which cannot solve the problem of query timeliness

3. Query in batches, call two services to query separately, and then assemble the data
Disadvantages: large amount of data and low efficiency

A similar problem for others
https://segmentfault.com/q/1010000009053767
https://www.v2ex.com /t/511384
https://cloud.tencent.com/developer/ask/61262
https://www.oschina.net/question/3533261_2282756
https://www.oschina.net/question/1418018_2186666/javascript:vote_answer(1154390,false,true)
Solution Thoughts
https://blog.csdn.net/zaige66/article/details/86541953
https://blog.csdn.net/li123128/article/details/88033122
mycat
https://blog.csdn.net/weixin_34351321/article/details/92387636

おすすめ

転載: blog.csdn.net/fujiakai/article/details/124274357