A
A
Anton2018-03-11 06:59:56
Software design
Anton, 2018-03-11 06:59:56

Do you use internal nginx balancers to balance requests between microservices?

Good afternoon!
Do you use internal nginx balancers to balance requests between microservices?
What I mean:
internal balancers - servers with nginx that are not accessible from the Internet. External balancers can be used to process requests from other services
- servers with nginx that are accessible from the Internet. Can be used to process requests from other services and external clients.
5aa4b2434e997048993965.png
Or perhaps you are using another method?
If you need to distribute requests to different microservices - how do you do it?
Do I understand correctly that you can use Consul (either Consul DNS, or embedding information about Consul into the application)?
Regarding Kubernetes: besides the fact that the application needs to be translated into docker, how does the application find out the addresses of other microservices? The application should be rewritten with support for Service Discovery (we will consider the option that the application does not support Service Discovery)?
Pros and cons of different options
As I see pros and cons for nginx internal balancers option:
Pros
- easier to start for those who don't know about Consul DNS or Service Discovery
- easier to maintain for those who don't know about Consul DNS or Service Discovery
Cons
- OverHead ) network interactions, because traffic goes through the internal nginx balancer
- Long delay from the drop of the microservice to its withdrawal from the nginx config
- Either not outputting the downed microservice
As I see the pros and cons for the option with Consul DNS or Kubernetes:
Cons
- If the application does not support Service Discovery, then you need to add Consul DNS to each server
- it's harder to start for those who do not know about Consul DNS or Service Discovery
- harder to serve for those who don't know about Consul DNS or
Service
Discovery traffic does NOT go through nginx internal balancer
- Minimal delay from dropping a microservice to telling other microservices that it doesn't need to send requests
Thank you.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
C
chromimon, 2018-03-11
@chromimon

External Ingress, Traefik, HAProxy, nginx
What you call internal balancers, there are ready-made systems for this, for example, Kubernetes,
and there is service discovery, for example Consul
In the scheme with service discovery, balancing is done by the client, receiving from service discovery information about the available service.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question