-
Notifications
You must be signed in to change notification settings - Fork 595
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Triggering long running background jobs when events occurs #7732
Comments
/assign |
@pierDipi as discussed in Kubecon -- This is my main use case, so I'd like to work on solving this issue. |
Thanks @fsedano feel free to go ahead, here is my PoC branch on my fork https://github.com/pierDipi/eventing/tree/jobsink |
/triage accepted |
Before working on this, I think we should fix an underlying issue being discussed here: Because of this, the premise "as it requires the HTTP connection to stay open as otherwise the service is scaled down " is not 100% true -- Keeping the HTTP open won't guarantee the pod is not killed. |
Yes, that's what the POC also does, it creates a job for each received event. A received event is mounted as a JSON file volume to each job |
@fsedano, Are you still actively working on this feature? If so, I'd like to know your timeframe. I see a lot of value in this feature and am trying to determine whether it is worth waiting for its release or writing a one-off job handler for a current use case. |
@mroberts91 before working on this I want to handle the regular UX described here: knative/serving#13075 (which is impacting my use case) Would that also help you? Or do you need the job route as discussed here? |
I've added JobSink in the PR here #7954 and it will be available in the next release |
Documentation PR: knative/docs#6005 @fsedano @mroberts91 it would be great if you can review the JobSink documentation PR as it can help us to get early feedback, thanks! |
@pierDipi @fsedano great work! Two questions I had:
|
Hi @milo157
This is interesting, would you mind opening an issue with more details? I'm not sure I fully follow what's your use case or where do you see the latency you've hinted at with
The way JobSink works in the first release is that there is a always-running jobsink dispatcher (in the knative-eventing namespace) receiving all requests for all jobsinks and then it creates a Job as soon as an event is received, so I don't expect very high latency
We just released the 1.15 release, which includes JobSink, we're currently working on the release notes and the annoucement but you can follow the regular installation instructions using the 1.15 artifacts to try it out in the meantime |
Hi @pierDipi Sure I can make a new issue however before I do that I just want to confirm the functionality is not available. The use case is you have a long running task that has a high initialisation time (think loading in python imports, a large GPU based model etc). In order to avoid the high initialisation times and get feedback from your long running task sooner, you want a pod ready and waiting that has already initialised ie: min_replica 1. Let me know if i need to clarify further? |
Problem
Usually event processing combined with a Knative Service is expected to complete in a relative short period of time (minutes) as it requires the HTTP connection to stay open as otherwise the service is scaled down and keeping long running connections open increases the possibility of failing and so the processing needs to restart as the request is retried.
This limitation is not ideal, therefore providing a resource (
JobSink
) which will trigger a long running job when an event occurs might be a good alternative vehicle.Example JobSink API:
Possible Client UX
We could provide
kn
client UX which would take a k8s job and turn it into a jobsink as creating a Job might be easier with existing IDE tooling:kn jobsink create --from-job-file=job.yaml -oyaml > jobsink.yaml
Persona:
Which persona is this feature for?
Developers
Exit Criteria
A measurable (binary) test that would indicate that the problem has been resolved.
Time Estimate (optional):
How many developer-days do you think this may take to resolve?
10
Additional context (optional)
Add any other context about the feature request here.
The text was updated successfully, but these errors were encountered: