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​

ItemLimit
Modules per keyset10
xhr requests per execution5
Vault reads per execution10
PubNub API, publish, and KV Store calls per execution10 each
Outbound call rate100 requests/sec total, across xhr and Vault requests
Loop iterations per execution100,000
Execution recursion depth3 hops, whether chaining Function types or re-triggering the same one
CPU wall time10 seconds per execution
KV Store keys per getKeys call100
KV Store key sizeA KV store key can be up to 1,000 characters.
KV Store value sizeA KV store value can be up to 32,000 characters.
KV Store TTLA 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 schedule1 hour maximum between executions
Console debug and error messagesA 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.

  • 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.

Was this page useful?

Last updated on