Skip to main content

one-way realtime delivery

Server-Sent Events

Server-Sent Events

Also known as · SSE · EventSource · server events

Definition

A contract where a server keeps an HTTP connection open and sends text events to a client in one direction. Separate the wake-up signal from business data and define a reconnect cursor.

Searchable examples

  • Content-Type: text/event-stream
  • Last-Event-ID: 42

Short example

event: room.message
id: 42
data: {"type":"room.message","version":1}

After a disconnect, catch up from the DB cursor; keep the stream as a bounded wake-up signal.

Compare with

Related notes