# Optimistic concurrency and idempotence

# Idempotence

All operations on the HTTP interface are idempotent (unless the expected version is ignored). It is the responsibility of the client to retry operations under failure conditions, ensuring that the event IDs of the events posted are the same as the first attempt.

Provided the client maintains this EventStoreDB will treat all operations as idempotent.

For example:

Assuming you were posting to a new stream you would get the event written once (and the stream created). The second event returns as the first but not write again.

TIP

This allows the client rule of “if you get an unknown condition, retry” to work.

For example:

Last Updated: 10/12/2020, 9:01:06 PM