Skip to main content
Deploy Upstash Realtime to providers that bill based on active CPU time. Great places to deploy are
  • Vercel with Fluid Compute enabled
  • Cloudflare
  • Railway
  • A personal VPS
  • any other service that does not bill based on connection duration.

Deploying to Vercel

To deploy Upstash Realtime to Vercel, enable Fluid Compute for your project. For new projects, this is enabled by default. Fluid Compute allows for less cold-starts, has much higher function timeouts compared to serverless functions, and most importantly only bills for active CPU time. That way, you’re only billed for actual message processing time, not connection duration.

Billing Example

Traditional serverless connection billing:
Serverless Billing
Connection duration: 5 minutes
Billing: 5 minutes = $$$
Upstash Realtime with fluid compute:
Fluid Compute Billing
Connection duration: 5 minutes
Active processing: 2 seconds
Billing: 2 seconds x CPU cost = $

Automatic Reconnection

The client automatically reconnects before your function timeout:
page.tsx
"use client"

import { useRealtime } from "@upstash/realtime/client"
import { RealtimeEvents } from "@/lib/realtime"

export default function Component() {
  // 👇 'connecting' | 'connected' | 'reconnecting' | 'disconnected'
  const { status } = useRealtime<RealtimeEvents>({
    event: "notification.alert",
    onData: (data, channel) => {}
  })

  return <p>Status: {status}</p>
}

Message Delivery Guarantee

Upstash Realtime is powered by Redis Streams, so no message is ever delivered twice or gets lost. Every message is guaranteed to be delivered exactly once.
  1. Client establishes connection and subscribes to stream
  2. Client initiates reconnection before function timeout (default every 5 mins)
  3. Redis auto-replays all messages sent during reconnect
I