A Kubernetes novice here.
I have a simple client/server web application for video conversion:
- The frontend uploads a video via HTTP POST, receives a response with a status check URL
- The backend starts converting the video in the background
- The frontend repeatedly polls the status check URL it received.
- When finished, the frontend downloads the converted video from the URL returned by the status check
Now I want to move the backend into a Kubernetes cluster and am stuck. Obviously, status check and video download requests must go to the same pod as the one that received the original video conversion request, because only that pod has the video data and the background task that converts it. How do I achieve that?
"Back in the day" you used sticky sessions for that, but I understand sticky sessions are a big no-no for modern cloud computing.
Pushing the converted video into a database or a message queue so that it would be available to all pods sounds like horrible overhead.
Is there a nice solution/design pattern for starting a long running backend task in a pod and later retrieving (pulling) its result from the same pod?
The backend is in Spring Boot in case it matters.