I have an Ray Serve application utilizing FastAPI Background task. When running the application locally, when interrupted by ctrl + c
the script gracefully waiting for the fastapi background task to finish before terminating the application.
However, I’m not seeing the same effect when deploying Ray Serve using KubeRay and RayService. During rolling upgrade, the old cluster (and old application) got terminated without waiting for the background task to finish.
I wonder if this is expected and is there any config for this kind of operation. We want to use FastAPI background task for our important business logic. Thank you in advance.