Realtime

Live updates, broadcast and presence over one connection

Update dashboards, share cursors and show who is online over one WebSocket. Postgres changes follow each user’s row-level access policies.

Realtime product screenshot
realtime
volcano cloud config deployrealtime  enabled · broadcast · presence · postgres_changes✓ wss://…/realtime/v1/websocket ready# then, in the browserchannel.onPostgresChanges('INSERT', 'public', 'cards', render)INSERT public.cards  { id: 'c_18f…', title: 'Ship it' }# subscribers only receive rows their policies already allow
Overview

Stop polling for changes

A live dashboard needs to know when data changes. A shared workspace also needs cursor updates and a list of people online. Polling means every open screen keeps asking the server whether anything changed.

Volcano handles all three: Postgres subscriptions for row changes, broadcast for messages between connected clients, and presence for the online roster. Build them into your app through the SDK without running a separate WebSocket server.

Connections

One connection for every channel on the page

Put tables, cursors and presence on separate channels over one WebSocket, and let the SDK handle reconnection.

  • 100 channels per connection on Hobby; 500 on Superagent
  • Postgres changes, broadcast and presence together
  • Automatic reconnection with backoff
one client, five subscriptions
postgres:public:cards        subscribedpostgres:public:comments     subscribedbroadcast:board-42-cursors   subscribedbroadcast:board-42-typing    subscribedpresence:board-42            subscribed · 7 here✓ sockets open: 1
Setup

Subscribe without a change-capture pipeline

Enable realtime, grant table access and subscribe. Volcano installs database triggers on the first subscription, then uses Postgres LISTEN/NOTIFY to send changes.

  • Use a table with a primary key
  • Enable row-level security for filtering
  • Listen for one event type or all
volcano.dev/dashboard/realtime
Realtime settings with change streams, broadcast and presence enabled
Authorization

Reuse your Postgres read policies

Volcano checks each user’s row-level security read policies before delivering a Postgres change event, so subscribers only see rows they can read.

  • Postgres events filtered per subscriber
  • Broadcast and presence use project-level access
  • Service keys bypass RLS; keep them server-side
one UPDATE, two subscribers
# update cards set title = '…' where id = 'c_18f…'ada   (member of the board)   → UPDATE deliveredcleo  (not a member)          → nothingsame policy as select, applied to the stream
Capabilities

Build live features into your app

Postgres change streams

Get inserts and updates on user subscriptions. Deletes go to service-key subscriptions only.

Broadcast

Send cursors and typing indicators to connected subscribers without storing messages.

Presence

Show the channel’s online roster, updated on joins and departures.

Row-level access

Filter Postgres events through each user’s existing read policies.

Shared WebSocket

Subscribe to multiple channels through one realtime client.

Configured in volcano-config.yaml

Turn on realtime features in config and apply them with the CLI.

Code

Connect, subscribe, publish

TypeScript
import { VolcanoRealtime } from '@volcano.dev/sdk/realtime'; const realtime = new VolcanoRealtime({ apiUrl: process.env.NEXT_PUBLIC_VOLCANO_API_URL!, anonKey: process.env.NEXT_PUBLIC_VOLCANO_ANON_KEY!, accessToken: volcano.accessToken, // With a client and a database, the SDK fetches the changed row for you. volcanoClient: volcano, databaseName: 'app', }); await realtime.connect(); // A Postgres channel is named after the table it streams: schema:table. const cards = realtime.channel('public:cards', { type: 'postgres' }); cards.onPostgresChanges('*', 'public', 'cards', (change) => { // change: { type, schema, table, id, record?, timestamp }. The notification // carries the primary key; record is the fetched row, when the fetch worked. if (change.record) { upsertCard(change.record); } else { refetchCard(change.id); } }); await cards.subscribe();
Use cases

What people make live

presence on board-42
presence_sync   ada · bob · cleopresence_sync   ada · bob · cleo · danapresence_sync   ada · cleo · dana# bob closed his laptop — no heartbeat code involvedroster maintained by Volcano
Platform

Works with the rest of Volcano

Databases and vector
  • Postgres updates in your UI

    Subscribe to table changes using the same read policies that protect your data.

Authentication
  • Auth sessions for subscribers

    Connect with a user’s session token to identify them for presence and row filtering.

Functions and agents
  • Functions that report progress

    Broadcast updates from a running function to subscribed clients.

Next.js frontends
  • Live Next.js components

    Use the realtime SDK in a Next.js client component to update the page.

Frequently asked questions

Read the docs
How do I subscribe to Postgres changes in realtime?

Subscribe to a schema:table channel with the Volcano SDK after enabling realtime and granting table access. Volcano installs triggers automatically, so there is no change-capture pipeline to configure.

Does realtime respect Postgres row-level security?

Yes, Postgres events are filtered using each user’s SELECT policies. Broadcast and presence use project-level access instead, so those policies do not make a broadcast channel private.

What is the difference between broadcast and Postgres changes?

Postgres subscriptions notify clients about table writes; broadcast sends messages directly to connected subscribers without storing them. Neither is a durable change log: re-fetch database rows after reconnecting to catch missed changes.

How many realtime channels can one WebSocket carry?

One WebSocket carries up to 100 channels on Hobby or 500 on Superagent. Postgres, broadcast and presence channels share that connection.

What does a Postgres change event contain?

The notification contains the event type, schema, table, primary key and timestamp. With a Volcano client, database name and primary key named id, the SDK can fetch the current row for inserts and updates. Previous row values are omitted, and delete events go to service-key subscriptions only.

How do I enable realtime on Volcano?

Set the realtime block in volcano-config.yaml and run volcano cloud config deploy. Connect browser clients with a user token and an anon key carrying realtime.connect, realtime.subscribe and, for broadcasting, realtime.publish permissions.

Add live updates to your app

Build, deploy, and scale on Volcano's global platform — free to start, with no infrastructure to manage.

Checkout more features