Is there a way 2 jobs can communicate on nomad

Hi @saujanya01,

It is definitely possible for applications in multiple jobs to talk to each other. This is an example job, that talks to your WebSocket application using the Nomad Service Discovery option.

job "ws-client" {
  group "ws-client" {
    task "ws-client" {
      driver = "docker"

      config {
        image   = "curlimages/curl:7.87.0"
        command = "/bin/ash"
        args    = ["local/script.sh"]
      }

      template {
        data        = <<EOF
#!/usr/bin/env ash

while true; do
{{range nomadService "ws-test"}}
  curl -L -v http://{{.Address}}:{{.Port}}/
{{end}}
  sleep 3
done
EOF
        destination = "local/script.sh"
      }
    }
  }
}

I hope this helps!