You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/container-apps/health-probes.md
+36-4Lines changed: 36 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,12 +15,44 @@ Health probes in Azure Container Apps are based on [Kubernetes health probes](ht
15
15
16
16
Container Apps support the following probes:
17
17
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
+
21
22
22
23
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).
23
24
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
+
24
56
## HTTP probes
25
57
26
58
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:
152
184
153
185
---
154
186
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.
0 commit comments