In PCF we can set up the health check invocation timeout to execute X seconds after the instance has been created.
But before that, let's understand the PCF Health Check Lifecycle.Stage 1: The application is deployed to PCF
Stage 2: When deploying the app, a health check type is specified and optionally a timeout. If a health check type is not specified, then the monitoring process defaults to a port health check
Stage 3: Cloud Controller stages, starts, and runs the application
Stage 4: Based on the type specified for the app, Cloud Controller configures a health check that runs periodically for each app instance
Stage 5: When Diego starts an app instance, the app health check runs every two seconds until a response indicates that the app instance is healthy or until the health check timeout elapses. The 2-seconds health check interval is not configurable
Stage 6: When an app instance becomes healthy, its route is advertised, if applicable. Subsequent health checks are run every 30 seconds once the app becomes healthy. The 30-second health interval is not configurable
Stage 7: If a previously healthy app instance fails a health check, Diego considers that particular instance to be unhealthy. As a result, Diego stops and deletes the app instance, then rescheduled a new app instance. This stoppage and deletion of the app instance are reported back to the Cloud Controller as a crash event.
Stage 8: When an app instance crashes, Diego immediately attempts to restart the app instance several times. After the failed restarts, CF waits 30 seconds before attempting another restart. The wait time doubles each restart until the ninth restart and remains at that duration until the 200th restart. After the 200th restart, CF stops trying to restart the app instance.
Setup the Health Check Invocation Timeout:
In PCF we can set up the health check invocation timeout to execute X seconds after the instance has been created. This can be done either through the application settings in PCF or by executing the sample command below.
Using CLI command
- Login to PCF using 'cf login' command
cf login [-a API_URL] [-u USERNAME] [-p PASSWORD] [-o ORG] [-s SPACE]
- Set the health check invocation timeout with the command below
cf v3-set-health-check [APPLICATION NAME] http --invocation-timeout [TIMEOUT IN SECONDS]
Using PCF Apps Manager
- Log in into PCF Apps Manager and select the application in the org and space
- Go to settings and adjust the invocation timeout in the health check section
a href="https://www.gevezeyeri.com/">Sohbet ve chat yapmanızı kolay ve güvenli hale getiren Sohbet odaları sorunsuz ve kesintisiz arkadaşlık ve yeni kişilerle tanışma imkanı sağlar.
ReplyDelete