I was reading the Cloud Foundry docs on Pushing Apps with Sidecar Processes.

Under Limitations, there was a point stating health-checks:

  • Sidecars only support PID-based health checks. HTTP health-checks for sidecars are not currently supported.

I am unable to understand the difference between PID-based and HTTP-based health-checks. As per my understanding HTTP-based health-checks would require HTTP calls against services to check their state. I have no idea how PID-based health checks would be carried out.


(Assuming that PID means process id here, I'm not familiar with Cloud Foundry.)

HTTP based checking of service processes within a container verifies that the process is running AND responds to requests.

PID based checking just tests whether a process with the same process id exists, but it cannot verify that the process is performing its designated tasks. The process could be stuck in an infinite loop or deadlock, preventing it from responding to requests.

I don't know which strategies are recommended in Cloud Foundry to deal with such processes. When I have similar situations in docker containers, I often run a separate internal health-check process within the container, and use some kind of heartbeat within the service process to signal that it's still alive. Of course, this depends on the specific application.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.