knative/eventing

Proposal: Loop Detection

Cali0707 opened this issue · 1 comments

Problem
It is easy to accidentally create loops/cycles in an eventing system which can lead to events going in a cycle for a long time and consuming lots of resources. However, there are also many valid use cases for creating a cycle so we should not always disallow them.

This proposal is to:

  1. Add a feature flag to automatically reject resources that would complete a cycle
  2. Add a label which can be added to resources to allow for the cycle to be made anyways
  3. Emit an event from every resource involved in a cycle (to notify users that they have a cycle there).

A proposal doc is here: https://docs.google.com/document/d/1V_DiONSL9iV4iyRtzLFvAQfrtDEyi0ebkM5cvrY5gzY/edit?usp=sharing

Persona:
Administrators, developers

Exit Criteria
TODO

Time Estimate (optional):
5-10 days

Additional context (optional)
AWS Lambda added something similar here: https://aws.amazon.com/blogs/compute/aws-lambda-introduces-recursive-loop-detection-apis/

/triage needs-wg-discussion