Documentation menu

Platform

Networking

Private service-to-service networking with .internal hostnames, public HTTP, public TCP proxies for databases and other protocols, and how traffic is routed.

Every project gets its own private network. Services in a project talk to each other privately; the internet reaches them only through the domains and TCP proxies you create.

Private networking

Inside a project, each service in each environment has a private hostname:

{serviceSlug}.{environmentName}.internal
text1 line

For example, an API can reach the project's PostgreSQL at postgres.production.internal:5432. The name resolves to the service's platform endpoint, a stable address in front of its ready replicas, not to an individual container. Scaling, deploys and restarts never change it.

Rules:

  • Private names are scoped to the project: other projects and other workspaces cannot resolve or reach them.
  • They are region-local: a service reaches the private name of a service in the same region.
  • The platform injects PARSLINKS_PRIVATE_DOMAIN into every container, so your code does not need to hard-code it.

Public HTTP

Public HTTP(S) traffic reaches a service through its domains (Domains & TLS):

Client → Cloudflare → Caddy (TLS) → edge origin (Host → route) → platform endpoint → ready replicas
text1 line
  • Your app must listen on 0.0.0.0 and on the port the domain targets.
  • Only replicas that pass the health check are in the endpoint's pool, so traffic never reaches a starting or failing replica.
  • During a rollout, old replicas leave the pool before they stop: in-flight requests finish.

Public TCP

Databases and other non-HTTP protocols (PostgreSQL, MySQL, Redis, MongoDB, AMQP, MQTT, game servers) can be exposed with a TCP proxy:

  1. Open the service's networking settings and enable Public TCP.
  2. Choose the container port to expose (the database's default port is prefilled).
  3. Apply. Parslinks allocates a port and shows the connection address:
{label}.proxy.{region}.{productionDomain}:{port}
text1 line

The port comes from a per-region pool (usually 30000–40000). Public TCP is a networking change, not a release: it applies without rebuilding your app.

For managed databases, the public address is also exposed as a variable such as DATABASE_PUBLIC_URL, REDIS_PUBLIC_URL or AMQP_PUBLIC_URL.

Region-sticky addresses

The TCP hostname contains the region because the port is published in that region. A volume-backed database exposes public TCP only in the region where its volume lives.

Ports

SettingWhereNotes
App port (HTTP)Domain target portEach domain stores the port it forwards to.
Health check portService settingsDefaults to the app port.
Public TCP portAllocated by ParslinksYou choose the container port; the public port comes from the pool.

Parslinks sets PORT for your process. Reading PORT from the environment is the most reliable way to listen on the right port.

Isolation

  • Each project has its own network; containers of different projects cannot reach each other.
  • Customer containers have no access to the Docker socket, the cluster manager or privileged mode.
  • Only the platform edge component joins project networks, and it forwards a hostname only to that instance's endpoint.

Troubleshooting

  • ECONNREFUSED to a sibling service: use the .internal hostname with the service's container port, and check that both are in the same environment and region.
  • Public TCP connects then drops: your client may need TLS settings matching the server; also confirm the database is listening on the port you exposed.
  • Public TCP address not resolving: public TCP must be enabled and applied, and the region must have public ingress configured.