Files
document-haness/docs/clean-architecture-backend-template/tech-log-studio/state-machines-and-ownership/concept/concept-adapter-outbound-httpclient-c04.md
T
DongHyeonkaandClaude Opus 5 b2963105a8 docs(keycloak-session-store): import the session-storage lab as a new project
The keycloak project ended with four open questions that design could not
settle. A two-VM lab was built to answer them by measurement, and this is
that material: 26 experiments, 125 raw command outputs, 22 browser captures.

Follows the import procedure in README.md.

  source/     the originating repository verbatim — 78 documents, 28 SVGs,
              8 manifests, plus .source-revision recording the commit
  final/      the SSOT
    document.md   729 lines written from the 29 experiment documents, not
                  concatenated: what was predicted, what was measured, and
                  where the measurement itself was wrong
    evidence/raw    125 outputs, flattened to <experiment>__<file> because
                    the originals collided (01-baseline.txt appeared three
                    times) and the audit only globs the top level
    evidence/meta   one per raw file; command and exitCode are null and the
                    README says why rather than inventing them
    evidence/browser  22 captures
    assets/       three diagrams through techviz
    .techviz/     their VizSpecs

A separate project rather than an addition to keycloak: the B-layer answers
that project's four questions, but the A, C and D layers are about cluster
failure, SSO and operations, and one document.md should hold one subject.
The four question records there can point here through 관계.

Recorded rather than papered over: only three of the 28 diagrams were
remade. The repository forbids hand-drawn SVG and forbids titles inside the
canvas; all 28 originals carry both, so converting them is redrawing, not
reformatting. They stay in source/ and the gap is written into the document.

verify-pipeline.py passes. audit-records.py reports no issues.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-04 22:51:59 +09:00

3.1 KiB

kind, slug, title, topic, project, status, sourceRevision, rootTreeNode, evidenceCapturedOn, assets, evidence, source, module
kind slug title topic project status sourceRevision rootTreeNode evidenceCapturedOn assets evidence source module
CONCEPT adapter-outbound-httpclient-c04 뒤 규칙이 앞 규칙의 금지를 되돌리지 못한다 state-machines-and-ownership clean-architecture-backend-template 게시 전 21234e38cdb9a926cbc92bb97a2aee2e4a7d2916 concept:adapter-outbound-httpclient-c04 2026-09-01
key file
adapter-outbound-httpclient-c04 ../../../final/evidence/rendered/adapter-outbound-httpclient-c04.svg
key file
adapter-outbound-httpclient-c04-diagram ../../../final/assets/diagrams/adapter-outbound-httpclient-c04.svg
../../../final/evidence/raw/adapter-outbound-httpclient-c04.txt
원본 분석 절은 analysis/11-adapter-outbound-httpclient.md#L305 이다.
adapter-outbound-httpclient

뒤 규칙이 앞 규칙의 금지를 되돌리지 못한다

DefaultRetryEligibilityEngine.decide의 javadoc이 규칙이다 — 싼 절대 차단이 먼저 오고, 그다음 모호성, 그다음 상태·실패별 규칙이 온다.

본문

DefaultRetryEligibilityEngine.decide의 javadoc이 규칙이다 — "The order is the point. Cheap absolute blockers come first (attempts, budget, replayability, first byte, deadline, draining), then ambiguity, then status- and failure-specific rules. A later rule can never re-enable something an earlier rule forbade."

재시도 결정의 순서

:::evidence key="adapter-outbound-httpclient-c04-diagram" alt="절대 차단 여섯과 영구 실패 범주와 증거와 상태별 규칙이 왼쪽에서 오른쪽으로 이어지는 구조" caption="재시도 결정의 순서" zoom="false" :::

절대 차단 여섯이 먼저다 — 시도 수 소진 · 예산 소진 · 본문 재생 불가 · 첫 바이트 전달됨 · 런타임 draining · 남은 deadline이 최소 시도 예산 이하. 그다음 영구 실패 범주, 그다음 증거, 그다음 상태/실패별 규칙이다.

DefaultRetryEligibilityEngine 참조 위치

:::evidence key="adapter-outbound-httpclient-c04" alt="코드베이스에서 DefaultRetryEligibilityEngine 를 검색한 출력 14줄. 이 기록이 세는 참조가 그 출력에 그대로 보인다." caption="DefaultRetryEligibilityEngine 코드베이스 검색 — 14줄 · exit 0" zoom="true" :::

HTTP 메서드가 결정에 들어 있지 않다

RetryContext.safelyIdempotent()가 이 모듈의 D-09를 구현한다 — HTTP 메서드는 RetryContext아예 없다("so a POST with a registered idempotency key and a GET against a non-idempotent RPC endpoint are both handled correctly instead of by method-name folklore"). 키 기반 멱등성은 키가 실제로 전송됐는지까지 요구한다. test aKeyThatWasNeverSentDoesNotMakeARepeatSafe가 그것을 고정한다.

존중한 Retry-After를 자르지 않는 이유

Retry-After는 남은 deadline 안에 들어갈 때만 존중된다(allowWithin), 그리고 존중된 Retry-AftermaxBackoff로 잘리지 않는다 — 잘라 버리면 업스트림이 요청한 대기보다 일찍 다시 두드리게 되기 때문이다.