Spam Isolation Probe Two
Lesson 4 of 4
Expire State on a Clock
Estimated time: 10 minutes
Expire State on a Clock
State that never expires grows until it becomes the fault. State that expires too early breaks a reader that still needed it.
Set the time to live per kind
def expired(record, now):
return (now - record.created) > record.ttl
Sweep on a schedule
Alert when the sweep falls behind the arrival rate, because that gap is how a store fills while nothing looks wrong.