Files
document-haness/docs/clean-architecture-backend-template/tech-log-studio/state-machines-and-ownership/concept/concept-grpc-advanced-resilience-c01.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

56 lines
2.3 KiB
Markdown

---
kind: CONCEPT
slug: grpc-advanced-resilience-c01
title: 헤지는 성공했을지도 모르는 호출에 대해 일어난다
topic: state-machines-and-ownership
project: clean-architecture-backend-template
status: 게시 전
sourceRevision: 21234e38cdb9a926cbc92bb97a2aee2e4a7d2916
rootTreeNode: concept:grpc-advanced-resilience-c01
evidenceCapturedOn: 2026-09-01
assets:
- key: grpc-advanced-resilience-c01
file: ../../../final/evidence/rendered/grpc-advanced-resilience-c01.svg
- key: grpc-advanced-resilience-c01-diagram
file: ../../../final/assets/diagrams/grpc-advanced-resilience-c01.svg
evidence:
- ../../../final/evidence/raw/grpc-advanced-resilience-c01.txt
source:
- 원본 분석 절은 analysis/grpc/grpc-advanced-resilience.md#L58 이다.
module: grpc-advanced-resilience
---
# 헤지는 성공했을지도 모르는 호출에 대해 일어난다
헤징 예산은 토큰 버킷이다. 헤지 하나가 `round(1/ratio)` 토큰을 쓰고, 완료된 호출 하나가 토큰 하나를 돌려준다.
## 본문
<!-- body:start -->
토큰 버킷이다. 헤지 하나가 `round(1/ratio)` 토큰을 쓰고, 완료된 호출 하나가 토큰 하나를 돌려준다. 상한이 조용한 구간 뒤의 폭주를 제한한다.
## 헤지가 허용되는 조건
:::evidence key="grpc-advanced-resilience-c01-diagram" alt="첫 시도와 예산 확인과 토큰 소비와 헤지 시도가 왼쪽에서 오른쪽으로 이어지는 구조" caption="헤지가 허용되는 조건" zoom="false"
:::
비율 상한이 0.5 이고 그 근거가 적혀 있다.
> "a hedging ratio above 0.5 means more than half of all calls are duplicated, which is a load decision rather than a latency one"
## 재시도 예산보다 급한 이유
> "A retry happens after a failure; a hedge happens on a call that might have succeeded, so a fleet that hedges without a budget doubles its backend load in the steady state and doubles it again the moment latency rises."
## 이 기록이 다루는 파일 범위
:::evidence key="grpc-advanced-resilience-c01" alt="코드베이스에서 파일 목록을 만든 출력 16줄. 이 기록이 다루는 범위가 그 목록이다." caption="코드베이스 파일 목록 — 16줄 · exit 0" zoom="true"
:::
## 소비가 비교 후 교체 루프다
이 가족에서 원자성을 제대로 다룬 몇 안 되는 곳이다.
<!-- body:end -->