Private network
How services in the same environment reach each other, and who else can.
Give a service a private port
Under Networking, set Private port to Listen on a port and enter the port the service listens on. Templates have one already. A public service has a private address too.
The service is then reachable from the other services in the same environment, on its private address and the same port, over any TCP protocol: HTTP, PostgreSQL, Redis, gRPC and so on. Nothing outside the environment can reach it: not the internet, not other projects, not other environments.
Connect to it
Do not copy the address by hand. Reference it from the service that connects:
API_HOST=${{ api.RASEEF_PRIVATE_DOMAIN }}
API_PORT=${{ api.RASEEF_PRIVATE_PORT }}const res = await fetch(`http://${process.env.API_HOST}:${process.env.API_PORT}/orders`);Templates also offer a ready connection string, like ${{ db.DATABASE_URL }}. See Variables.
The service panel shows the private address under Private address, with Reachable while the service runs.
Traffic on the private network does not pass through the public gateway, so it has none of its limits or timeouts, and
it is plain TCP: use http://, not https://.
Calling your own public address
An app can also call another app's public raseef.run address or custom domain. That traffic goes through the gateway,
with its wider limits for traffic from inside Raseef. Prefer the private address between services in the same
environment.