Skip to content

Commit 37a086c

Browse files
authored
Merge pull request #112306 from ttorble/probes-codepackage
edit pass: probes-codepackage
2 parents 20b183f + bfb5db3 commit 37a086c

File tree

1 file changed

+43
-41
lines changed

1 file changed

+43
-41
lines changed

articles/service-fabric/probes-codepackage.md

Lines changed: 43 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,61 @@
11
---
22
title: Azure Service Fabric probes
3-
description: How to model Liveness Probe in Azure Service Fabric using application and service manifest files.
3+
description: How to model a liveness probe in Azure Service Fabric by using application and service manifest files.
44

55
ms.topic: conceptual
6+
author: tugup
7+
ms.author: tugup
68
ms.date: 3/12/2020
79
---
8-
# Liveness Probe
9-
Starting with 7.1 Service Fabric supports Liveness Probe mechanism for [containerized][containers-introduction-link] applications. Liveness Probe help announce the liveness of the containerized application and when they do not respond in a timely fashion, it will result in a restart.
10-
This article provides an overview of how to define a Liveness Probe via manifest files.
10+
# Liveness probe
11+
Starting with version 7.1, Azure Service Fabric supports a liveness probe mechanism for [containerized][containers-introduction-link] applications. A liveness probe helps to report the liveness of a containerized application, which will restart if it doesn't respond quickly.
12+
This article provides an overview of how to define a liveness probe by using manifest files.
1113

12-
Before proceeding with this article, we recommend getting familiar with the [Service Fabric application model][application-model-link] and the [Service Fabric hosting model][hosting-model-link].
14+
Before you proceed with this article, become familiar with the [Service Fabric application model][application-model-link] and the [Service Fabric hosting model][hosting-model-link].
1315

1416
> [!NOTE]
15-
> Liveness Probe is only supported for containers on NAT networking mode.
17+
> Liveness probe is supported only for containers in NAT networking mode.
1618
1719
## Semantics
18-
You can specify only 1 Liveness Probe per container and can control it's behavior with these fields:
20+
You can specify only one liveness probe per container and can control its behavior by using these fields:
1921

20-
* `initialDelaySeconds`: The initial delay in seconds to start executing probe once container has started. Supported value is int. Default is 0. Minimum is 0.
22+
* `initialDelaySeconds`: The initial delay in seconds to start executing the probe after the container has started. The supported value is **int**. The default is 0 and the minimum is 0.
2123

22-
* `timeoutSeconds`: Period in seconds after which we consider probe as failed if it hasn't completed successfully. Supported value is int. Default is 1. Minimum is 1.
24+
* `timeoutSeconds`: The period in seconds after which we consider the probe as failed, if it hasn't finished successfully. The supported value is **int**. The default is 1 and the minimum is 1.
2325

24-
* `periodSeconds`: Period in seconds to specify how often we probe. Supported value is int. Default is 10. Minimum is 1.
26+
* `periodSeconds`: The period in seconds to specify the frequency of the probe. The supported value is **int**. The default is 10 and the minimum is 1.
2527

26-
* `failureThreshold`: Once we hit FailureThreshold, container will restart. Supported value is int. Default is 3. Minimum is 1.
28+
* `failureThreshold`: When we hit this value, the container will restart. The supported value is **int**. The default is 3 and the minimum is 1.
2729

28-
* `successThreshold`: On failure, for probe to be considered success it has to execute successfully for SuccessThreshold. Supported value is int. Default is 1. Minimum is 1.
30+
* `successThreshold`: On failure, for the probe to be considered successful, it has to run successfully for this value. The supported value is **int**. The default is 1 and the minimum is 1.
2931

30-
There will be at most 1 probe to container at one moment of time. If the probe does not complete in **timeoutSeconds** we keep waiting and counting it towards the **failureThreshold**.
32+
There can be, at most, one probe to one container at any moment. If the probe doesn't finish in the time set in **timeoutSeconds**, wait and count the time toward the **failureThreshold**.
3133

32-
Additionally, ServiceFabric will raise following probe [Health Reports][health-introduction-link] on DeployedServicePackage:
34+
Additionally, Service Fabric will raise the following probe [health reports][health-introduction-link] on **DeployedServicePackage**:
3335

34-
* `Ok`: If the probe succeeds for **successThreshold** then we report health as Ok.
36+
* `OK`: The probe succeeds for the value set in **successThreshold**.
3537

36-
* `Error`: If the probe failureCount == **failureThreshold**, before restarting the container we report Error.
38+
* `Error`: The probe **failureCount** == **failureThreshold**, before the container restarts.
3739

3840
* `Warning`:
39-
1. If the probe fails and the failureCount < **failureThreshold** we report Warning. This health report stays until failureCount reaches **failureThreshold** or **successThreshold**.
40-
2. On success post failure, we still report Warning but with updated consecutive success.
41+
* The probe fails and **failureCount** < **failureThreshold**. This health report stays until **failureCount** reaches the value set in **failureThreshold** or **successThreshold**.
42+
* On success after failure, the warning remains but with updated consecutive successes.
4143

42-
## Specifying Liveness Probe
44+
## Specifying a liveness probe
4345

44-
You can specify probe in the ApplicationManifest.xml under ServiceManifestImport:
46+
You can specify a probe in the ApplicationManifest.xml file under **ServiceManifestImport**.
4547

46-
Probe can either one of :
48+
The probe can be for any of the following:
4749

48-
1. HTTP
49-
2. TCP
50-
3. Exec
50+
* HTTP
51+
* TCP
52+
* Exec
5153

52-
## HTTP Probe
54+
### HTTP probe
5355

54-
For HTTP probe, Service Fabric will send an HTTP request to the port and path specified. Return code greater than or equal to 200 and less than 400 indicates success.
56+
For an HTTP probe, Service Fabric will send an HTTP request to the port and path that you specify. A return code that is greater than or equal to 200, and less than 400, indicates success.
5557

56-
Here is an example of how to specify HttpGet probe:
58+
Here is an example of how to specify an HTTP probe:
5759

5860
```xml
5961
<ServiceManifestImport>
@@ -74,21 +76,21 @@ Here is an example of how to specify HttpGet probe:
7476
</ServiceManifestImport>
7577
```
7678

77-
HttpGet probe has additional properties you can set:
79+
The HTTP probe has additional properties that you can set:
7880

79-
* `path`: Path to access on the HTTP request.
81+
* `path`: The path to use in the HTTP request.
8082

81-
* `port`: Port to access for probes. Range is 1 to 65535. Mandatory.
83+
* `port`: The port to use for probes. This property is mandatory. The range is 1 to 65535.
8284

83-
* `scheme`: Scheme to use for connecting to code package. If set to HTTPS, certificate verification is skipped. Defaults to HTTP
85+
* `scheme`: The scheme to use for connecting to the code package. If this property is set to HTTPS, the certificate verification is skipped. The default setting is HTTP.
8486

85-
* `httpHeader`: Headers to set in the request. You can specify multiple of these.
87+
* `httpHeader`: The headers to set in the request. You can specify multiple headers.
8688

87-
* `host`: Host IP to connect to.
89+
* `host`: The host IP address to connect to.
8890

89-
## TCP Probe
91+
### TCP probe
9092

91-
For TCP probe, Service Fabric will try to open a socket on the container with the specified port. If it can establish a connection, the probe is considered success. Here is an example of how to specify probe which uses TCP socket:
93+
For a TCP probe, Service Fabric will try to open a socket on the container by using the specified port. If it can establish a connection, the probe is considered successful. Here's an example of how to specify a probe that uses a TCP socket:
9294

9395
```xml
9496
<ServiceManifestImport>
@@ -106,13 +108,13 @@ For TCP probe, Service Fabric will try to open a socket on the container with th
106108
</ServiceManifestImport>
107109
```
108110

109-
## Exec Probe
111+
### Exec probe
110112

111-
This probe will issue an exec into the container and wait for the command to complete.
113+
This probe will issue an **exec** command into the container and wait for the command to finish.
112114

113115
> [!NOTE]
114-
> Exec command takes a comma seperated string. The following command in the example will work for Linux container.
115-
> If you are trying windows container, use <Command>cmd</Command>
116+
> **Exec** command takes a comma separated string. The command in the following example will work for a Linux container.
117+
> If you're trying to probe a Windows container, use **cmd**.
116118
117119
```xml
118120
<ServiceManifestImport>
@@ -133,8 +135,8 @@ This probe will issue an exec into the container and wait for the command to com
133135
```
134136

135137
## Next steps
136-
See the following articles for related information.
137-
* [Service Fabric and containers.][containers-introduction-link]
138+
See the following article for related information:
139+
* [Service Fabric and containers][containers-introduction-link]
138140

139141
<!-- Links -->
140142
[containers-introduction-link]: service-fabric-containers-overview.md

0 commit comments

Comments
 (0)