Queue Endpoint
● Good for infrequent operations
● Requires clients to understand two
resource types
● What about resources that are continually
experiencing long running changes?
Slide 28
Slide 28 text
Spec and Status
● Include operation status in the resource
● spec describes a resource’s desired state
● status describes a resource’s current
state
● status does not mirror spec
Slide 29
Slide 29 text
Spec and Status
apiVersion: extensions/v1beta1
kind: Deployment
spec:
replicas: 2
...
status:
availableReplicas: 2
...
Slide 30
Slide 30 text
@jrbowes
Photo by Gamze
Bozkaya on
Unsplash
THE INTERNAL MODEL
Slide 31
Slide 31 text
@jrbowes
Slide 32
Slide 32 text
@jrbowes
Slide 33
Slide 33 text
@jrbowes
Slide 34
Slide 34 text
@jrbowes
Slide 35
Slide 35 text
@jrbowes
Photo by David
Kovalenko on
Unsplash
LOST DATA
Slide 36
Slide 36 text
@jrbowes
Slide 37
Slide 37 text
@jrbowes
Slide 38
Slide 38 text
@jrbowes
Slide 39
Slide 39 text
@jrbowes
Slide 40
Slide 40 text
@jrbowes
Photo by Fabrizio
Verrecchia on
Unsplash
SLOW REACTIONS
Slide 41
Slide 41 text
@jrbowes
Slide 42
Slide 42 text
@jrbowes
Slide 43
Slide 43 text
@jrbowes
Photo by Matt Artz
on Unsplash
PREVENTION
AND REPAIR
Slide 44
Slide 44 text
Lost Intermediate Data
● Edge triggered
○ Track last seen revision number
○ Perform a resync on missing version
● Not an issue for level triggered
Slide 45
Slide 45 text
Stale Data
● Heartbeat
● Periodic resync (done in Kubernetes)
Slide 46
Slide 46 text
Slow Reactions
● Edge triggered
○ Keep state for last value
○ Compute change to apply with real
value, last seen, and changed
● Not an issue for level triggered
Slide 47
Slide 47 text
@jrbowes
Photo by
Hans-Peter Gauster
on Unsplash
PIECING IT
TOGETHER
Slide 48
Slide 48 text
TCP implementations should follow a general
principle of robustness:
be conservative in what you
do, be liberal in what you
accept from others.
- Jon Postel, RFC 761
Slide 49
Slide 49 text
be exhaustive in what you
send, be explicit in what you
receive from others.
Slide 50
Slide 50 text
@jrbowes
Photo by Annie
Spratt on Unsplash
WRAPPING
UP
Slide 51
Slide 51 text
@jrbowes
Photo by Michael
Hoyt on Unsplash
COLOCATE
COMPLEX
LOGIC
WITH STATE
Slide 52
Slide 52 text
@jrbowes
Photo by Roman
Koester on
Unsplash
IDENTIFY THE
AUDIENCE AND
BUILD FOR THEM
Slide 53
Slide 53 text
@jrbowes
Photo by Andrés
Canchón on
Unsplash
MAKE IT
HARD FOR THE
AUDIENCE TO FAIL