eventing icon indicating copy to clipboard operation
eventing copied to clipboard

[Experimental] DeliverySpec Timeout

Open slinkydeveloper opened this issue 4 years ago • 17 comments

Description Sink services are usually very heterogeneous, each one with different response time characteristics, depending on their functionality, the way they're implemented, the guarantees the user wants. Because of that, timeouts of a request, when dispatching an event, may vary. DeliverySpec doesn't give the ability to the user to specify the timeout of the single request, so we usually just default to something like 10 seconds. This is not enough, and doesn't cover a lot of use cases where this parameter needs to be tuned.

This experimental feature proposed to add a new field to the DeliverySpec to define such timeout for each dispatched request.

Exit Criteria DeliverySpec allows to configure the timeout of the single request.

Experimental flag name: delivery-timeout

Experimental feature stages plan

Below the proposed plan for the feature stages (this list implicitly includes the requirements defined in the process)

  • Alpha: Included in 0.24
    • [x] Add in the API code the DeliverySpec.Timeout field https://github.com/knative/eventing/pull/5149
    • [x] Implement in kncloudevents module the handling of timeouts per-request https://github.com/knative/eventing/pull/5503
    • [x] Implement the glue code between the api field and kncloudevents module https://github.com/knative/eventing/pull/5507
    • [x] e2e test https://github.com/knative/eventing/pull/5507
    • [x] User documentation https://github.com/knative/docs/pull/3793
  • Beta graduation as soon as 1 release after the inception.
  • Beta:
    • [x] User documentation stabilization and improvements
    • [x] Add conformance tests https://github.com/knative/eventing/pull/5565
  • Stable graduation as 2 releases after the beta graduation
  • Stable:
    • [ ] Add the requirement to support DeliverySpec.Timeout to the knative/specs repo: https://github.com/knative/specs/pull/15#issuecomment-808024302

Affected WG

  • Event Delivery WG

Prior discussion

  • https://github.com/knative-sandbox/eventing-kafka-broker/issues/757

slinkydeveloper avatar Mar 25 '21 10:03 slinkydeveloper

/assign

slinkydeveloper avatar Mar 25 '21 10:03 slinkydeveloper

I think it is very reasonable to have some timeout notion configurable

/cc @lionelvillard

matzew avatar Mar 25 '21 10:03 matzew

Spec PR: https://github.com/knative/specs/pull/15 API PR: https://github.com/knative/eventing/pull/5149

After these get accepted, I'll proceed with implementing it in broker and channel.

slinkydeveloper avatar Mar 25 '21 16:03 slinkydeveloper

I believe this should be pushed to after we become v1.0 ready. It changes the spec of so many resources.

n3wscott avatar Mar 29 '21 18:03 n3wscott

As explained here https://github.com/knative/specs/pull/15#issuecomment-808024302, I think this is an important feature and we should do it before v1, and it's not a drastic change. It's trivial to implement for most components out there (at least the ones i know).

slinkydeveloper avatar Mar 30 '21 16:03 slinkydeveloper

And as I said here: it has long lasting effects: https://github.com/knative/specs/pull/15#discussion_r601651639

If this value changes in the core, then every CRD needs to be updated or they can not round trip with the timeout.

n3wscott avatar Apr 06 '21 14:04 n3wscott

This is not a problem, we can deal with it in the weeks prior to the next release, we've plenty of time for it.

We're also going to remove v1beta1 APIs #5201, so it's even less a problem.

slinkydeveloper avatar Apr 06 '21 15:04 slinkydeveloper

This is a very very real problem if v1 continues to be a sliding scale for anyone who has developed any component that exists outside the knative repos. We need to put a stop to the feature creep until we can cut a v1/GA version of Eventing.

n3wscott avatar Apr 06 '21 15:04 n3wscott

Refactored this issue as experimental feature, per proposal https://docs.google.com/document/d/1AoH0FyLeuHIg5snrlCKzELQv-NEA6bbjTU2Qv3zlW5k/edit?usp=sharing

slinkydeveloper avatar Apr 14 '21 10:04 slinkydeveloper

Hey, I have recently been looking at the option of configuring timeouts based on the workload to which the cloudevent is going. I have a knative service which takes a bit of time to do some processing to give back the response (basically file conversion use case). Currently I am just directly using the knative service URL to do the work - where we can set the maxTimeout period (in serving), but I am evaluating how it will fit in the eventing part. I believe without a configurable timeout option in channels, triggers, sources etc, the request will never actually happen successfully, so a feature like this would be really helpful!

Shashankft9 avatar Jun 21 '21 13:06 Shashankft9

Inclusion of this feature is approved! https://groups.google.com/g/knative-dev/c/7h1p0eBmUuo/m/lTzaSULKAQAJ

slinkydeveloper avatar Jun 22 '21 08:06 slinkydeveloper

This issue is stale because it has been open for 90 days with no activity. It will automatically close after 30 more days of inactivity. Reopen the issue with /reopen. Mark the issue as fresh by adding the comment /remove-lifecycle stale.

github-actions[bot] avatar Mar 03 '22 01:03 github-actions[bot]

/remove-lifecycle stale

pierDipi avatar Mar 03 '22 07:03 pierDipi

This issue is stale because it has been open for 90 days with no activity. It will automatically close after 30 more days of inactivity. Reopen the issue with /reopen. Mark the issue as fresh by adding the comment /remove-lifecycle stale.

github-actions[bot] avatar Jun 02 '22 01:06 github-actions[bot]

/assign

pierDipi avatar Aug 03 '22 16:08 pierDipi

Feature promoted to beta in 1.7, so enabled by default.

pierDipi avatar Aug 04 '22 17:08 pierDipi