---
source_url: https://www.pubnub.com/docs
title: What is PubNub?
updated_at: 2026-09-30T14:10:53.000Z
---

# What is PubNub?

## Documentation index

To discover more PubNub resources:

1. Fetch [PubNub's llms.txt](https://www.pubnub.com/llms-full.txt) for a list of available pages in Markdown format.
2. Identify relevant URLs from that index.
3. Fetch the target pages.

Do not assume a path exists, always check the index first.

PubNub is the **global infrastructure for building real-time, interactive applications**. It provides a global network that routes messages between applications and connected clients, so you don't have to operate the underlying real-time messaging infrastructure. The PubNub network has carried production traffic since 2012 and connects 1B+ devices.

Your app connects to PubNub through PubNub SDKs or REST APIs. Access Manager authorizes access to Pub/Sub, the core that the other capabilities build on: Presence, data storage, analytics, logic, and integrations. Integrations then carry PubNub activity out to external systems such as APNs, FCM, Kafka, SQS, S3, and webhooks.

## Latency

Publish-processing latency, the time PubNub takes to accept and acknowledge a publish request, is about 0.5 ms within the same region. Inside one region, PubNub adds less than 500 µs to a message between ingestion and the moment it's ready for delivery to subscribers, not counting network transit, as measured by PubNub's same-region latency monitoring. The live subscribe path is at-most-once on a stable connection. PubNub commits to a 99.999% uptime SLA on Enterprise plans, which allows about 5 minutes of downtime per year.

## How pub/sub works

At the center of PubNub is the publish/subscribe (pub/sub) model. Clients use PubNub [SDKs](https://www.pubnub.com/docs/sdks.md) to publish messages to channels and subscribe to them to receive messages.

Other PubNub capabilities build on this model to track connected users, retain data, process messages, control access, and connect PubNub to external systems. For how those capabilities fit together, refer to [How PubNub capabilities fit together](#how-pubnub-capabilities-fit-together).

Every PubNub application uses a keyset that identifies it to the PubNub network. A keyset contains a publish key, a subscribe key, and optionally a secret key. You create and manage keysets in the [Admin Portal](https://admin.pubnub.com). Client SDKs use the publish and subscribe keys. A server-side SDK instance that issues [Access Manager](https://www.pubnub.com/docs/security/access-control/overview.md) tokens also requires the secret key, which never appears in client-facing code.

A channel is a named pathway through which clients exchange messages.
PubNub routes a message published to a channel to every client currently subscribed to that same channel, and to nobody else.

Channels are created implicitly the first time they are used and do not require provisioning, which allows applications to create channel names dynamically as their communication patterns change.

A single SDK connection can subscribe to multiple channels simultaneously. The same SDK instance can both publish messages and receive messages from its subscriptions.

For example, a chat application might use one channel for each conversation. Participants subscribe to the channels for conversations they belong to and publish messages to those same channels. PubNub handles routing each message to the appropriate connected subscribers.

For a detailed model of channels, messages, User IDs, timetokens, tokens, and memberships, refer to [Core concepts](https://www.pubnub.com/docs/architecture/core-concepts.md).

## How PubNub capabilities fit together

Pub/sub provides the foundation for communication between clients. Other PubNub capabilities extend this model with information about participants, message history, application data, processing, security, and integrations.

Your application talks to PubNub through an SDK. Pub/Sub is the core that every other capability builds on. Access Manager and TLS secure everything inside the network, and integrations carry PubNub activity out to the systems you already run.

### Messaging

[Pub/Sub](https://www.pubnub.com/docs/pub-sub/overview.md) is the primary way applications exchange real-time data through PubNub. [Publish](https://www.pubnub.com/docs/pub-sub/publish/overview.md) sends a message to a channel and returns a timetoken that identifies it across the network. [Subscribe](https://www.pubnub.com/docs/pub-sub/subscribe/overview.md) receives messages on as many channels as your application needs, over one connection.

Messages carry application data and can optionally be stored for later retrieval. For lightweight, transient updates such as typing indicators, applications can use [signals](https://www.pubnub.com/docs/pub-sub/publish/send-different-message-types.md) instead. Signals aren't stored and are cheaper than messages, which makes them a good fit for information that is useful only at the moment it is sent.

Applications can also assign [custom message types](https://www.pubnub.com/docs/pub-sub/publish/send-different-message-types.md) to categorize different kinds of traffic that share a channel, so subscribers can branch on the type without inspecting the payload.

[Message Actions](https://www.pubnub.com/docs/pub-sub/message-actions/overview.md) attach metadata to a message that is already published, such as a reaction, an edit marker, or a read or delivery receipt. Because the action is stored against the original message, features like read receipts and emoji reactions need no separate channel and no bookkeeping in your own database.

### Presence

While Pub/Sub tells your application what is happening on a channel, [Presence](https://www.pubnub.com/docs/presence/overview.md) helps it understand who is currently participating.

Presence observes subscriptions and generates [presence events](https://www.pubnub.com/docs/presence/presence-events.md), such as join, leave, and timeout, as User IDs connect to and disconnect from channels. Your application learns about arrivals and departures without polling. You can also query [occupancy](https://www.pubnub.com/docs/presence/occupancy.md) to count who is on a channel right now. Attach [presence state](https://www.pubnub.com/docs/presence/set-and-get-presence-state.md) to associate short-lived data, such as a status or a location, with a user's presence on a channel.

This makes Presence useful for experiences such as online indicators, participant counts, and awareness of who is currently active.

### Data storage

Real-time delivery handles what is happening now, but applications often also need access to previous messages and information about the entities participating in those interactions.

[Data storage](https://www.pubnub.com/docs/data-storage/overview.md) provides four complementary capabilities:

* [Message Persistence](https://www.pubnub.com/docs/data-storage/message-history/overview.md) stores published messages so applications can retrieve previous activity, with configurable retention. It is also what lets a client recover messages it missed while offline.
* [File Sharing](https://www.pubnub.com/docs/data-storage/files/overview.md) extends messaging to files. Files are associated with channels. Sending a file also generates a message event for subscribers, so an image or document arrives on the same channel as the conversation around it.
* [App Context](https://www.pubnub.com/docs/data-storage/metadata/overview.md) stores structured metadata about users, channels, and the relationships between them. Common application data, such as profiles, channel names, and memberships, doesn't require a database of your own.
* [DataSync](https://www.pubnub.com/docs/data-storage/structured-data/overview.md) is the successor to App Context. It stores entities and relationships against typed schemas you define, synchronizes changes to every connected client in real time, and adds field-level access control through projections.

### Analytics

[Analytics](https://www.pubnub.com/docs/analytics/overview.md) provides visibility into the activity generated by your PubNub applications:

* [Usage dashboards](https://www.pubnub.com/docs/analytics/usage-dashboards/overview.md) (PubNub Insights) show usage such as monthly active users and transaction consumption, so you can see what your account is consuming before it appears on an invoice.
* [Operational dashboards](https://www.pubnub.com/docs/analytics/operational-dashboards.md) provide visibility into real-time channel and connection activity, which is where you look first when debugging a live application.
* [Decisions](https://www.pubnub.com/docs/analytics/decisions/overview.md) (powered by Illuminate) lets you query real-time data and build business logic that responds to patterns and events in it. You don't need to move the data into a warehouse first.

### Message processing

[Functions](https://www.pubnub.com/docs/message-processing/serverless/overview.md) let you run serverless JavaScript in response to events passing through the PubNub network. Because a Function runs inside the network rather than on a server you operate, logic that every client depends on ships once and applies to all of them.

Functions can transform message payloads, validate data, call external services, or trigger additional behavior without requiring that processing to happen in a client application. [Auto Moderation](https://www.pubnub.com/docs/message-processing/moderation/overview.md) builds on this processing model to inspect messages and mask defined words or detect spam before messages reach their destination, so moderation is configured rather than coded.

### Security

Applications often need different users to have different levels of access to channels and other resources.

[Access Manager](https://www.pubnub.com/docs/security/access-control/overview.md) provides this authorization layer. Your server grants permissions using signed, time-limited tokens, and clients use those tokens when interacting with PubNub resources.

Token generation requires a secret key.

The secret key grants privileged access to your PubNub application. It must remain on a trusted server and must never be included in client applications.

Communication between SDKs and PubNub is protected with TLS by default. Applications that need PubNub itself to be unable to read payloads can add [end-to-end encryption](https://www.pubnub.com/docs/security/encryption/overview.md), which encrypts messages and files on the client before they are published.

The [audit log](https://www.pubnub.com/docs/security/audit-log.md) records administrative activity on your account, so changes to keysets, permissions, and members are traceable after the fact.

### Integrations

PubNub applications often need to communicate with systems outside the real-time PubNub network:

* [Mobile Push Notifications](https://www.pubnub.com/docs/integrations/mobile-push-notifications/overview.md) bridge real-time messaging with APNs and FCM so applications can reach mobile devices through native push notifications when users are not connected.
* [Events & Actions](https://www.pubnub.com/docs/integrations/event-forwarding/overview.md) sends PubNub events to external infrastructure such as Kafka, SQS, Kinesis, S3, and webhooks, so activity in PubNub becomes part of your other application and data-processing workflows. You configure forwarding on your keyset rather than build it.
* The [Kafka connectors](https://www.pubnub.com/docs/integrations/kafka-overview.md) connect an existing Kafka deployment to PubNub in both directions, so a backend that already publishes to Kafka can reach connected clients without new client-side code.

## SDKs and APIs

PubNub maintains more than 50 SDKs, covering web, server, mobile, game engine, and embedded platforms, so the platform you build on is a choice you make rather than a constraint PubNub imposes. For the full list with current versions and install commands, refer to [Available SDKs](https://www.pubnub.com/docs/getting-started/available-sdks.md).

## Pricing

A free PubNub account covers up to 200 monthly active users (MAUs) or 1 million transactions at no cost, whichever limit you reach first. A Testing keyset on that free account gives you access to Pub/Sub, Presence, Data storage, and Functions, so you can build and try a real application before paying for anything. Creating a Production keyset requires at least the Starter plan. Testing keysets are rate-limited and aren't suitable for live traffic. Some capabilities, such as Auto Moderation and Event Forwarding, require a paid plan even for testing.

For pricing details, refer to [Pricing](https://www.pubnub.com/pricing).

## Next steps

Now that you understand what PubNub does and how its capabilities fit together, explore these resources based on what you want to learn or do next:

* [How PubNub works](https://www.pubnub.com/docs/architecture/how-pubnub-works.md). The network behind these capabilities: edge routing, latency, scaling, ordering, delivery guarantees, and fault tolerance.
* [Available SDKs](https://www.pubnub.com/docs/getting-started/available-sdks.md). Find the PubNub SDK for your platform or language.
* [Set up your account](https://www.pubnub.com/docs/architecture/authentication/set-up-your-account.md). Create an app and keyset and get the credentials required to use PubNub.
* [Quickstart](https://www.pubnub.com/docs/getting-started/quickstart.md). Build your first PubNub application and publish and receive messages.

Last updated at: 2026-09-30T14:10:53.000Z
