API limits
This page lists documented numeric limits for PubNub Functions execution, deployment, and storage. For the conceptual model these limits apply to, see Functions overview.
Every PubNub plan includes Functions.Execution limits
| Item | Limit |
|---|---|
| Modules per keyset | 10 |
xhr requests per execution | 5 |
| Vault reads per execution | 10 |
| PubNub API, publish, and KV Store calls per execution | 10 each |
| Outbound call rate | 100 requests/sec total, across xhr and Vault requests |
| Loop iterations per execution | 100,000 |
| Execution recursion depth | 3 hops, whether chaining Function types or re-triggering the same one |
| CPU wall time | 10 seconds per execution |
KV Store keys per getKeys call | 100 |
| KV Store key size | A KV store key can be up to 1,000 characters. |
| KV Store value size | A KV store value can be up to 32,000 characters. |
| KV Store TTL | A KV store entry lives for 1 day by default, and a per-entry TTL can range from 1 minute up to 1 year. |
| Interval Function schedule | 1 hour maximum between executions |
| Console debug and error messages | A Function replica publishes up to 250 console log lines over its lifetime, not per execution, and output stops silently once a replica reaches that budget. |
To request a higher limit, contact support@pubnub.com.
Deployment limits
A PubNub Function package revision can deploy to up to 10 keysets on the Free plan and up to 500 keysets on a paid plan.
An account can run up to 5 deployments at once on the Free plan and up to 30 on a paid plan.
The keyset limit bounds how many keysets a single Function package revision can deploy to. The running-deployments limit bounds how many deployments, across all Function packages on an account, can run at the same time.
Performance by plan
On Free and Starter plans, a PubNub Function typically handles 15 requests per second (RPS). Starter plan Functions can scale up to 10 times that within 20 seconds. Free plan Functions do not scale beyond their baseline RPS. If load exceeds the RPS limit, Functions may time out or run longer.
Related reference
- Functions overview. Read the conceptual model these limits apply to.
- xhr. Look up the module's own timeout and retry parameter defaults.
- Function types. Look up execution semantics for every trigger type.