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: spec/src/main/asciidoc/java-api.adoc
+10-9Lines changed: 10 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -34,7 +34,7 @@ public interface HealthCheck {
34
34
35
35
Applications provide health check procedures (implementation of a `HealthCheck`), which will be used by the runtime hosting the application to verify the healthiness of the computing node.
36
36
37
-
== Different kind of Health Checks
37
+
== Different kinds of Health Checks
38
38
39
39
This specification provides different kind of health check procedures.
40
40
Difference between them is only semantic.
@@ -45,24 +45,25 @@ The nature of the procedure is defined by annotating the `HealthCheck` procedure
45
45
* Custom checks defined with `@Health` annotation
46
46
47
47
48
-
An `HealthCheck` procedures with none of the above annotations is not an active procedure and should be ignored.
48
+
A `HealthCheck` procedures with none of the above annotations is not an active procedure and should be ignored.
49
49
50
50
=== Readiness check
51
51
52
52
A Health Check for readiness allows third party services to know if the application is ready to process request or not.
53
53
54
-
The `@Readiness` annotation must be applied on an `HealthCheck` implementation to define a readiness check procedure.
54
+
The `@Readiness` annotation must be applied on a `HealthCheck` implementation to define a readiness check procedure.
55
55
56
56
=== Liveness check
57
57
58
-
A Health Check for liveness allows third party services to know if the application is alive and able to process request or not.
58
+
A Health Check for liveness allows third party services to determine if the application is running.
59
+
This means that if this procedure fails the application can be discarded (terminated, shutdown).
59
60
60
-
The `@Liveness` annotation must be applied on an `HealthCheck` implementation to define a Liveness check procedure.
61
+
The `@Liveness` annotation must be applied on a `HealthCheck` implementation to define a Liveness check procedure.
61
62
62
63
63
64
=== Custom check
64
65
65
-
To provide backward compatibility with previous specification version, an `HealthCheck` implementation with `@Health` annotation is still supported.
66
+
To provide backward compatibility with previous specification version, a `HealthCheck` implementation with `@Health` annotation is still supported.
66
67
67
68
Semantic of such a health check procedure is let to the implementor and therefor is defined as "custom".
68
69
@@ -92,9 +93,9 @@ public abstract class HealthCheckResponse {
92
93
The status of all `HealthCheck` 's determines the overall status for the given Health check kind.
93
94
94
95
95
-
== Combining multiple kind of checks
96
+
== Combining multiple kinds of checks
96
97
97
-
An `HealthCheck` implementation may be annotated with multiple kind of check.
98
+
A `HealthCheck` implementation may be annotated with multiple kinds of checks.
98
99
The procedure will be used to resolve every kind of health check for which it is annotated.
99
100
100
101
For instance this procedure will be used to resolve liveness and readiness health check.
@@ -161,7 +162,7 @@ public class MyCheck implements HealthCheck {
161
162
}
162
163
```
163
164
164
-
Health check procedures are CDI bean, therefore, they can also be defined with CDI producers:
165
+
Health check procedures are CDI beans, therefore, they can also be defined with CDI producers:
In this scenario health checks are used to determine if a computing node needs to be discarded (terminated, shutdown) and eventually replaced by another (healthy) instance.
29
29
30
-
The MP-HC architecture consists of two `/health/ready` and `/health/live` endpoints in a MicroProfile runtime that respectively represents the readiness and the liveness of the entire runtime.
30
+
The MP-HC architecture consists of two `/health/ready` and `/health/live` endpoints in a MicroProfile runtime that respectively represent the readiness and the liveness of the entire runtime.
31
31
For backward compatibility, a 3rd endpoint `/health` can also be used to provide a custom Health Check.
32
32
These endpoints are expected to be associated with a configurable context, such as a web application deployment, that can be configured with settings such as port, virtual-host, security, etc.
33
33
Further, the MP-HC defines the notion of a procedure that represents the health of a particular
34
34
subcomponent of an application.
35
35
36
36
In an application, there can be zero or more procedures bound to a given health endpoint.
37
-
The overall application health for a given endpoint is the logical AND of all of the procedure bound to it.
37
+
The overall application health for a given endpoint is the logical AND of all of the procedures bound to it.
38
38
39
39
The current version of the MP-HC specification does not define how the `/health/live` endpoint may be partitioned in the event
40
40
that the MicroProfile runtime supports deployment of multiple applications. If an implementation wishes to
41
-
support multiple applications within a MicroProfile runtime, the semantics of the `/health/live` and `/health/ready` endpoints are
41
+
support multiple applications within a MicroProfile runtime, the semantics of individual endpoints are
42
42
expected to be the logical AND of all the application in the runtime. The exact details of this are deferred to
0 commit comments