hashicorp / nomad

Nomad is an easy-to-use, flexible, and performant workload orchestrator that can deploy a mix of microservice, batch, containerized, and non-containerized applications. Nomad is easy to operate and scale and has native Consul and Vault integrations.
https://www.nomadproject.io/
Other
15k stars 1.96k forks source link

UNIX Domain Socket support added for connect in parallel to Consul UDS support in v1.10 #10705

Open jboero opened 3 years ago

jboero commented 3 years ago

Proposal

Consul 1.10 is releasing UDS support for services and Connect. Support has been included as of 1.10beta2 release. I've been experimenting with manually registering services like MySQL running on a UDS instead of TCP but this would clearly be useful in Nomad as well.

Consul has added the service option socket_path as alternative to port or ports. Ergo it would be a great paring with Consul if Nomad's service descriptor could support that.

Example:

service {
  name = "count-api"
  port = "9001"

  connect {
    sidecar_service {}
  }
}

service {
  name = "mysql"
  socket_path = "/run/mysqld.sock"

  connect {
    sidecar_service {}
  }
}
johnalotoski commented 3 years ago

This would be great to have.