Ingress Type Load Balancing?

Hi there, I’m trying to get setup so I can have various services, that if a node or task should fail, will fail over to the new task that will spin up in response to that failure.

ie: would always point to X service, regardless of a node or task failing.

I’m not sure how I should approach this. I’m currently working with a small cluster of nodes which have both Nomad and Consul installed on them.

Could you elaborate? Consul should take care of the service discovery for you.

If you have a service foo, then all other services can resolve it at foo.service.consul. Consul services are load balanced, so you can and should have multiple instances of foo.

1 Like

Ahh, I mean externally. For example, if I wanted to run a Salt master as a task in Nomad, I’d need an external endpoint for the minions to connect to. Or for example an Nginx server, or any other kind of server that would need to be accessed externally at one consistent location.

Couple options

  1. If the minions have consul installed, they can automatically connect to salt.service.consul
  2. If the minions don’t have consul installed, but they do have a shared dns server, you can install consul on your dns server, and then create a new zone for the .consul domain. That way any server in your network could automatically resolve salt.service.consul
  3. Fabio or Load balancer - You could point all the minions at a load balancer that has consul installed, or use fabio as a router.