The skill says drawings carry names and sentences go in <desc> and the paragraph beside the figure. I put sentences in node details and edge labels instead, and 27 of the 28 diagrams shipped with prose inside the canvas — "예측 다섯 개가 틀렸다", "아홉 번 조용히 실패했다", "막혀서 닿지 않는다". Only label and details render on the canvas; description does not. So every sentence moved to a noun phrase and the meaning stays in description, which was already carrying it. 막혀서 닿지 않는다 -> 차단 아홉 번 조용히 실패했다 -> 조용한 실패 9건 예측 다섯 개가 틀렸다 -> 틀린 예측 5건 로그아웃이 정리하지 않는다 -> 로그아웃 미정리 볼륨이 없으면 여기까지다 -> 볼륨 없음 Three node labels were sentences too and became names: 세션 스냅샷, 예측 선기록, 대조군 확보. What stays is what the rules protect — identifiers, commands and measured values: PRIMARY KEY (client_registration_id, principal_name), ValidationFailedException: 1 changesets check sum, nginx -t && nginx -s reload, SET LOCAL synchronous_commit TO OFF. Those are names of things, not prose about them. 294 canvas strings across 28 diagrams, none matching a sentence ending, average 11 characters. All 28 still lint clean and re-rendered. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
154 lines
4.4 KiB
JSON
154 lines
4.4 KiB
JSON
{
|
|
"version": "1.1",
|
|
"id": "a6-latency-multiplication",
|
|
"title": "지연이 곱해지는 두 단계",
|
|
"question": "200밀리초가 어떻게 22초가 되는가",
|
|
"type": "architecture",
|
|
"direction": "TB",
|
|
"audience": [
|
|
"지연 예산을 세우는 백엔드 엔지니어"
|
|
],
|
|
"summary": "왕복 횟수만큼 더해지고, 커넥션 풀에서 한 번 더 곱해진다. 그리고 느림이 장애로 승격된다.",
|
|
"alt": "네트워크 지연이 왕복 횟수만큼 누적되고 커넥션 풀 대기에서 다시 증폭되며 마지막에 readiness 실패로 이어지는 구성.",
|
|
"long_description": "주입한 지연은 200ms 인데 로그인 응답이 1,872ms 가 됐다. 로그인 한 번이 데이터베이스 왕복을 여러 번 하므로 왕복 횟수만큼 더해진다. 동시 20건에서는 22.2초가 됐다. 요청이 커넥션을 오래 붙들어 뒤의 요청이 풀에서 대기하기 때문이며 커넥션 획득 대기 최대가 20,000ms 였다. 마지막으로 readiness 프로브가 타임아웃으로 실패해 느린 노드가 로드밸런서에서 빠진다. 느림이 장애로 승격된다.",
|
|
"source_context": {
|
|
"document": "docs/keycloak-session-store/final/document.md",
|
|
"document_sha256": "1d44cba1905544d92f1d26ae36a8deb64a3db3914d6b488fd30d6ae7f8cfbabe",
|
|
"anchor": {
|
|
"kind": "heading",
|
|
"value": "A-6 · 지연 주입 — 200밀리초가 22초가 된다",
|
|
"line": 255
|
|
}
|
|
},
|
|
"composition": {
|
|
"profile": "component-flow",
|
|
"diagram_only": true,
|
|
"reference_ids": [
|
|
"payment-event-flow"
|
|
],
|
|
"rationale": "한 값이 두 단계를 지나며 커지는 것이 지배적 질문이다. 증폭 경로이므로 component-flow 를 골랐다."
|
|
},
|
|
"groups": [],
|
|
"nodes": [
|
|
{
|
|
"id": "inject",
|
|
"label": "주입한 지연",
|
|
"kind": "process",
|
|
"role": "source",
|
|
"emphasis": "warning",
|
|
"description": "tc netem 으로 넣는다.",
|
|
"details": [
|
|
"200 ms"
|
|
],
|
|
"evidence": [
|
|
{
|
|
"start_line": 253,
|
|
"end_line": 258
|
|
}
|
|
],
|
|
"assumption": false
|
|
},
|
|
{
|
|
"id": "roundtrips",
|
|
"label": "왕복 횟수만큼 누적",
|
|
"kind": "process",
|
|
"role": "control",
|
|
"emphasis": "normal",
|
|
"description": "로그인 한 번이 DB 를 여러 번 왕복한다.",
|
|
"details": [
|
|
"66ms → 1,872ms"
|
|
],
|
|
"evidence": [
|
|
{
|
|
"start_line": 259,
|
|
"end_line": 263
|
|
}
|
|
],
|
|
"assumption": false
|
|
},
|
|
{
|
|
"id": "pool",
|
|
"label": "커넥션 풀 대기",
|
|
"kind": "component",
|
|
"role": "control",
|
|
"emphasis": "warning",
|
|
"description": "앞 요청이 커넥션을 붙들어 뒤가 밀린다.",
|
|
"details": [
|
|
"획득 대기 최대 20,000ms"
|
|
],
|
|
"evidence": [
|
|
{
|
|
"start_line": 264,
|
|
"end_line": 268
|
|
}
|
|
],
|
|
"assumption": false
|
|
},
|
|
{
|
|
"id": "probe",
|
|
"label": "readiness 실패",
|
|
"kind": "process",
|
|
"role": "target",
|
|
"emphasis": "warning",
|
|
"description": "느린 노드가 로드밸런서에서 빠진다.",
|
|
"details": [
|
|
"동시 20건 최대 22.2초"
|
|
],
|
|
"evidence": [
|
|
{
|
|
"start_line": 269,
|
|
"end_line": 273
|
|
}
|
|
],
|
|
"assumption": false
|
|
}
|
|
],
|
|
"edges": [
|
|
{
|
|
"id": "i-r",
|
|
"from": "inject",
|
|
"to": "roundtrips",
|
|
"label": "왕복당 누적",
|
|
"kind": "request",
|
|
"evidence": [
|
|
{
|
|
"start_line": 253,
|
|
"end_line": 263
|
|
}
|
|
],
|
|
"assumption": false
|
|
},
|
|
{
|
|
"id": "r-p",
|
|
"from": "roundtrips",
|
|
"to": "pool",
|
|
"label": "커넥션 점유",
|
|
"kind": "request",
|
|
"evidence": [
|
|
{
|
|
"start_line": 259,
|
|
"end_line": 268
|
|
}
|
|
],
|
|
"assumption": false
|
|
},
|
|
{
|
|
"id": "p-pr",
|
|
"from": "pool",
|
|
"to": "probe",
|
|
"label": "프로브도 타임아웃",
|
|
"kind": "request",
|
|
"evidence": [
|
|
{
|
|
"start_line": 264,
|
|
"end_line": 273
|
|
}
|
|
],
|
|
"assumption": false
|
|
}
|
|
],
|
|
"legend": [],
|
|
"metadata": {
|
|
"rationale": "왕복 누적과 풀 경합을 분리해 그렸다. 두 단계를 하나로 보면 28배가 어디서 왔는지 설명되지 않는다."
|
|
}
|
|
} |