Health checks
Decide when a Plexivo App Runner instance receives traffic, and let Plexivo restart one that stops answering, with an HTTP path or a port check.
A health check tells Plexivo App Runner when an instance is ready. Traffic goes only to instances that pass it, so deploys, restarts and scale-outs never send visitors to an app that is still starting.
Two kinds of check#
| Check | Healthy when | Restarts a running instance that stops answering |
|---|---|---|
| Port (the default) | The app’s port accepts connections. | No |
| HTTP path | GET on the path answers with a 2xx or 3xx status within 2 seconds. | Yes, after a minute. |
Use an HTTP path for anything that serves HTTP. It catches an app that is running but stuck.
Set an HTTP health check#
- Open the app’s Settings tab. In Health check, enter the HTTP path, for example
/healthz. Leave it empty to go back to the port check. - Apply. Choose Apply changes. Plexivo restarts the instances one at a time, and each new one gets traffic once the check answers.
A path starts with /, has no spaces and is at most 256 characters.
bash
curl -s -X PUT $API/deployments/$APP/health-check \
-H "Authorization: Bearer $PLEXIVO_TOKEN" \
-H "Content-Type: application/json" \
-d '{"path": "/healthz"}'
# {"health_check": {"path": "/healthz", "kind": "http"}}Send {"path": null} to return to the port check.
Timing#
- Plexivo checks every second.
- A new instance has up to 5 minutes to pass its first check before it is restarted.
- An instance that fails for 6 seconds stops receiving traffic until it answers again.
- With an HTTP path, an instance that has not answered for a minute is restarted.
A good health endpoint#
- Answers fast, with
200, and does no heavy work. - Checks what the app cannot serve without, such as its database connection, but not other services that have their own checks.
- Needs no sign-in.
javascript
app.get('/healthz', (req, res) => res.status(200).send('ok'));Next steps#
Updated 27 October 2026