
Reliable Software
Use a Unique Database Constraint to Settle Competing Inserts
Prevent duplicate records under concurrent requests with a database uniqueness rule, while designing a useful application response to conflicts.

Prevent duplicate records under concurrent requests with a database uniqueness rule, while designing a useful application response to conflicts.

Plan a database change around overlapping application versions, separating schema expansion, data backfill and removal of obsolete fields.

Design retries around one intended operation so a timeout does not become a second order, with clear keys, state checks and provider-specific rules.