* stub out docs * add docs app * remove unused gcp code for packr * handle toc ajax * use SEGMENT_TOKEN for segment * remove manual install directory * docs first pass * remove loggin docs for now * remove webhooks docs for now * tweak docs list to first pass intentions * fix header links and add gen2
2.4 KiB
Service Discovery
Load Balanced
The load balancer hostname for a particular Service can
be found using convox services.
Connecting to this hostname will distribute traffic across all processes of a given Service.
For an app named myapp with a convox.yml like this:
services:
auth:
port: 5000
web:
port: 3000
You would see a convox services output similar to this:
$ convox services
SERVICE DOMAIN PORTS
auth auth.myapp.0a1b2c3d4e5f.convox.cloud 443:5000
web web.myapp.0a1b2c3d4e5f.convox.cloud 443:3000
The web Service could reach the auth
Service using https://auth.myapp.0a1b2c3d4e5f.convox.cloud:443
Note that both of these Services are available to the public internet.
Internal Services
You can make a Service accessible only inside the Rack
by setting its internal attribute to true.
For an app named myapp with a convox.yml like this:
services:
auth:
internal: true
ports:
- 5000
web:
port: 3000
You would see a convox services output similar to this:
$ convox services
SERVICE DOMAIN PORTS
auth auth.myapp.convox.local 5000
web web.myapp.0a1b2c3d4e5f.convox.cloud 443:3000
The web Service could reach the auth Service using the following URL:
http://auth.myapp.convox.local:5000
Note that the internal port of the
authService is not receiving automatic SSL termination. If you want this connection to be encrypted you would need to handle SSL inside the Service.
DNS search suffixes are automatically configured for internal hostnames on a Rack. The following URLs would
also work for contacting the auth Service: