Files
document-haness/docs/keycloak-session-store/source/docs/evidence/a2-database-loss
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
..

A-2 — PostgreSQL 정지 증거

2026-09-04 11:5611:58 KST · Keycloak 26.7.0 해설: docs/experiment-a2-database-loss.md

파일 무엇을 보여주는가
01-baseline.txt 정지 전 — 양쪽 Ready, cluster_size=2
02-setup-sessions.txt 양쪽 노드에 세션 하나씩. 캐시는 각자 노드에만
03-four-paths.txt 네 경로 전부 500. 캐시를 가진 노드도 실패 — refresh 는 쓰기다
04-health-and-service.txt 전면 장애 증거 — Ready 파드 0개, ready 주소=[], 외부 503, database connections: DOWN. JWKS·.well-known 은 200
05-recovery.txt up=1 인 채로 503. DB 복귀 15초 후 재시작 0회로 자동 회복, 세션 5건 생존
a2-up-stayed-1-during-outage.png Grafana — up{job="keycloak"} 이 전면 장애 내내 1에 평평

핵심 세 줄

  1. DB 는 단일 장애점이다. Keycloak 을 몇 대로 늘려도 같이 죽는다 — Ready 파드 0개, 외부 503.
  2. 캐시는 읽기를 대신할 뿐 쓰기를 못 한다. refresh 는 UPDATE LAST_SESSION_REFRESH 를 하므로 캐시가 있어도 실패한다.
  3. up 은 이 장애를 못 잡는다. 알림은 readiness 와 외부 응답 코드에 걸어야 한다.