Cooperation Between Startup and Liveliness Probes
Prerequisites
- You have created an environment.
- You have created an application.
- You have created and deployed a component. In this example, use the demo-frontend component.
Procedure
- Log in to CAE. Choose Component Configurations.
- Select the target component from the drop-down list in the upper part of the page.
Figure 1 Selecting a component
- Configure the startup and liveliness probes by referring to Figure 2 and Figure 3, and make the configurations take effect. For details, see Configuring Health Check.
The startup probe will check an instance every 5 seconds, starting 10 seconds after instance creation. If the check fails for five consecutive times, the container will be restarted. After the startup probe detects that the instance is healthy, the liveliness probe starts detection to prevent the instance from keeping restarting due to slow program startup.
Ensure that the program can start within the following period: Latency + Check Interval x Failure Threshold. Otherwise, the startup probe will keep restarting the instance. If you are not sure about the program startup time, increase Failure Threshold and Latency.
As shown in Figure 3, the program needs to start within 35 seconds (10 + 5 x 5 = 35).
- Click Component Events. As shown on the page, the program starts after one startup probe detection failure. Then the liveliness probe is switched to and detects that the instance is healthy.
Figure 4 Viewing events
Figure 5 Startup probe detection
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot