Skip to content

Commit 6ce1b54

Browse files
committed
more clarifying examples and a compose example
1 parent 0ac722d commit 6ce1b54

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

custom-domain/dstack-ingress/DNS_PROVIDERS.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ For multi-node weighted routing, see [Weighted Routing with ALIAS_DOMAIN](#weigh
200200

201201
## Weighted Routing with ALIAS_DOMAIN (Route53)
202202

203-
This pattern lets you run multiple independent TEE nodes behind a single public domain using Route53 weighted routing. Each node manages its own Phala identity (TXT record, CNAME to gateway) while also being registered as a weighted target for the shared public domain.
203+
This pattern lets you run multiple independent TEE nodes behind a single public domain using Route53 weighted routing. Each node manages its own Phala identity (TXT record, CNAME to gateway) while also being registered as a weighted target for the shared public domain. Per-node domains also prevent hitting Let's Encrypt's duplicate-certificate rate limits that would occur if every node requested a cert for the same shared domain.
204204

205205
### DNS Record Layout
206206

@@ -210,6 +210,9 @@ Public domain (shared across nodes)
210210
app.example.com CNAME node1.app.example.com weight=100 id=node1.app.example.com
211211
app.example.com CNAME node2.app.example.com weight=0 id=node2.app.example.com ← new, dark
212212

213+
_dstack-app-address.app.example.com TXT <appid1>:443 ← one entry per node in pool,
214+
<appid2>:443 appended on each node boot
215+
213216
Per-node records (managed by each node's dstack-ingress)
214217
────────────────────────────────────────────────────────────────
215218
node1.app.example.com CNAME <appid1>.dstack-prod5.phala.network weight=100
@@ -279,6 +282,8 @@ volumes:
279282

280283
Node 2 (`node2.app.example.com`) uses identical config with `DOMAIN: node2.app.example.com`. On first boot it registers itself at weight 0. To promote it, update the record weight in Route53.
281284

285+
For a complete production-ready reference that includes a dynamic nginx upstream manager (automatically enrolling and unenrolling backend containers as they start and stop), see [`docker-compose.loadbalanced.yaml`](docker-compose.loadbalanced.yaml) in this repository.
286+
282287
### Important Notes
283288

284289
- The weight-0 CNAME for `ALIAS_DOMAIN` uses `DOMAIN` as the `SetIdentifier`, so each node has a stable, unique slot in the weighted record set that survives restarts without creating duplicates.

custom-domain/dstack-ingress/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ The node is fully provisioned and verified before receiving any user traffic. Tr
316316
| `ALIAS_DOMAIN` | No | Public-facing domain shared across nodes (e.g. `app.example.com`) |
317317
| `ROUTE53_INITIAL_WEIGHT` | No | Weight for this node's primary CNAME. When combined with `ALIAS_DOMAIN`, also triggers creation of the weight-0 CNAME for the public domain. |
318318
319-
See [DNS Provider Configuration](DNS_PROVIDERS.md#weighted-routing-with-alias_domain-route53) for a full example.
319+
For a complete production-ready reference that includes a dynamic nginx upstream manager (automatically enrolling and unenrolling backend containers as they start and stop), see [`docker-compose.loadbalanced.yaml`](docker-compose.loadbalanced.yaml) in this repository. For full DNS configuration details, see [DNS Provider Configuration](DNS_PROVIDERS.md#weighted-routing-with-alias_domain-route53).
320320
321321
## Domain Attestation and Verification
322322

0 commit comments

Comments
 (0)