Batching Requests
Batching requests is the process of combining, or batching, API calls or data to decrease the amount of requests a client has to make.
Sending too many requests at a time, such as what would be required in IoT and collaborative applications, can overload client applications, causing them to be slow, non-responsive, and even crash.
How does PubNub help with batching requests?
Each PubNub message can contain up to 32 KB. Files have a limit of 5 MB per file (but can be broken up into batches, such as encoding file contents to a Base64 string).
While PubNub does not limit the number of messages you can send at a time, publishing a batch of API calls or data in one PubNub message ensures that subscribers don't miss any messages. If this recommended limit needs to be exceeded, PubNub supports Multiplexing, Channel Groups, and Wildcard Subscribe.
Multiplexing, which is subscribing to multiple channels from a single client, is useful for no more than 30 channels. If an application requires more than that, Channel Groups or Wildcard Subscribe will be required. Either feature is able to subscribe to thousands of channels (for Channel Groups, each individual client can subscribe to a maximum of 10 channel groups for a total of up to 20,000 channels). Although each channel needs to be published individually, these actions can be performed asynchronously to not exceed the 10-15 messages/sec per channel recommended limit. These features allow connected applications to receive updates in real-time, without affecting an application's performance.