Service Discovery

Convox makes it easy to build microservice architectures by enabling easy communication between services and applications.

If you would like to make a service accessible only to other services on the same Rack, see Internal Services.

Between Services in the Same App

You can link services in the same app using the links section of convox.yml.


    port: 3000
      - web

This would set an WEB_URL environment variable on the worker service pointing at the load balancer for the web service.

Between Apps on the Same Rack

Convox sets up internal DNS on a Rack such that the following hostname format will resolve to a specific service:


The Rack’s name is available as the environment variable RACK.


$ curl https://api.auth.$RACK.convox

This hostname would resolve to the load balancer of the api service of the auth app on the current Rack.

Between Apps on Different Racks

Use convox services to find the load balancer hostname of a given service and set an environment variable with the resulting hostname.


$ convox services -a auth -r acme/utility
SERVICE  DOMAIN                                 PORTS
api  80:3000 443:3000

$ convox env set AUTH_URL= -a frontend -r acme/production

This would set an AUTH_URL environment variable on the frontend app on the acme/production Rack to point at the load balancer for the api service on the auth app on the acme/utility Rack.