Files
progcode/web/public/assets/editorial/2020/retry-idempotency-diagnosis-2020.svg
T
huncode 6c4f980f51
Build and deploy / deploy (push) Successful in 14s
revise June 2020 idempotency articles
2026-07-31 11:32:33 +03:00

50 lines
4.7 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 720 1400" role="img" aria-labelledby="title desc">
<title id="title">Диагностика потерянного ответа и безопасного повтора</title>
<desc id="desc">Вертикальная временная шкала показывает первую HTTP-попытку с requestId req-51, сохранение результата сервисом, таймаут клиента, вторую попытку req-52 с тем же ключом и повтор сохранённого результата.</desc>
<rect width="720" height="1400" fill="#f8fafc"/>
<rect x="28" y="26" width="664" height="112" rx="24" fill="#1e293b"/>
<text x="62" y="72" fill="#f8fafc" font-family="Arial, sans-serif" font-size="32" font-weight="700">Потерянный ответ: что проверить</text>
<text x="62" y="108" fill="#cbd5e1" font-family="Arial, sans-serif" font-size="20">requestId меняется, idempotency key остаётся одним</text>
<line x1="136" y1="194" x2="136" y2="1288" stroke="#94a3b8" stroke-width="8" stroke-linecap="round"/>
<circle cx="136" cy="242" r="20" fill="#2563eb"/>
<circle cx="136" cy="472" r="20" fill="#059669"/>
<circle cx="136" cy="702" r="20" fill="#ea580c"/>
<circle cx="136" cy="932" r="20" fill="#7c3aed"/>
<circle cx="136" cy="1162" r="20" fill="#16a34a"/>
<text x="52" y="212" fill="#475569" font-family="Arial, sans-serif" font-size="20" font-weight="700">t0</text>
<text x="52" y="442" fill="#475569" font-family="Arial, sans-serif" font-size="20" font-weight="700">t1</text>
<text x="52" y="672" fill="#475569" font-family="Arial, sans-serif" font-size="20" font-weight="700">t2</text>
<text x="52" y="902" fill="#475569" font-family="Arial, sans-serif" font-size="20" font-weight="700">t3</text>
<text x="52" y="1132" fill="#475569" font-family="Arial, sans-serif" font-size="20" font-weight="700">t4</text>
<rect x="182" y="174" width="486" height="142" rx="22" fill="#eff6ff" stroke="#2563eb" stroke-width="3"/>
<text x="214" y="220" fill="#1e3a8a" font-family="Arial, sans-serif" font-size="26" font-weight="700">Попытка № 1</text>
<text x="214" y="257" fill="#1e3a8a" font-family="Arial, sans-serif" font-size="21">requestId = req-51</text>
<text x="214" y="286" fill="#1e3a8a" font-family="Arial, sans-serif" font-size="21">key = demo-key-retry-2020-06-a7f1</text>
<rect x="182" y="404" width="486" height="142" rx="22" fill="#ecfdf5" stroke="#059669" stroke-width="3"/>
<text x="214" y="450" fill="#065f46" font-family="Arial, sans-serif" font-size="26" font-weight="700">Сервис сохранил result</text>
<text x="214" y="487" fill="#065f46" font-family="Arial, sans-serif" font-size="21">decision = owner → stored status = 201</text>
<text x="214" y="516" fill="#065f46" font-family="Arial, sans-serif" font-size="21">resultId = demo-request-42</text>
<rect x="182" y="634" width="486" height="142" rx="22" fill="#fff7ed" stroke="#ea580c" stroke-width="3"/>
<text x="214" y="680" fill="#9a3412" font-family="Arial, sans-serif" font-size="26" font-weight="700">Клиентский deadline истёк</text>
<text x="214" y="717" fill="#9a3412" font-family="Arial, sans-serif" font-size="21">response = not observed</text>
<text x="214" y="746" fill="#9a3412" font-family="Arial, sans-serif" font-size="21">не делаем вывод «эффекта нет»</text>
<rect x="182" y="864" width="486" height="142" rx="22" fill="#f5f3ff" stroke="#7c3aed" stroke-width="3"/>
<text x="214" y="910" fill="#4c1d95" font-family="Arial, sans-serif" font-size="26" font-weight="700">Попытка № 2</text>
<text x="214" y="947" fill="#4c1d95" font-family="Arial, sans-serif" font-size="21">requestId = req-52 — новый</text>
<text x="214" y="976" fill="#4c1d95" font-family="Arial, sans-serif" font-size="21">key тот же, payload hash тот же</text>
<rect x="182" y="1094" width="486" height="142" rx="22" fill="#f0fdf4" stroke="#16a34a" stroke-width="3"/>
<text x="214" y="1140" fill="#166534" font-family="Arial, sans-serif" font-size="26" font-weight="700">Replay сохранённого ответа</text>
<text x="214" y="1177" fill="#166534" font-family="Arial, sans-serif" font-size="21">decision = replay → status = 201</text>
<text x="214" y="1206" fill="#166534" font-family="Arial, sans-serif" font-size="21">effects = 1, resultId тот же</text>
<rect x="52" y="1302" width="616" height="56" rx="16" fill="#dbeafe"/>
<text x="360" y="1337" text-anchor="middle" fill="#1e3a8a" font-family="Arial, sans-serif" font-size="21" font-weight="700">Порядок событий важнее одного timeout</text>
</svg>