Перейти до основного вмісту
🔒 Режим прев'ю. Перші 15 уроків Foundations — безкоштовні; цей — Pro. Запусти 7-денний trial щоб відкрити редактор, AI-підказки і решту курсу. Потрібна картка, скасування в Dashboard у будь-який момент.
Почати 7-денний trial →
⚡
← Курси
›
FastAPI Production
›
Модуль 5 · Розгортання виробництва та можливість спостереження
›
SSE та потокові відповіді
quiz
69 / 105
🇺🇦
UA
▼
↗
Поділитись
⋯
Ще
+100 XP
📋
Завдання
📖
Теорія
🤖
AI Допомога
Завдання
🌐 shown in EN
📝 **Question:** Why send keepalive lines on an SSE stream? 📋 Pick the right answer. 💡 **Hint:** Re-read the theory above if unsure.
🎯 Тест
Питання
📝 **Question:** Why send keepalive lines on an SSE stream? 📋 Pick the right answer. 💡 **Hint:** Re-read the theory above if unsure.
A
Browsers require a comment line at least every 30 seconds or they will close the EventSource connection with a network error, so the comment is purely a client-side compatibility requirement
B
Proxies (nginx, ALB, Cloudflare) close idle HTTP connections after 30-60s of silence
C
The SSE specification mandates a colon-prefixed line as the wire-level heartbeat — without it, conforming clients refuse to dispatch any events at all to the application layer above the parser
D
It exists only to make traffic visible during debugging — without periodic comments you can't tell whether the stream is healthy or just quiet, but production code can safely omit it entirely
Відповісти
💬
Зв'язатися з підтримкою