Server-Sent Events とは?
Server-sent events(SSE)は、1つの永続的な HTTP 接続上で server が client にテキストイベントの連続した列をストリームできるようにする標準です。通信は server から client への一方向で、browser の EventSource API が再接続を自動的に処理します。server のみが push する必要がある場合、WebSockets より簡単です。
なぜ重要か
SSE は完全な全二重プロトコルの複雑さなしに、進捗や通知のようなリアルタイム更新を配信します。通常の HTTP に乗るため、ほとんどの proxy や load balancer を通して、追加の設定はほとんどなく動作します。
関連ガイド
What Is Long Polling?Long polling holds a client request open until the server has data or a timeout passes, reducing empty respon…
What Is an HTTP Long Poll?An HTTP long poll is a single held-open HTTP request that the server answers only when data arrives or a time…
What Is an Edge Function?An edge function is small code that runs on a CDN edge close to the user, customizing requests and responses…