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
**Why do some requests failed? Because as soon as the container is created, the traffic is sent to this new instance even if the application is not ready.**
146
+
**Why do some requests fail?**
147
+
Because as soon as the container is created, the traffic is sent to this new instance even if the application is not ready.
147
148
(The _Inventory Service_ takes a few seconds to start up).
148
149
150
+
TIP: This is a race condition based on that startup speed, sometimes this script wont fail, if that is the case scale the pods back to 1 instance and try again.
151
+
149
152
In order to prevent this behaviour, a **Readiness check** is needed. It determines if the container is ready to service requests.
150
153
If the readiness probe fails, the endpoints controller ensures the container has its IP address removed from the endpoints of all services.
151
154
A readiness probe can be used to signal to the endpoints controller that even though a container is running, it should not receive any traffic from a proxy.
@@ -160,7 +163,7 @@ Now lets go fix some of these problems.
160
163
== Configuring Liveness Probes
161
164
162
165
https://quarkus.io/guides/health-guide[SmallRye Health^] is a Quarkus extension which utilizes the MicroProfile Health specification.
163
-
It allows applications to provide information about their state to external viewers which is typically useful
166
+
It allows applications to provide information about their state to external viewers via an API call which is typically useful
164
167
in cloud environments where automated processes must be able to determine whether the application should be discarded or restarted.
165
168
166
169
Let's add the needed dependencies to **/projects/workshop/labs/inventory-quarkus/pom.xml**.
@@ -239,104 +242,19 @@ You should have the following output:
239
242
}
240
243
----
241
244
242
-
In the {OPENSHIFT_CONSOLE_URL}[OpenShift Web Console^, role='params-link'], under the Workloads menu,
243
-
`*click on 'Topology' -> '(D) inventory-coolstore' -> 'Add Health Checks'*`.
244
-
245
-
image::openshift-inventory-add-health-check.png[Che - Inventory Add Health Check, 700]
0 commit comments