Publish once✦
Stream changes✦
Reconnect safely✦
Fall back locally✦
See it live
connected
event: flag_updated
event: config_updated
event: flag_updated
event: ai_updated
How realtime works
1
Toggle in dashboard
Toggled ON just now
2
PubSub broadcasts
broadcasting...
3
Clients update instantly
event
flag_updated
data
"key"
"new-checkout"
The Problem
Polling wastes bandwidth
and adds latency.
The Solution
Push, don't poll.
Millisecond updates.
connected
constnew EventSource
"https://flagdash.io/api/v1/sse"
"Authorization""Bearer sk_your_api_key"
// Flag changed in dashboard
addEventListener"flag_updated"=>
constJSONparse
log
Realtime