Google Cloud Platform
Kubernetes: Edge vs. Level
Triggered Logic
Tim Hockin
Principal Software Engineer
@thockin
Slide 2
Slide 2 text
Google Cloud Platform
Once upon a time there was hardware
When the hardware needed attention, it would
signal the CPU == “interrupt”
Interrupts used be a literal wire from the device
to the CPU
Slide 3
Slide 3 text
Google Cloud Platform
Device CPU
interrupt line
Slide 4
Slide 4 text
Google Cloud Platform
The device can change the voltage on the wire
The CPU can detect changes in voltage
Slide 5
Slide 5 text
Google Cloud Platform
low voltage
high voltage
edge edge
Slide 6
Slide 6 text
Google Cloud Platform
Simple: the device “pulses” the interrupt line
The CPU reacts
This is “edge triggered”
Slide 7
Slide 7 text
Google Cloud Platform
Device CPU
Slide 8
Slide 8 text
Google Cloud Platform
Problem: what happens if the CPU doesn’t detect
a pulse?
The interrupt doesn’t get serviced!
Slide 9
Slide 9 text
Google Cloud Platform
low voltage
high voltage
level level
Slide 10
Slide 10 text
Google Cloud Platform
The device can change the voltage and keep it
there until the interrupt is serviced
The CPU can’t miss edges
The device can “stack” interrupt reasons - leave
the voltage until all reasons are ACK’ed
This is “level triggered”
Slide 11
Slide 11 text
Google Cloud Platform
Device CPU
Slide 12
Slide 12 text
Google Cloud Platform
What does this mean for Kubernetes?
State is more useful than events
Level-driven software is about asserting state
Clients can check and re-check state at any time
This is the heart of Kubernetes’ controller model