简体   繁体   中英

Microservices Communication Design

I would like to know how to create a communication for each services. I am using API Gateway for the outside of the system to communicate with the services within. Is it necessary for a service to call another service through API Gateway or just directly into the service itself ?

Thank You

You can design your communications strategies in many ways. Obviously you can use your API Gateway to do this (I assume that you are using this pattern ) but this isn't a good idea because to begin it is not a good use of the pattern and for other hand many people think that the use of apirests should never be used to inter-communication of mservices. One a best approach to make this instead is base the communications on asynchronous message-passing, to do this you can use Publish–subscribe pattern , but always you can take a look to Event Pattern very used too.

This is a simple list of some articles that maybe could help you, take a look:

Is a lot of info if you don't have previous experience in this issues but with a bit of researching you will find soon a good strategy to use in you project.

内部服务与服务之间的通信不需要Api网关,但是,您需要服务注册表或某种动态负载平衡机制才能访问服务

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM