distributed systems
9 minIdempotency and the Transactional Outbox: Making Retries Safe
Learn why network retries create duplicate effects and how idempotency keys and an outbox close common reliability gaps.
Loading page...
distributed systems
9 minLearn why network retries create duplicate effects and how idempotency keys and an outbox close common reliability gaps.
Q&A
Q&APersist the business change and an event record together, then publish the event asynchronously.
A database transaction writes both the business state and an outbox row. A separate publisher retries delivery from that durable row. This avoids the gap where a database commit succeeds but broker publication fails. Delivery can still be repeated, so consumers should deduplicate by a stable event ID.
Q&A
Q&ATIME_WAIT is part of safe TCP teardown; verify actual ephemeral-port pressure before tuning sysctls.
TIME_WAIT helps prevent delayed packets from an old connection from contaminating a new one. A high count can be normal. Diagnose port exhaustion by checking outbound tuple reuse, NAT limits, ephemeral port range, and connection pooling. tcp_tw_reuse semantics vary by kernel and are not a universal first fix.