Skip to content

Commit 3880341

Browse files
authored
Merge pull request #197617 from craigshoemaker/patch-3
[Container Apps] Update Health probes
2 parents 007af7e + e5c7939 commit 3880341

File tree

1 file changed

+36
-4
lines changed

1 file changed

+36
-4
lines changed

articles/container-apps/health-probes.md

Lines changed: 36 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,44 @@ Health probes in Azure Container Apps are based on [Kubernetes health probes](ht
1515

1616
Container Apps support the following probes:
1717

18-
- [Liveness](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#define-a-liveness-command): Reports the overall health of your replica.
19-
- [Startup](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#define-startup-probes): Delay reporting on a liveness or readiness state for slower apps with a startup probe.
20-
- [Readiness](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#define-readiness-probes): Signals that a replica is ready to accept traffic.
18+
- **Liveness**: Reports the overall health of your replica.
19+
- **Readiness**: Signals that a replica is ready to accept traffic.
20+
- **Startup**: Delay reporting on a liveness or readiness state for slower apps with a startup probe.
21+
2122

2223
For a full listing of the specification supported in Azure Container Apps, refer to [Azure REST API specs](https://github.com/Azure/azure-rest-api-specs/blob/main/specification/app/resource-manager/Microsoft.App/stable/2022-03-01/CommonDefinitions.json#L119-L236).
2324

25+
## Default configuration
26+
27+
Container Apps offers default probe settings if no probes are defined. If your app takes an extended amount of time to start, which is very common in Java, you often need to customize the probes so your container won't crash.
28+
29+
The following example demonstrates how to extend the liveness and readiness probes to accommodate an extended start-up process.
30+
31+
```json
32+
"probes": [
33+
{
34+
"type": "liveness",
35+
"failureThreshold": 3,
36+
"periodSeconds": 10,
37+
"successThreshold": 1,
38+
"tcpSocket": {
39+
"port": 80
40+
},
41+
"timeoutSeconds": 1
42+
},
43+
{
44+
"type": "readiness",
45+
"failureThreshold": 48,
46+
"initialDelaySeconds": 3,
47+
"periodSeconds": 5,
48+
"successThreshold": 1,
49+
"tcpSocket": {
50+
"port": 80
51+
},
52+
"timeoutSeconds": 5
53+
}
54+
```
55+
2456
## HTTP probes
2557

2658
HTTP probes allow you to implement custom logic to check the status of application dependencies before reporting a healthy status. Configure your health probe endpoints to respond with an HTTP status code greater than or equal to `200` and less than `400` to indicate success. Any other response code outside this range indicates a failure.
@@ -152,7 +184,7 @@ containers:
152184

153185
---
154186

155-
The optional [failureThreshold](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes) setting defines the number of attempts Kubernetes tries if the probe if execution fails. Attempts that exceed the `failureThreshold` amount cause different results for each probe. Refer to [Configure Liveness, Readiness and Startup Probes](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes) for details.
187+
The optional `failureThreshold` setting defines the number of attempts Container Apps tries if the probe if execution fails. Attempts that exceed the `failureThreshold` amount cause different results for each probe.
156188

157189
## Next steps
158190

0 commit comments

Comments
 (0)