Skip to content

Commit c41fe0d

Browse files
committed
Clarify node renderer readiness probe guidance
1 parent 2ab91a0 commit c41fe0d

2 files changed

Lines changed: 10 additions & 8 deletions

File tree

docs/oss/building-features/node-renderer/health-checks.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ containers:
9494
port: 3800
9595
initialDelaySeconds: 10
9696
periodSeconds: 5
97-
failureThreshold: 6
97+
failureThreshold: 12 # tune to your cold-start time; 10 + (5 * 12) = 70 s total
9898
timeoutSeconds: 1
9999
# Readiness: shallow TCP check. Do NOT gate readiness on /ready unless you
100100
# also pre-warm the renderer — see "Gating traffic on /ready" below.
@@ -189,6 +189,9 @@ fail the task before the first render compiles a bundle:
189189
}
190190
```
191191

192+
Tune `startPeriod` to match the observed image pull, boot, and first-render latency for your app. Larger bundles or
193+
slower registries may need 60 seconds or more.
194+
192195
If you intentionally warm the renderer before `startPeriod` expires and want ECS to replace a task that cannot serve
193196
compiled bundles, change the path to `/ready`.
194197

@@ -204,11 +207,10 @@ services:
204207
build: .
205208
command: node renderer/node-renderer.js
206209
environment:
207-
RENDERER_HOST: '0.0.0.0'
208210
RENDERER_ENABLE_HEALTH_ENDPOINTS: 'true'
209211
healthcheck:
210212
test:
211-
['CMD', 'curl', '-sf', '--max-time', '2', '--http2-prior-knowledge', 'http://localhost:3800/ready']
213+
['CMD', 'curl', '-sf', '--max-time', '3', '--http2-prior-knowledge', 'http://localhost:3800/health']
212214
interval: 5s
213215
timeout: 3s
214216
retries: 5

docs/oss/building-features/node-renderer/js-configuration.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ available default ENV values if you wire them into your own launch script.
4848
Because these functions are valid client-side, they are ignored on server-side rendering without errors or warnings.
4949
Note that `performance` (exposed when `supportModules: true`) is the host's real `performance` object and is **not** stubbed by `stubTimers`; if rendered output embeds `performance.now()` values (e.g., dev-only timing annotations) they will vary between renders. Override via `additionalContext` (e.g., `{ performance: { now: () => 0 } }`) if strict SSR determinism is required.
5050
See also `supportModules`.
51-
1. **enableHealthEndpoints** - (default: `truthy(env.RENDERER_ENABLE_HEALTH_ENDPOINTS)`; disabled when unset) - If set to `true`, the renderer registers built-in, unauthenticated `GET /health` (liveness) and `GET /ready` (readiness) probe endpoints with status-only response bodies. See [Health and Readiness Endpoints](./health-checks.md) for semantics and working Kubernetes/ECS probe examples (the renderer's h2c listener cannot be probed with HTTP/1.1 `httpGet` probes).
51+
1. **enableHealthEndpoints** - (default: `false`; set `RENDERER_ENABLE_HEALTH_ENDPOINTS=true` to enable) - If set to `true`, the renderer registers built-in, unauthenticated `GET /health` (liveness) and `GET /ready` (readiness) probe endpoints with status-only response bodies. See [Health and Readiness Endpoints](./health-checks.md) for semantics and working Kubernetes/ECS probe examples (the renderer's h2c listener cannot be probed with HTTP/1.1 `httpGet` probes).
5252

5353
Deprecated options:
5454

@@ -425,10 +425,10 @@ Keep the three probe types distinct:
425425

426426
- **Startup** answers whether the renderer has finished booting. Separate it from readiness and liveness so slow startup
427427
does not cause premature restarts or block traffic.
428-
- **Readiness** answers whether the renderer should receive new render requests. Prefer the built-in `/ready` endpoint
429-
(see [Health and Readiness Endpoints](./health-checks.md), enabled with `enableHealthEndpoints`), or use a custom
430-
`/health` route from [Adding a Health Check Endpoint](#adding-a-health-check-endpoint), or the built-in `/info`
431-
endpoint for a shallow process check.
428+
- **Readiness** answers whether the renderer should receive new render requests. Use the built-in `/ready` endpoint
429+
only when an out-of-band warm-up render can compile a bundle before probe-gated traffic begins. Without that warm-up
430+
path, prefer a shallow TCP readiness check or the built-in `/info` endpoint, and use `/ready` for monitoring or
431+
post-deploy verification. See [Health and Readiness Endpoints](./health-checks.md) for the full cold-start semantics.
432432
- **Liveness** answers whether the renderer is stuck badly enough that restarting the container is safer. Prefer
433433
`tcpSocket` as the default so transient CPU or GC pauses do not restart an otherwise recoverable renderer; use an
434434
h2c-aware `exec` check only when you intentionally need stricter hung-process detection.

0 commit comments

Comments
 (0)