# 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#param-expire-after-secs) | 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="browser" 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>
