Pattern · seen in 1 breakdown across 1 company
Hibernation vs Polling
Definition
When a process needs to wait for an external signal — a callback, an approval, a scheduled time, a state change in another system — there are two ways to handle the wait. The naive approach is polling: a loop, a queue consumer, or a scheduled job that periodically wakes up and asks "is it ready yet?" The durable approach is hibernation: the process serializes its state, releases its compute resources, and exists only as data until an external signal explicitly wakes it.
Hibernation requires a coordination point — typically a database row or a workflow runtime — that holds the waiting process's state and accepts signals. When a signal arrives (via an API call, a queue message, or a scheduled timer), the runtime reloads the state and resumes execution. Between submission and signal, the process consumes zero CPU and effectively no memory. The wait can last seconds or weeks; the cost is the same.
Polling consumes resources proportional to wait duration. Hibernation consumes resources proportional only to the number of waiting processes (typically one row each). For workflows with long waits, the difference is many orders of magnitude.
The trade is in complexity: polling is shallow but operationally simple (every component is straightforward). Hibernation requires a durable state store and a signal-routing mechanism, but eliminates the queue-consumer + callback-endpoint + scheduled-job + state-table sprawl that polling-based business logic typically grows into.
When it applies
Tradeoffs
The same move, 1 ways
Every row is a production system that bet on this pattern — the note says how, in that system's own terms.
Problems this pattern answers
The walls where its breakdowns live — each opens the cross-company comparison.