I have a design question about a microservice setup with service discovery using Consul.io (might be applicable to other service discovery tools).
(All services and web-nodes will be built using the .NET framework)
We're building a solution with 2 or more front-end nodes and a series of services at the backend. One of these services will be providing a product search to the front-end websites. We're thinking of using Consul.io for providing redundency for these services. The front-end will be using AngularJS to show the products using a REST endpoint to query. My question is what would be the better setup for this:
- each web node hosts its own product service which relays to an internal product service using a Consul.io lookup (health check etc)
- the frontend client connect directly to the product service.
In the second case I'm wondering how the client would connect to the backend service and how discovery works. Also, I'm wondering which of those two would be the better design choice. It seems to me that using the first option would bring overhead by doing two HTTP calls.
I'm looking forward to your thoughts.
Aucun commentaire:
Enregistrer un commentaire