재시도 패턴
일시적 장애를 처리하도록 실패한 작업을 투명하게 재시도해 애플리케이션 안정성을 높이는 패턴
구조와 동작 원리
구성 요소와 배치 원칙 (조사 기반 개념 설명 · 연결 순서나 토폴로지는 특정하지 않음)
내구성 큐, visibility timeout, DLQ를 재시도 구성요소로 사용해 프로세스 재시작에도 신뢰성 확보
재시도 정책은 서비스 간 일관성을 위해 중앙에서 관리
서비스 스로틀링, 일시적 네트워크 단절, 일시적 서비스 불가용 같은 일시 오류가 문제 상황
기대 효과
사용자 경험과 애플리케이션 복원력 향상
트레이드오프
잦은 재시도는 네트워크 대역폭 과부하와 경합을 유발
실패가 드물거나 일시적일 때 유효하며 과부하 기인 실패에는 부적합
운영 및 적용 가이드
종합 설명 · 원문 인용으로 검증된 항목과 구분됩니다. 실제 적용 전 확인이 필요합니다.
언제 사용하는가
일시적 네트워크 오류, 외부 API 속도 제한·일시 불가, DB 연결 실패처럼 재시도하면 성공 가능성이 있는 idempotent 호출에 적용한다.
시나리오
월 1억 건 결제 API를 운영하는 핀테크 기업이 외부 카드사 API의 간헐적 타임아웃을 겪는다. 요구사항은 중복 결제 방지와 2초 내 사용자 응답이다. 결제 요청에 멱등 키를 두고 외부 호출은 지수 백오프·지터·최대 3회로 재시도하며, 초과 실패는 DLQ에 적재해 배치로 보정한다.
배치 원칙
- 게이트웨이/서비스 메시에 공통 재시도 정책 배치
- 서비스별 재시도 예산과 최대 횟수 중앙 관리
- 비동기 작업은 visibility timeout과 DLQ를 가진 큐에 배치
- 재시도 설정은 코드/정책 파일로 버전 관리
- 관측성 대시보드에 재시도율·DLQ 적재량 배치
온프레미스
온프레미스에서는 게이트웨이/프록시와 큐를 이중화하고 재시도 정책을 중앙 설정으로 배포하며, 재시도 폭증이 내부망·DB에 부하를 주지 않도록 용량과 백오프를 튜닝한다.
클라우드
클라우드에서는 관리형 큐·DLQ, API 게이트웨이/서비스 메시 정책, 지수 백오프·지터를 사용하고 서비스 쿼터와 재시도 예산을 모니터링한다.
Kubernetes
Kubernetes에서는 서비스 메시/인그레스 재시도 정책을 CRD나 Helm values로 관리하고, API 충돌은 최신 resourceVersion 재조회 후 재시도하며, 파드 재시작·배포 실패 재시도는 무한 루프가 되지 않게 제한한다.
장애 대응
대표 장애는 재시도 폭풍, 과부하 의존성에 대한 재시도, 비멱등 작업 중복, DLQ 적체다. 재시도율과 의존성 오류율을 확인해 즉시 재시도 중지·예산 축소, 백오프·지터 강화, 멱등성 보완, DLQ 격리 및 수동 재처리 순으로 대응한다.
14개 관점별 근거
조사 당시 근거 보유 여부입니다. 출처의 정확성과 최신성을 별도로 판단하세요.
정의·개요근거 있음
일시적 장애를 처리하도록 실패한 작업을 투명하게 재시도해 애플리케이션 안정성을 높이는 패턴
Enable an application to handle transient failures when it tries to connect to a service or network resource해결하는 문제근거 있음
서비스 스로틀링, 일시적 네트워크 단절, 일시적 서비스 불가용 같은 일시 오류가 문제 상황
transient errors might be caused by service throttling, temporary loss of network connectivity, or temporary service unavailability.주요 구성 컴포넌트·리소스근거 있음
내구성 큐, visibility timeout, DLQ를 재시도 구성요소로 사용해 프로세스 재시작에도 신뢰성 확보
Durable Queue-Based Retry: Use queues with visibility timeouts and DLQs for reliable retry across process restarts.데이터·에셋 배치 원칙근거 있음
재시도 정책은 서비스 간 일관성을 위해 중앙에서 관리
Best for consistent policies across services.대표 유스케이스근거 있음
외부 API가 일시 불가하거나 속도 제한을 걸 때 재시도가 유용
External API Calls: Third-party APIs might be temporarily unavailable or impose rate limits.시나리오 예시근거 있음
Terraform 초기화·계획·출력 조회 중 일시 네트워크 실패 시 재시도
Retry initialization, planning, and output retrieval when Terraform encounters transient network failures.부적합 상황·주의근거 있음
실패가 드물거나 일시적일 때 유효하며 과부하 기인 실패에는 부적합
Retries help when failures are rare or transient, not when failures come from overload.온프레미스 관점(개발·배포·운영)미확인
확인된 원문 근거가 없습니다. 부적합하다는 의미는 아닙니다.
클라우드 관점(개발·배포·운영)근거 있음
클라우드 환경의 일시 장애에 민감하게 대응하도록 재시도 적용
has to be sensitive to the transient faults that can occur in this environmentKubernetes 관점(개발·배포·운영)근거 있음
Kubernetes API 충돌은 실패가 아니라 최신 버전을 다시 읽고 재시도하라는 신호
This is not a failure. It is Kubernetes telling you: "The resource changed since you last read it. Try again with the latest version."장애 대응 관점근거 있음
포화된 시스템에 대한 재시도는 해당 자원 부하를 가중해 작은 장애를 연쇄 장애로 확대
A retry against a saturated system adds load to the exact resource that is struggling, cascading a minor event.장점근거 있음
사용자 경험과 애플리케이션 복원력 향상
improves the user experience and application resilience.단점·트레이드오프근거 있음
잦은 재시도는 네트워크 대역폭 과부하와 경합을 유발
frequent retries can overload network bandwidth and cause contention.대표 기술·도구근거 있음
게이트웨이/서비스 메시 기반 서버측 재시도
Server-Side Retry via Proxy/Gateway: Central controlled retries via gateway/service mesh.추가 참고 문헌 (21)
- Retry Pattern - Azure Architecture Center | Microsoft Learn ↗
- Retry with backoff pattern - AWS Prescriptive Guidance ↗
- What is Retry? Meaning, Architecture, Examples, Use Cases, and How to Measure It (2026 Guide) - SRE School ↗
- Retry | Distributed Application Architecture Patterns ↗
- Application resiliency patterns - .NET | Microsoft Learn ↗
- Retry pattern in microservices | Mercari Engineering ↗
- Recommendations for handling transient faults - Microsoft Azure Well-Architected Framework | Microsoft Learn ↗
- Understanding the Retry Pattern ↗
- Retry Policies | atmos ↗
- Retry in Platform Engineering on Kubernetes - liveBook · Manning ↗
- Terraform Multi-Cloud Provisioning: How the Runner Builds Kubernetes on AWS, GCP, and Azure | Alex Idowu ↗
- docs/operations/large-deployments.md ↗
- Managing deployment processes - Deployments | Building applications | OKD 5 ↗
- Kubernetes Cluster Lifecycle Management | ↗
- How to Implement Retry Logic for Kubernetes API Conflicts in Controllers ↗
- Air-Gapped Deployment - Omnistrate Documentation ↗
- Google SRE - Cascading Failures: Reducing System Outage ↗
- REL05-BP03 Control and limit retry calls - AWS Well-Architected Framework ↗
- 2.20 Error handling and resilience patterns — Software Engineering Guide ↗
- Retry Strategies in Distributed Systems: Avoiding Pitfalls ↗
- Google SRE - Troubleshooting Methodology: A Learning Path ↗