<p>What does  &quot;level-based&quot; and &quot;edge-based&quot; mean in general?</p>
<p>I read &quot;In other words, the system's behavior is level-based rather than edge-based&quot; from kubernetes documentation:
<a href="https://github.com/kubernetes/community/blob/a7de9ec822008a2e5bc1a3761f8fdbd248d38dff/contributors/devel/sig-architecture/api-conventions.md#objects" rel="nofollow noreferrer">https://github.com/kubernetes/community/blob/a7de9ec822008a2e5bc1a3761f8fdbd248d38dff/contributors/devel/sig-architecture/api-conventions.md#objects</a></p>
<p>with Google, I only find:
<a href="http://www.keil.com/forum/9423/edge-based-vs-level-based-interrupt/" rel="nofollow noreferrer">http://www.keil.com/forum/9423/edge-based-vs-level-based-interrupt/</a></p>
<p>Thank you.</p>

xiaoping yan
<p>It also has a more general definition (at least the way we tend to use it in the documentation). A piece of logic is "level based" if it only depends on the current state. A piece of logic is "edge-based" if it depends on history/transitions in addition to the current state.</p>

<p>"Level based" components are more resilient because if they crash, they can come back up and just look at the current state. "Edge-based" components must store the history they rely on (or depend on some other component that stores it), so that when they come back up they can look at the current state and the history. Also, if there is some kind of temporary network partition and an edge-based component misses some of the updates, then it will compute the wrong output.</p>

<p>However, "level based" components are usually less efficient, because they may need to scan a lot of state in order to compute an output, rather than just reading deltas.</p>

<p>Many components are a mixture of the two.</p>

<p>Simple example: You want to build a component that reports the number of pods in READY state. A level-based implementation would fetch all the pods from etcd (or the API server) and count. An edge-based implementation would do that once at startup, and then just watch for pods entering and exiting READY state.</p>
