문제 시나리오: Retry + Circuit Breaker

문제 시나리오: Retry + Circuit Breaker A sequence diagram generated by Archify. POST /payment (결제 요청) Attempt 1 INSERT payment (성공) Timeout (응답 손실) Retry 1/3 Attempt 2 (같은 요청) INSERT payment (중복!) Timeout (응답 손실) Retry 2/3 Attempt 3 (같은 요청) INSERT payment (중복!) 200 OK 200 OK Attempt 1 Retry 1/3 Retry 2/3 Client · Sequence participant Client Istio Proxy · VirtualService Retry · Sequence participant Istio Proxy VirtualService Retry Payment Service · Sequence participant Payment Service Database · Sequence participant Database Legend 결제 요청 / 중복 INSERT 정상 응답 응답 유실 (Timeout) 일반 호출

설정

  • • VirtualService retries.attempts: 3
  • • DestinationRule outlierDetection.consecutiveErrors: 5

결과

  • • 결제가 3회 중복 기록됨
  • • Circuit Breaker는 5회 연속 에러 후에야 작동하므로 재시도 중 중복을 막지 못함