When application instance is to be stopped because of scale down request, what happens to the active requests being processed by this instance? How does cloud foundry handles it, so that the application instance is gracefully terminated.
The DEA will receive a request to stop instance. The DEA calls into warden telling it to stop the container. Warden will send a TERM signal once a second for 10 seconds, at which point it will send a KILL signal.