Health Check Configuration
Health check regularly checks the status of containers or workloads. There is a liveness probe and a readiness probe:
- Liveness Probe: The system executes the probe to check if a container is still alive, and restarts the instance if the probe fails. Currently, the system probes a container by HTTP request or command and determines whether the container is alive based on the response from the container.
- Readiness Probe: The system invokes the probe to determine whether the instance is ready. If the instance is not ready, the system does not forward requests to the instance.
IEF can perform a health check by HTTP request or through a CLI.
HTTP Request-based Check
IEF periodically initiates an HTTP GET request to a container. If HTTP code 2xx or 3xx is received, the container is healthy.
For example, if health check parameters are set as shown in the following figure, IEF will send an HTTP GET request to http://{Instance's IP address}/healthz:8080 10 seconds after the container starts. If no response is received within 2 seconds, the health check fails. If status code 2xx or 3xx is received, the container is healthy.
You do not need to specify the host address. By default, the instance's IP address is used (that is, requests are sent to the container) unless you have special requirements.
CLI-based Check
The probe runs commands in the container and checks the command output. If the command output is 0, the container is healthy.
For example, if health check parameters are set as shown in the following figure, IEF will run cat /tmp/healthy 10 seconds after the container starts. If no response is received within 2 seconds, the health check fails. If the command output is 0, the container is healthy.
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