Private service-to-service networking with caller allowlists and no VPC
Apps in the same account reach one another privately by name (`GREGALE_SERVICE_*_URL` and `.internal`) with zero VPC setup, while target caller allowlists, path scopes, deadlines and default-deny PR preview rules run at the proxy before waking targets.
Connect backend microservices privately by name—with auto-injected service URLs, caller allowlists, method and path scopes, and default-deny PR preview isolation—without configuring a VPC, subnet, or NAT gateway. On Gregale, apps in the same account reach each other directly over platform-managed private networking, enforced at the proxy before unpermitted callers can even wake a target microVM.
Why internal service networking is usually too complex or too open
On AWS or GCP, private service-to-service communication means provisioning VPC subnets, security groups, internal load balancers, and private DNS zones—plus custom IAM/mTLS checks if you want caller-level authorization. Conversely, many simple PaaS platforms either expose every internal service over the public internet or drop apps onto a flat internal network where any service or preview branch can call production billing endpoints.
Zero-config discovery paired with least-privilege caller scopes
Declare service dependencies with depends_on in Compose (compose.yaml or docker-compose.yml) or the project: block in gregale.yaml (and on POST /v1/apps for standalone apps):
x-gregale-service-policy: project
services:
public-api:
build: ./public-api
depends_on: [billing]
x-gregale-service-reliability:
billing:
timeout_ms: 1500
max_attempts: 2
min_remaining_ms: 200
retry_budget_percent: 10
billing:
build: ./billing
x-gregale-allow-callers: [public-api]
x-gregale-allow-call-scopes:
public-api:
methods: [GET, POST]
path_prefixes: [/v1/invoices, /v1/checkout]
Gregale validates the dependency graph before deploy and wires everything automatically:
- Auto-injected endpoints:
public-apireceivesGREGALE_SERVICE_BILLING_URLon port10081(http://billing.svc.gregale:10081), and bound services also resolve athttp://billing.internal:10081. - Project and declared policies: New project workloads default to
x-gregale-service-policy: project, blocking accidental cross-project calls with403;declaredrestricts callers strictly to names listed independs_on. - Target allowlists and path prefixes:
x-gregale-allow-callers(up to100slugs;[]denies all internal calls) andx-gregale-allow-call-scopesrestrict callers by normalized HTTP method and slash-delimited path prefix (/v1/invoicesallows/v1/invoices/42, not/v1/invoices-archive). Violations fail closed at the gateway before looking up or waking the target VM. - Built-in deadlines and transport retries:
x-gregale-service-reliabilityenforces end-to-end call budgets covering wake time, routing, and safe transport retries.
Private HTTPS and PR preview isolation
- Opt-in private HTTPS: Setting
x-gregale-service-transport: httpsinjectshttps://<service>.internalas the primary_URL, blocks plain HTTP downgrades at the proxy, and wiresGREGALE_SERVICE_CA_BUNDLE,NODE_EXTRA_CA_CERTS, andSSL_CERT_FILEcleanly in/tmpwithout mutating OS images (rolling out per account). - Default-deny PR preview isolation: Every project defaults to
preview_service_policy: deny, rejecting calls from PR previews to production services with403 preview_production_dependency_deniedbefore waking production. Even when explicitly opted in viaallow_marked, production targets can independently refuse previews (x-gregale-preview-calls: deny) or inspect platform-ownedX-Faas-Caller-Env: previewandX-Faas-Caller-Preview-Ofheaders. - Signed caller assertions (Preview): Where enabled, internal hops carry a 30-second
X-Faas-Caller-AssertionEdDSA JWT bindingsub(caller ID) andaud(target ID) so a downstream service cannot replay an assertion against another service.
When a full VPC or service mesh fits better
If your services must peer directly into an existing AWS VPC/RDS PrivateLink network without crossing the public internet, span multiple cloud regions with custom L3/L4 routing rules, or peer workloads across separate organizations, a traditional cloud VPC or Kubernetes service mesh fits better.
See Internal services, Service bindings, Multi-service apps, Preview environments, and Networking.
Questions
- Do I need a VPC or private DNS setup for internal service calls on Gregale?
No. Same-account apps reach one another privately on every plan via auto-injected
GREGALE_SERVICE_*_URLenvironment variables,*.svc.gregale:10081, and.internalaliases with no VPC or subnets to configure.- How do I stop other apps or PR previews from calling internal services?
Set
x-gregale-allow-callersandx-gregale-allow-call-scopeson target services to enforce allowed callers, HTTP methods and path prefixes before waking the target VM. PR previews also default topreview_service_policy: deny.- Can internal calls use HTTPS and signed caller identities?
Yes:
x-gregale-service-transport: httpsenableshttps://<service>.internalwith automatic CA bundles (rolling out per account), and signed 30-second EdDSAX-Faas-Caller-Assertionheaders are available in preview.