Skip to content

Realtime

Tested with: Not yet available on Databasezy · describes the launch design

Realtime lets clients exchange messages, share who is online and receive database changes over a WebSocket at /realtime/v1/websocket on the project endpoint.

  • Broadcast: low-latency messages to everyone on a channel, fanned out in the region that runs the project.
  • Presence: a shared, conflict-free list of who is connected to a channel and their state.
  • Postgres changes: inserts, updates and deletes from the tables you publish, read from a logical replication slot on the primary database. Postgres evaluates each subscriber’s row-level security against every changed row, so a client never receives a row it could not select.
  • Connections are authorised with a publishable key or a user’s session token; the protocol follows realtime-js, so supabase.channel() works against your endpoint.
Terminal window
curl -X POST "https://<ref>.us-east.databasezy.com:8443/realtime/v1/api/broadcast" \
-H "apikey: <publishable-key>" \
-H "Authorization: Bearer <publishable-key>" \
-H "Content-Type: application/json" \
-d '{"messages":[{"topic":"room-1","event":"message","payload":{"text":"hi"}}]}'
Postgres changes with supabase-js
supabase
.channel("todos")
.on("postgres_changes", { event: "INSERT", schema: "public", table: "todos" }, (msg) => console.log(msg.new))
.subscribe();
Platform usage prices and the allowance each plan includes per month
Meter Price FreeSoloTeamEnterprise
Realtime messages Coming soon $2.50 per million 500K5M50MContract
Realtime peak connections Coming soon $10 per 1,000 a month 50 peak500 peak2,000 peakContract
Platform limits on each plan
Limit FreeSoloTeamEnterprise
Realtime connections per project Coming soon 5010,00050,000Unlimited
Realtime messages per second Coming soon 1005002,500Unlimited