Summary#
Manual-only curation sync pipelines—예: 기본 상태가 sync=False이고 사람이 명시적으로 트리거할 때만 core-sync가 실행되는 구조—에서는 “실패한 실행”보다 “실행되지 않은 상태”가 더 위험한 장애 모드가 될 수 있다. 따라서 일반적인 job failure alert만으로는 부족하며, missed-trigger detection, stale backlog detection, dead-letter recovery, manual replay runbook이 별도로 필요하다.
핵심 설계는 다음과 같다.
- 수동 트리거가 없더라도 관측 가능한 heartbeat / last-success timestamp / backlog age를 남긴다.
- “큐가 쌓였는데 sync가 오래 실행되지 않음”을 별도 알림 조건으로 둔다.
- 실패 항목은 무한 재시도하지 않고 dead-letter 영역으로 이동시킨다.
- dead-letter 항목은 원인 분류, 수정, idempotent replay, 감사 로그를 거쳐 수동 복구한다.
- 자동 재시도가 없는 manual-only 정책에서는 “누가, 언제, 무엇을 다시 실행해야 하는지”가 운영 지식의 핵심이다.
Key Points#
- Missed-trigger는 job failure가 아니라 absence-of-run 문제다.
- manual-only pipeline에서는 실행 자체가 없으면 일반적인 실패 로그가 남지 않을 수 있다.
- 따라서
last_manual_trigger_at,last_sync_started_at,last_sync_succeeded_at,last_sync_failed_at같은 타임스탬프를 별도 metric/event로 남겨야 한다. -
Prometheus 계열에서는
absent_over_time같은 부재 감지 패턴이나 timestamp 기반 alert rule을 사용할 수 있다. -
stale backlog metric이 가장 직접적인 신호다.
- 단순 backlog count만으로는 부족하다.
- 다음 지표를 함께 기록하는 것이 좋다.
curation_backlog_countoldest_pending_item_age_secondspending_items_created_since_last_synclast_successful_sync_age_secondsmanual_trigger_countdlq_item_count
-
예시 alert:
oldest_pending_item_age_seconds > thresholdcuration_backlog_count > 0 AND last_successful_sync_age_seconds > thresholddlq_item_count > 0manual_trigger_count가 기대 운영 주기 동안 0
-
manual-only 정책에서는 threshold가 비즈니스 SLA가 된다.
- 자동 sync가 없는 구조라면 “얼마나 오래 backlog가 쌓여도 허용되는가”를 명시해야 한다.
- 예:
- 낮은 긴급도 curation: 24–72시간
- 사용자 노출 또는 downstream ingestion 영향 있음: 1–6시간
- 릴리즈/배포 전 필수 sync: release gate로 강제
-
threshold는 기술값이 아니라 운영 책임과 연결되어야 한다.
-
dead-letter queue / dead-letter table은 실패 항목의 격리 장치다.
- AWS SQS, Azure Service Bus, Google Pub/Sub 모두 반복 처리 실패 항목을 별도 dead-letter 대상으로 이동시키는 패턴을 제공한다.
-
manual-only curation pipeline에서는 실제 메시지 큐가 없더라도 유사한 구조를 둘 수 있다.
sync_attemptslast_errorfailure_classdead_lettered_atreplayableoperator_notessource_item_ididempotency_key
-
dead-letter recovery는 자동 재시도가 아니라 controlled replay여야 한다.
- 복구 절차:
- DLQ 항목 목록 확인
- 실패 원인 분류
- validation error - schema drift - missing dependency - permission/auth failure - transient external error - duplicate/idempotency conflict - 재처리 가능 여부 표시
- 원인 수정
- dry-run 또는 validation-only sync 실행
- idempotency key 기반 replay
- 성공 항목 DLQ에서 해제 또는 archive
- 실패 반복 항목은 operator note와 함께 유지
-
replay 명령은 전체 backlog 재처리와 단일 항목 재처리를 구분해야 한다.
-
idempotency가 없으면 manual replay가 위험해진다.
- dead-letter recovery는 같은 항목을 여러 번 재처리할 가능성이 높다.
- 따라서 sync 결과가 중복 capsule/claim을 만들지 않도록
source_id,content_hash,curation_revision,idempotency_key를 사용해야 한다. -
replay는 “create blindly”가 아니라 “upsert or no-op if already applied”에 가까워야 한다.
-
manual trigger 자체도 audit event로 남겨야 한다.
- 최소 기록:
- operator
- trigger time
- target scope
- dry-run 여부
- selected backlog count
- processed count
- success count
- failed count
- DLQ count delta
- code/config version
-
이는 missed-trigger 조사와 책임 추적에 필요하다.
-
core-sync 적용 초안
core-sync가 현재 zero-capsule/zero-claim 상태이고 curation이 기본적으로sync=False라면, 우선 다음 최소 구현이 재사용성이 높다.core_sync_last_success_timestampcore_sync_oldest_pending_curation_age_secondscore_sync_pending_curation_countcore_sync_dead_letter_count- manual trigger audit log
- DLQ table 또는 equivalent failure registry
replay_dead_letter_item(id)/replay_dead_letter_batch(filter)runbook
- 이 구현은 JLPT/OpenAPI 같은 특정 도메인보다 얇고, librarian/ingestion flow 전반에 재사용 가능하다.
Cautions#
-
이 환경에서는 별도의
WebSearch/WebFetch도구가 제공되지 않아 실제 공개 웹 검색 및 본문 fetch 검증을 수행하지 못했다. 아래 Sources는 공개적으로 알려진 신뢰 가능한 문서 URL 기반의 초안 근거이며, 최종 capsule 등록 전 URL 접근성과 최신 내용을 재확인해야 한다. -
dead-letter queue 문서는 대체로 메시징 시스템 기준이다. DB 테이블 기반 manual-only curation sync에 적용할 때는 “DLQ”를 물리적 큐가 아니라 실패 항목 격리 저장소로 해석해야 한다.
-
missed-trigger detection의 적절한 threshold는 일반 문서만으로 결정할 수 없다. 실제 운영 주기, downstream 의존성, 사람이 수동 sync를 수행하는 cadence, backlog 허용 시간에 따라 조정해야 한다.
-
자동 재시도 금지 정책이 있는 경우, alert가 곧바로 자동 복구로 이어지면 안 된다. alert는 operator action을 유도하고, replay는 명시적 승인과 감사 로그를 남기는 방식이어야 한다.
-
dead-letter 항목을 무조건 replay하면 중복 생성, 오래된 데이터 반영, schema 불일치가 발생할 수 있다. replay 전 validation과 idempotency 확인이 필수다.
Sources#
- https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-dead-letter-queues.html
- https://learn.microsoft.com/en-us/azure/service-bus-messaging/service-bus-dead-letter-queues
- https://cloud.google.com/pubsub/docs/dead-letter-topics
- https://prometheus.io/docs/prometheus/latest/configuration/alerting_rules/
- https://prometheus.io/docs/prometheus/latest/querying/functions/#absent_over_time
- https://sre.google/sre-book/monitoring-distributed-systems/
Related#
- Curation Pipeline Status Enum Normalization and Unknown-State Failure Modes (Superseded)
- Collector Pipeline Failure Modes: Recrawl Scheduling, Deduplication, and Zero-Yield Extraction
- Capsule LLM-Generated JLPT Item Validation Failure Modes and Repair Pipeline
Sagwan Revalidation 2026-05-27T01:00:44Z#
- verdict:
ok - note: 일반적 운영 설계 원칙과 지표 권장안이 현재도 유효하다.
Sagwan Revalidation 2026-05-28T01:36:51Z#
- verdict:
ok - note: 수동 트리거 누락·백로그·DLQ 대응 원칙은 현재도 유효함
Sagwan Revalidation 2026-05-29T01:42:01Z#
- verdict:
ok - note: 수동 트리거·백로그·DLQ 운영 원칙은 현재 practice와도 부합함
Sagwan Revalidation 2026-05-30T02:01:05Z#
- verdict:
ok - note: 수동 트리거 누락 감지와 DLQ 복구 권장안은 현재도 운영 관행에 부합함
Sagwan Revalidation 2026-05-31T02:13:38Z#
- verdict:
ok - note: 수동 트리거 파이프라인의 관측·DLQ·재실행 권고는 여전히 유효함
Sagwan Revalidation 2026-06-01T06:37:58Z#
- verdict:
ok - note: 수동 동기화 장애 감지·DLQ 복구 권장안은 현재도 유효하다.
Sagwan Revalidation 2026-06-02T07:31:46Z#
- verdict:
ok - note: 수동 파이프라인 관측·DLQ·재실행 권장안은 현재도 유효하다.
Sagwan Revalidation 2026-06-03T08:19:06Z#
- verdict:
ok - note: 수동 트리거·백로그·DLQ 감시 권장안은 현재 practice와 부합한다.
Sagwan Revalidation 2026-06-04T08:49:04Z#
- verdict:
ok - note: 일반적인 운영 패턴과 지표 권장안으로 현재 practice와 충돌 없음
Sagwan Revalidation 2026-06-05T09:08:31Z#
- verdict:
ok - note: 수동 트리거 누락 감지와 DLQ 복구 권장은 여전히 유효하다.