Closed thangchung closed 8 years ago
It should be coordinate with the service discovery to get the registered services, then forward it to a correct one. And the Reactive should apply in this layer, and also need a circuit breaker in this layer as well.
Should not use current approach, we need to refactor. Ideas:
Reference link at https://www.asp.net/web-api/overview/advanced/calling-a-web-api-from-a-net-client
We need the protocol translation for calling to underneath service as well. We will support 2 protocols: REST and AMQP.
Problem: All requests have to hit into the API gateway, then it will dispatch them into the correct one service, based on the url, e.g. https://localhost:8080/magazine/api/categories then it should forward to http://localhost:5000/api/categories Solution: Have a look at http://josephwoodward.co.uk/2016/07/proxying-http-requests-asp-net-core-using-kestrel