Skip to main content

What is Pulse


Prisma Pulse facilitates the implementation of event-driven workflows and architectures by providing managed infrastructure that captures databases events and distributes them to your applications.

It lets you subscribe to any changes happening in your database using Prisma Client to power real-time use cases in your applications, such as:

  • chat and messaging
  • sending onboarding emails
  • data syncing (e.g. into a search index)
  • social collaboration
  • notifying users
  • updating inventories
  • managing payments
  • live games, quizzes and polls
  • ... and many other functionalities that require real-time updates

Prisma Pulse integrates with Prisma ORM and lets you subscribe to database changes easily and in a type-safe way using Prisma Client.

Here's the brief overview of how Pulse works:

1. Stream database change events with Prisma Client

In your application, use Prisma Client to stream all changes that are happening on the User table from the database:

// stream all changes from the `User` table
const stream = await;

// wait for new events to arrive
for await (let event of stream) {
// log the details about an event to the terminal
console.log(`Something happened in the database: `);

2. A database event happens

A change is made to the table we've previously subscribed to. In this case, a new row is added to the User table.

This change can happen from anywhere: the same app that uses Prisma Client to subscribe to changes, a different application or microservice, a database GUI, Prisma Studio, or any other SQL client (like psql).

3. The database event is propagated to all subscribers

Prisma Pulse propagates the event to all subscribers. In this case, the application from step 1. receives the event and logs its value to the terminal:

Something happened in the database:
"action": "create",
"created": {
"id": 1,
"email": "",
"name": "test"

Why Prisma Pulse?

Building real-time functionality based on changes that occur in your database can be very complicated. Common approaches like polling, implementing application-level updates or using additional infrastructure (like Apache Kafka or RabbitMQ) either don't scale, are very costly or come with substantial development and maintenance overhead.

Instead, Prisma Pulse is based on the idea of unidirectional data flow which is implemented via Change Data Capture (CDC). CDC gets rid of the deficiencies of the previously mentioned approaches and solves the problem of reacting to database events in a robust and elegant manner.

Here is an overview of the main features Prisma Pulse provides:

  • Reacting to database changes with type-safe model subscriptions
  • Unidirectional data flow via Change Data Capture
  • Great DX integrated with usage of Prisma ORM (easy setup, development and maintenance)
  • Works with your existing database
  • Insights dashboard lets you view and understand all database events captured by Pulse
  • Enable, disable and manage Pulse via the Platform CLI

How does Prisma Pulse work?

Prisma Pulse uses CDC to efficiently observe and capture database changes as they occur. By monitoring the database's transaction log (e.g. the Write-Ahead-Log in PostgreSQL), Prisma Pulse identifies database change events like inserts, updates, and deletes without impacting the database's performance.

The captured events are processed, evaluated, and distributed to all Prisma Client instances that subscribed to them:

What is Pulse

What can you build with Prisma Pulse?

Prisma Pulse can power real-time functionality like chat, notifications, data broadcast, data synchronization, and more. It's ideal for ensuring data consistency in distributed systems, enhancing real-time user experiences.

Prisma Pulse use-cases

Example projects

Here are a few example projects using Prisma Pulse:

starterMinimal Pulse starter project
email-with-resendSend onboarding emails to new users via Resend
fullstack-leaderboardA live leaderboard (built with Next.js)
fullstack-simple-chatA simple chat app (built with Next.js & Express)
cron-job-data-sync-with-typesenseA cron job that syncs data into Typesense (built with Hono.js)