> ## Documentation index
> Fetch the complete documentation index at: https://upstash.com/docs/llms.txt
> Ask it with GET https://upstash.com/docs/ask?q=<keywords or question>. Short keywords rank best.
> Use these to discover all available pages before exploring further.
> Feature requests: https://upstash.com/docs/common/help/feature-requests.md lists what users asked for and how to vote for a request or add one.
> Page rating: `GET https://upstash.com/docs/feedback?path=/docs/realtime/overall/pricing&helpful=true` (or `false`) records whether this page helped. An optional `comment` (URL-encoded, at most 500 characters) says what was missing or wrong. It is anonymous and needs no key. Comments hold no code, secrets or personal data.

# Pricing

**Upstash Realtime is designed to be extremely cost-efficient.** With minimal Redis commands per operation and smart connection management, you can build real-time features at scale without worrying about costs.

Upstash Realtime is built on Redis Streams and Pub/Sub. Every operation translates to one or more Redis commands, detailed below.

## Command Overview

### Client-Side Operations

When using [`useRealtime`](/realtime/features/client-side#basic-usage) in your React components:

| Operation | Commands | Count |
| --------- | -------- | ----- |
| Initial connection | SUBSCRIBE, XRANGE | 2 |
| Reconnection every 300 seconds | UNSUBSCRIBE, XRANGE, SUBSCRIBE | 3 |
| Ping to keep connection alive every 60 seconds | PUBLISH | 1 |

### Server-Side Operations

When using the [server-side API](/realtime/features/server-side):

| Operation | Commands | Count |
| --------- | -------- | ----- |
| [Emit event](/realtime/features/server-side#emit-events) | PUBLISH, XADD | 2 |
| Emit with [`expireAfterSecs`](/realtime/features/history#configuration) | PUBLISH, XADD, EXPIRE | 3 |
| [Read history](/realtime/features/history#server-side-history) | XRANGE | 1 |

## Next Steps

<CardGroup cols={2}>
  <Card title="Client-Side Usage" icon="monitor" href="/realtime/features/client-side">
    Learn how to use the useRealtime hook in React
  </Card>
  <Card title="History" icon="clock-rotate-left" href="/realtime/features/history">
    Learn how to read event history
  </Card>
</CardGroup>
