Realtime
BetaHobby, Pro, ScaleHold WebSockets and SSE connections open while your backend sleeps at $0
Gregale terminates long-lived WebSocket and Server-Sent Events connections at the edge, handles heartbeats while your backend stays parked, and wakes your app only when messages arrive or you broadcast.
Create a managed realtime endpoint and broadcast from anywhere
Holding idle WebSockets inside your own backend forces at least one instance to remain running around the clock. Gregale Managed Realtime decouples persistent socket termination from your application compute so clients stay connected for hours while you pay only for actual request handling.
# Create an endpoint backed by your app callbacks (pipe secret via stdin)
printf '%s\n' "$CALLBACK_TOKEN" | gregale realtime create my-app \
--callback-url https://my-app.example.com \
--callback-auth-token-stdin
# Publish to a channel from your backend, CI job, or CLI without holding sockets
gregale realtime publish my-app <endpoint-id> notifications --data '{"status":"ready"}'
Key capabilities
Heartbeats handled while parked
Clients connect to wss://<your-app-host>/__gregale/realtime/<endpoint-id> over WebSocket or HTTPS SSE. Gregale maintains heartbeats while your app stays at zero resident RAM.
Wake-on-message callbacks
Incoming client messages and connection lifecycle hooks invoke your backend over HTTP callbacks; once processed, the app parks again after its idle timeout.
Zero-connection backend broadcasts
Publish to channels or send directly to a connection via the Node/Python/Go SDKs, REST API, or CLI from short-lived handlers or background jobs.
Explicit trade-off vs. direct WebSockets
Self-terminated WebSockets (--websocket-enabled) remain available when sockets must terminate inside the app, whereas Managed Realtime maximizes savings on long, sparse connections.
Typical PaaS vs. Gregale
| Capability | Typical PaaS | Gregale |
|---|---|---|
| Idle client WebSocket connections | Keeps app container running and billed 24/7 | Held by Gregale edge while app stays parked at $0 |
| Client transport support | Separate third-party realtime SaaS required for sleep | Built-in WebSocket and HTTPS Server-Sent Events |
| Fan-out publish from serverless jobs | Requires Redis pub/sub + dedicated socket fleet | Single SDK/API/CLI publish call wakes zero extra servers |
Deep-dive guides (3)
Hold WebSocket and SSE connections while your backend scales to zero
Gregale managed realtime holds client WebSocket and SSE sockets plus heartbeats at the edge while your backend microVM parks at zero billed compute, waking only on client messages or publishes. Core endpoints are in beta on every paid plan; resumable v2, history and channel rules are in per-account preview.
Scale to zero without slow cold starts
Gregale scales idle apps to zero without booting them again: an app pauses in memory about a second after its last request and resumes in about a millisecond, and after 10 minutes it parks as a memory snapshot that wakes with its process already running.
Hard cloud spend caps that actually stop runaway bills
Every paid Gregale plan enforces a hard monthly overage cap from day one (Hobby $10 default, Pro $50, Scale $150), stopping compute at the ceiling with HTTP 402 instead of alerting after a runaway loop or DDoS spike racks up charges.
Related benchmarks & studies
Runnable starters & integrations (1)
Browse all templatesDocumentation references
Questions
- Which parts of Managed Realtime are Beta today vs. Preview?
Realtime endpoints, WebSocket and SSE connections held while your app is parked, callbacks, live publish, direct/principal send, connection operations, and fair-use limits are Beta on every paid plan. Retained history/resumable protocol, presence, occupancy, tickets, and worker groups are per-account Preview.
- Does holding 1,000 open WebSocket clients bill compute on my app?
No app compute is billed while your app is parked and connections are idle because Gregale handles heartbeats at the realtime edge. Your app is billed only during active callbacks or backend requests.
- What if I want to handle raw WebSocket frames directly inside my app process?
You can still enable --websocket-enabled on the app directly. Keep in mind those sockets terminate inside your running VM, which keeps that instance active and billed while connections stay open.