Files
progcode/web/public/assets/editorial/2018/http-timeout-budget-2018.svg
T
huncode 7c53ffe6bc
Build and deploy / deploy (push) Successful in 14s
revise July and August 2018 articles
2026-07-31 09:41:53 +03:00

67 lines
5.1 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" width="960" height="540" viewBox="0 0 960 540" role="img" aria-labelledby="title desc">
<title id="title">Бюджет времени для одного HTTP-запроса</title>
<desc id="desc">Шкала шести секунд: DNS и соединение ограничены полутора секундами, ожидание начала ответа и передача тела используют оставшийся общий лимит. Отдельно показано, что повтор возможен только после проверки семантики операции.</desc>
<defs>
<linearGradient id="back" x1="0" y1="0" x2="0" y2="1">
<stop offset="0" stop-color="#101c35"/>
<stop offset="1" stop-color="#14284a"/>
</linearGradient>
<filter id="shadow" x="-10%" y="-15%" width="120%" height="140%">
<feDropShadow dx="0" dy="8" stdDeviation="9" flood-color="#071226" flood-opacity=".28"/>
</filter>
</defs>
<rect width="960" height="540" rx="28" fill="url(#back)"/>
<text x="54" y="70" fill="#f7fbff" font-family="Arial, sans-serif" font-size="30" font-weight="700">Один запрос: сначала бюджет, затем cURL</text>
<text x="54" y="104" fill="#b9cce4" font-family="Arial, sans-serif" font-size="18">Пример для интеграции, которая должна закончиться не позже чем за 6 секунд</text>
<rect x="54" y="154" width="852" height="92" rx="16" fill="#0b162b" filter="url(#shadow)"/>
<rect x="74" y="176" width="105" height="48" rx="10" fill="#5f7eea"/>
<rect x="187" y="176" width="108" height="48" rx="10" fill="#37b4a1"/>
<rect x="303" y="176" width="202" height="48" rx="10" fill="#f3a348"/>
<rect x="513" y="176" width="162" height="48" rx="10" fill="#d96b7d"/>
<rect x="683" y="176" width="203" height="48" rx="10" fill="#5d8fc9"/>
<text x="94" y="205" fill="#fff" font-family="Arial, sans-serif" font-size="16" font-weight="700">DNS</text>
<text x="202" y="205" fill="#fff" font-family="Arial, sans-serif" font-size="16" font-weight="700">TCP/TLS</text>
<text x="329" y="205" fill="#172038" font-family="Arial, sans-serif" font-size="16" font-weight="700">запрос ушёл</text>
<text x="536" y="205" fill="#fff" font-family="Arial, sans-serif" font-size="16" font-weight="700">первый байт</text>
<text x="727" y="205" fill="#fff" font-family="Arial, sans-serif" font-size="16" font-weight="700">тело ответа</text>
<line x1="74" y1="278" x2="886" y2="278" stroke="#8ea9ca" stroke-width="3"/>
<g fill="#dbe9f8" font-family="Arial, sans-serif" font-size="15">
<text x="68" y="307">0 с</text>
<text x="196" y="307">1 с</text>
<text x="330" y="307">2 с</text>
<text x="464" y="307">3 с</text>
<text x="598" y="307">4 с</text>
<text x="732" y="307">5 с</text>
<text x="866" y="307">6 с</text>
</g>
<g stroke="#8ea9ca" stroke-width="2">
<line x1="74" y1="270" x2="74" y2="287"/>
<line x1="209" y1="270" x2="209" y2="287"/>
<line x1="344" y1="270" x2="344" y2="287"/>
<line x1="479" y1="270" x2="479" y2="287"/>
<line x1="614" y1="270" x2="614" y2="287"/>
<line x1="749" y1="270" x2="749" y2="287"/>
<line x1="886" y1="270" x2="886" y2="287"/>
</g>
<rect x="54" y="340" width="258" height="138" rx="16" fill="#1b335a" stroke="#5f7eea"/>
<text x="76" y="373" fill="#fff" font-family="Arial, sans-serif" font-size="19" font-weight="700">Connect: до 1,5 с</text>
<text x="76" y="405" fill="#c9dcf4" font-family="Arial, sans-serif" font-size="16">DNS, TCP и TLS входят</text>
<text x="76" y="429" fill="#c9dcf4" font-family="Arial, sans-serif" font-size="16">в эту фазу. Лимит общего</text>
<text x="76" y="453" fill="#c9dcf4" font-family="Arial, sans-serif" font-size="16">времени всё равно короче.</text>
<rect x="350" y="340" width="258" height="138" rx="16" fill="#45364b" stroke="#d96b7d"/>
<text x="372" y="373" fill="#fff" font-family="Arial, sans-serif" font-size="19" font-weight="700">Total: до 6 с</text>
<text x="372" y="405" fill="#f0d6dc" font-family="Arial, sans-serif" font-size="16">Останавливает всю передачу:</text>
<text x="372" y="429" fill="#f0d6dc" font-family="Arial, sans-serif" font-size="16">не только ожидание ответа,</text>
<text x="372" y="453" fill="#f0d6dc" font-family="Arial, sans-serif" font-size="16">но и соединение с ним.</text>
<rect x="646" y="340" width="260" height="138" rx="16" fill="#30405a" stroke="#f3a348"/>
<text x="668" y="373" fill="#fff" font-family="Arial, sans-serif" font-size="19" font-weight="700">Повтор: не по таймеру</text>
<text x="668" y="405" fill="#f9dfbc" font-family="Arial, sans-serif" font-size="16">Нужны метод, состояние</text>
<text x="668" y="429" fill="#f9dfbc" font-family="Arial, sans-serif" font-size="16">операции и оставшийся</text>
<text x="668" y="453" fill="#f9dfbc" font-family="Arial, sans-serif" font-size="16">бюджет времени.</text>
</svg>