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

57 lines
5.9 KiB
XML
Raw Permalink 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 1360" role="img" aria-labelledby="title desc">
<title id="title">Путь одной заявки при потерянном HTTP-ответе</title>
<desc id="desc">Вертикальная схема показывает один пользовательский intent с ключом идемпотентности: первая попытка сохраняет результат, ответ теряется, повтор использует тот же ключ и получает сохранённый результат без второго эффекта.</desc>
<rect width="720" height="1360" fill="#f8fafc"/>
<rect x="28" y="26" width="664" height="112" rx="24" fill="#0f172a"/>
<text x="62" y="72" fill="#f8fafc" font-family="Arial, sans-serif" font-size="32" font-weight="700">Один intent, две доставки</text>
<text x="62" y="108" fill="#cbd5e1" font-family="Arial, sans-serif" font-size="20">Timeout не отменяет эффект на сервере</text>
<line x1="360" y1="306" x2="360" y2="362" stroke="#64748b" stroke-width="8" stroke-linecap="round"/>
<path d="M342 350 L360 374 L378 350" fill="none" stroke="#64748b" stroke-width="8" stroke-linecap="round" stroke-linejoin="round"/>
<line x1="360" y1="548" x2="360" y2="604" stroke="#64748b" stroke-width="8" stroke-linecap="round"/>
<path d="M342 592 L360 616 L378 592" fill="none" stroke="#64748b" stroke-width="8" stroke-linecap="round" stroke-linejoin="round"/>
<line x1="360" y1="790" x2="360" y2="846" stroke="#64748b" stroke-width="8" stroke-linecap="round"/>
<path d="M342 834 L360 858 L378 834" fill="none" stroke="#64748b" stroke-width="8" stroke-linecap="round" stroke-linejoin="round"/>
<line x1="360" y1="1032" x2="360" y2="1088" stroke="#64748b" stroke-width="8" stroke-linecap="round"/>
<path d="M342 1076 L360 1100 L378 1076" fill="none" stroke="#64748b" stroke-width="8" stroke-linecap="round" stroke-linejoin="round"/>
<rect x="52" y="166" width="616" height="140" rx="22" fill="#e0f2fe" stroke="#0284c7" stroke-width="3"/>
<circle cx="96" cy="216" r="25" fill="#0284c7"/>
<text x="96" y="225" text-anchor="middle" fill="#ffffff" font-family="Arial, sans-serif" font-size="23" font-weight="700">1</text>
<text x="138" y="215" fill="#0c4a6e" font-family="Arial, sans-serif" font-size="27" font-weight="700">Пользователь подтверждает заявку</text>
<text x="138" y="250" fill="#164e63" font-family="Arial, sans-serif" font-size="21">Клиент создаёт key для одного intent</text>
<text x="138" y="278" fill="#164e63" font-family="Arial, sans-serif" font-size="21">payload и общий deadline сохраняются рядом</text>
<rect x="52" y="382" width="616" height="166" rx="22" fill="#eff6ff" stroke="#2563eb" stroke-width="3"/>
<circle cx="96" cy="435" r="25" fill="#2563eb"/>
<text x="96" y="444" text-anchor="middle" fill="#ffffff" font-family="Arial, sans-serif" font-size="23" font-weight="700">2</text>
<text x="138" y="432" fill="#1e3a8a" font-family="Arial, sans-serif" font-size="27" font-weight="700">Попытка № 1</text>
<text x="138" y="467" fill="#1e3a8a" font-family="Arial, sans-serif" font-size="21">POST + один Idempotency-Key</text>
<rect x="138" y="487" width="382" height="37" rx="12" fill="#dbeafe"/>
<text x="156" y="513" fill="#1d4ed8" font-family="Arial, sans-serif" font-size="20" font-weight="700">key: demo-key-retry-2020-06-a7f1</text>
<rect x="52" y="624" width="616" height="166" rx="22" fill="#ecfdf5" stroke="#059669" stroke-width="3"/>
<circle cx="96" cy="677" r="25" fill="#059669"/>
<text x="96" y="686" text-anchor="middle" fill="#ffffff" font-family="Arial, sans-serif" font-size="23" font-weight="700">3</text>
<text x="138" y="674" fill="#065f46" font-family="Arial, sans-serif" font-size="27" font-weight="700">Сервис завершает одну операцию</text>
<text x="138" y="709" fill="#065f46" font-family="Arial, sans-serif" font-size="21">Хранит key, hash, status и result ID</text>
<text x="138" y="738" fill="#065f46" font-family="Arial, sans-serif" font-size="21">Эффект: demo-request-42</text>
<rect x="52" y="866" width="616" height="166" rx="22" fill="#fff7ed" stroke="#ea580c" stroke-width="3"/>
<circle cx="96" cy="919" r="25" fill="#ea580c"/>
<text x="96" y="928" text-anchor="middle" fill="#ffffff" font-family="Arial, sans-serif" font-size="23" font-weight="700">4</text>
<text x="138" y="916" fill="#9a3412" font-family="Arial, sans-serif" font-size="27" font-weight="700">Клиент не увидел ответ</text>
<text x="138" y="951" fill="#9a3412" font-family="Arial, sans-serif" font-size="21">Timeout = неизвестный исход для клиента</text>
<text x="138" y="980" fill="#9a3412" font-family="Arial, sans-serif" font-size="21">Не означает rollback у сервиса</text>
<rect x="52" y="1108" width="616" height="166" rx="22" fill="#f5f3ff" stroke="#7c3aed" stroke-width="3"/>
<circle cx="96" cy="1161" r="25" fill="#7c3aed"/>
<text x="96" y="1170" text-anchor="middle" fill="#ffffff" font-family="Arial, sans-serif" font-size="23" font-weight="700">5</text>
<text x="138" y="1158" fill="#4c1d95" font-family="Arial, sans-serif" font-size="27" font-weight="700">Повтор с тем же key</text>
<text x="138" y="1193" fill="#4c1d95" font-family="Arial, sans-serif" font-size="21">Сервис читает terminal result</text>
<text x="138" y="1222" fill="#4c1d95" font-family="Arial, sans-serif" font-size="21">Replay 201: demo-request-42, без второго effect</text>
<rect x="52" y="1300" width="616" height="38" rx="14" fill="#dbeafe"/>
<text x="360" y="1327" text-anchor="middle" fill="#1e3a8a" font-family="Arial, sans-serif" font-size="20" font-weight="700">Повтор безопасен только в одном scope и в окне хранения key</text>
</svg>