Idempotency
멱등성
멱등성은 동일한 의도된 작업을 다시 수행해도 한 번 수행했을 때와 동일한 서버 효과를 가진다는 것을 의미합니다. 응답이 반드시 동일할 필요는 없습니다.
다른 예시
결제가 시간 초과된 후, 구매자는 멱등성 키 `8f2…`와 동일한 정규화 요청 해시로 재시도합니다. 서버는 다시 청구하지 않고 첫 번째 청구를 반환합니다. 다른 금액으로 동일한 키를 사용하면 거부되며, 키는 서면 정책에 따라 만료됩니다.
주요 부분
- 01작업 정체성
- 02중복 감지
- 03안정적인 효과 및 저장된 결과
사용할 때
불안정한 네트워크, 큐, 결제 호출, 메시지를 최소 한 번 전달할 수 있는 시스템에 대해 재시도를 안전하게 만드세요.
다음 경우에는 사용하지 마세요
`POST`가 항상 비멱등(non-idempotent)인 것은 아닙니다. 멱등성 키(idempotency key) 또한 트랜잭션, 권한 부여, 또는 충돌 검사(conflict checks)를 대신하지 않습니다.
코드에서 사용된 이름
HTTP method semantics and/or scoped idempotency key with request fingerprint 출시하기 전에
Check contracts and invariants, authorization, and input limits. Test retries, one-time effects, timeouts, and partial failures. Verify data integrity, compatibility, monitoring, recovery, and rollback.
Outcome:Complete the task with 멱등성 (Idempotency)。 User context:결제가 시간 초과된 후, 구매자는 멱등성 키 `8f2…`와 동일한 정규화 요청 해시로 재시도합니다. 서버는 다시 청구하지 않고 첫 번째 청구를 반환합니다. 다른 금액으로 동일한 키를 사용하면 거부되며, 키는 서면 정책에 따라 만료됩니다. Technical concept or control:멱등성 (Idempotency)。 Why it fits:불안정한 네트워크, 큐, 결제 호출, 메시지를 최소 한 번 전달할 수 있는 시스템에 대해 재시도를 안전하게 만드세요. Do not use it when:`POST`가 항상 비멱등(non-idempotent)인 것은 아닙니다. 멱등성 키(idempotency key) 또한 트랜잭션, 권한 부여, 또는 충돌 검사(conflict checks)를 대신하지 않습니다. Engineering requirements: Define inputs, outputs, contracts, and rules that must always hold. Set authorization and input checks. Define failures, timeouts, retries, one-time effects, data moves, and compatibility limits. Operations: Add useful signals and logs that hide sensitive data. Set capacity limits and write an operator guide. Test recovery and rollback. Acceptance criteria: Contract and failure-path tests pass. Data and authorization rules still hold during retries and partial failures. Check performance limits, monitoring, recovery, and rollback. Evidence and limits (evidence boundary):이 표준은 나열된 범위만 적용합니다. 시각적 스타일, 제품 결정, 또는 Vibulary 예시는 선택하지 않습니다. Unknowns to confirm: Where the code runs, data stores, traffic shape, consistency needs, and the security boundary. Also confirm the compatibility period, service goals, and rollback limits.
이 요청을 확인하세요
Review how 멱등성 (Idempotency) is used now. Definition: 멱등성은 동일한 의도된 작업을 다시 수행해도 한 번 수행했을 때와 동일한 서버 효과를 가진다는 것을 의미합니다. 응답이 반드시 동일할 필요는 없습니다. Release checks: Check contracts and invariants, authorization, and input limits. Test retries, one-time effects, timeouts, and partial failures. Verify data integrity, compatibility, monitoring, recovery, and rollback. Before changing code, list the evidence, gaps, severity, and the smallest safe fix.