Skip to main content

Idempotence

An operation is idempotent when the folling is true:

Regardless of the existing state, the result is always the same

Making an operation idempotent requires sensible state handling. Before executing an operation possible existing state must be determined and subsequently changed to achieve the desired outcome.

Idempotence has a high synergy with immutability as raw immutable operations assume no previously existing state. This makes testing of complex infrastructure feasible.

COTB Implementation

Our OpenStack container images are strictly idempotent. To achieve that we implement the following lifecycle within each container:

  1. validate
  2. configure
  3. init
  4. start