Compare all

Pusher vs PubNub

A comparison of realtime providers

Easily build complete, trusted realtime functionality.

Take our APIs for a spin

Disclaimer: All information is as accurate as possible as of publishing, April 2019. It’s worth noting that the information presented in this article has been gathered based on documentation and resources freely available online from Pusher and PubNub. Be sure to double-check anything before you make any decisions. If you do find anything incorrect or out of date then please let us know.

That said, the aim is to help you make a more informed decision when it comes to choosing a realtime data streaming or messaging platform. We’ll cover a set of questions we think are essential to ask of any realtime data streaming platform.

Pusher and PubNub are realtime messaging platforms offering high-throughput and realtime data delivery between online networks of users and services. Like all platforms there are pros and cons of each.

Contents

To help you answer the questions above in relation to Pusher and PubNub we’ve done our best to perform an unbiased, high-level comparative analysis of both platforms.

Is it globally fast, reliable, and redundant?

Before considering anything else you need to trust your realtime provider can deliver a stable and reliable service that’s easy to implement.

Information provided is from publicly available sources and is intended as a starting point for further investigation. See full disclaimer.

Reliability Pusher PubNub
Latency of response times No data available. Global average of 250ms. End-to-end within 100ms. See support article.
Uptime SLA 99.9% uptime SLAs for Enterprise plans. 99.999% uptime SLA for premium plans.
How many globally distributed datacenters? Six datacenters across six Amazon geographical regions in Europe, USA, Asia Pacific.

However, you must choose a single datacenter to host your app.
16+ datacenters and 175+ edge PoPs across Europe, USA, and Asia Pacific.

This equates to four Amazon geographical regions and ten EC2 availability zones with AWS.
Latency based routing that ensures users connect to the closest datacenter Supports latency based routing. Supports latency based routing.
Mesh architecture with no central point of failure No. Yes.
Data replicated in multiple regions No.

Application data is stored in a single datacenter, making it more susceptible to data loss.
Partial.

Full data replication is guaranteed only for Enterprise customers.
Quality of Service and message delivery guarantee (never lose data during brief disconnections) No.

If a message is published whilst a client is briefly disconnected (such as going through a tunnel or changing networks), then the message will never arrive to that client.
Partial.

PubNub imposes a message queue limit of 100 messages. Message recovery cannot be guaranteed and subscribed clients are at risk of missing messages if disconnected.

The comparisons presented here are: (i) derived from public information and open sources available as of April 2019, and thus may be outdated; (ii) intended as a starting point for further investigation; and (iii) not guaranteed to be 100% accurate or complete. The reader is encouraged to conduct an independent evaluation and to not rely solely on the information presented here. Please contact us if you believe the information here is inaccurate or incomplete.

The comparisons presented here are: (i) derived from public information and open sources available as of April 2019, and thus may be outdated; (ii) intended as a starting point for further investigation; and (iii) not guaranteed to be 100% accurate or complete. The reader is encouraged to conduct an independent evaluation and to not rely solely on the information presented here. Please contact us if you believe the information here is inaccurate or incomplete.

PubNub references:

PA1, PA2, PA3, PA4, PA5, PA6, PA7, PA8, PA9, PA10, PA11, PA13, PA14, PA15, CL1, CL2, CL3

What’s the level of platform interoperability?

The modern internet is a web of different languages, platforms, open and proprietary protocols, and services built on top of other services. This isn’t likely to change anytime soon so a platform that supports widespread interoperability is essential in the long-term. There are three questions to help assess how interoperable a platform is:

  • How extensively does the platform support different languages, frameworks, and protocols?
  • How easy is it to migrate to or move away from the platform?
  • Are there protocols for streaming data into third party platforms?

Information provided is from publicly available sources and is intended as a starting point for further investigation. See full disclaimer.

Interoperability Pusher PubNub
Support for native client libraries/SDKs Wide support with ~30 SDKs. Claims support across 70+ SDKs.
Support for open source and proprietary protocols (e.g. MQTT, AMQP, STOMP) No support. Partial.

PubNub supports MQTT but requires additional configuration opposed to native out-of-the-box support.
Migration and lock-in Does not support proprietary realtime vendor protocols, making it harder to migrate in and away. Does not support proprietary realtime vendor protocols, making it harder to migrate in and away.
Coverage of various languages, frameworks, protocols and transports, including MQTT No support. Partial. No support for third party queuing, streaming, or compute platforms.

PubNub Functions provides a proprietary method of executing code. Unfortunately this limits you to PubNub’s functionality, their JavaScript API, and means you’re required to reproduce existing code already in your systems.

The comparisons presented here are: (i) derived from public information and open sources available as of April 2019, and thus may be outdated; (ii) intended as a starting point for further investigation; and (iii) not guaranteed to be 100% accurate or complete. The reader is encouraged to conduct an independent evaluation and to not rely solely on the information presented here. Please contact us if you believe the information here is inaccurate or incomplete.

The comparisons presented here are: (i) derived from public information and open sources available as of April 2019, and thus may be outdated; (ii) intended as a starting point for further investigation; and (iii) not guaranteed to be 100% accurate or complete. The reader is encouraged to conduct an independent evaluation and to not rely solely on the information presented here. Please contact us if you believe the information here is inaccurate or incomplete.

PubNub references:

PA1, PA2, PA3, PA4, PA5, PA6, PA7, PA8, PA9, PA10, PA11, PA13, PA14, PA15, CL1, CL2, CL3

How easy is it to get started and scale up?

We all want to work with platforms and technologies that are easy to understand, implement, and then scale. When it comes to realtime platforms you can get a good feel for this by looking at:

  • The user-friendliness of the API
  • The documentation

Note that we’ve only done a high-level overview of the API and initial setup so we can’t speak for more nuanced and long-term usability of the Pusher or PubNub APIs.

Is the API easy to use: Getting set up with Pusher

Here we use JavaScript to get going with Pusher.

var pusher = new Pusher('APP_KEY', {
  cluster: 'APP_CLUSTER'
});
// Subscribe to a Pusher channel
var channel = pusher.subscribe('my-channel');
// Listen for events on the channel
channel.bind('my-event', function(data) {
  alert('An event was triggered with message: ' + data.message);
});
// Trigger events/send messages from your server using Node.js
var Pusher = require('pusher');
var pusher = new Pusher({
  appId: 'APP_ID',
  key: 'APP_KEY',
  secret: 'APP_SECRET',
  cluster: 'APP_CLUSTER'
});
pusher.trigger('my-channel', 'my-event', {"message": "hello world"});

Is the API easy to use: Getting set up with PubNub

Here’s how publishing a message with Node.js and PubNub is done:

var PubNub = require('pubnub');
var pubnub = new PubNub({
    publishKey: 'demo',
    subscribeKey: 'demo'
});
var publishConfig = {
    channel: 'hello_world',
    message: {
        title: 'greeting',
        description: 'hello world!'
    }
};
pubnub.publish(publishConfig, function (status, response) {
    console.log(status, response)
});
Which API is best?

Both the Pusher and PubNub JavaScript and Node.js APIs were easy to implement. They were simple and self-explanatory, getting us up and running in a relatively short time. And the ‘Quick start’ docs led us nicely through the setup process.

Is the documentation any good?

Documentation is the bedrock of understanding and using software, especially for such complicated and essential functionality as realtime messaging. Nowadays this is a really low bar but far too many services still have minimal, incomplete, or no documentation at all. Clear and succinct documentation is usually a good indication that the service is well-designed and you’ll be able to find the information you need. And if they’re using the OpenAPI Specification then that’s a good sign too.

So how do Pusher and PubNub stack up? Both do quite well with fairly extensive documentation across quickstart guides, SDKs, and docs explaining some of the core features of their respective platforms along with some topics around streaming data in general.

As an aside, Pusher’s docs seem to focus on explaining the high-level concepts behind pub/sub messaging and then quickly getting you up and running. Whereas PubNub seems to focus on helping you select your programming language and providing a more in-depth implementation.

Connectivity and transport

How your data/messages are transported changes the speed of delivery and fundamentally impacts your product or service. A realtime platform provider should always choose the best transport available based on the browser and connection available. The client library should prioritize transports in this order:

Pusher provide first-class WebSocket support with fallbacks for older clients.

Whereas PubNub rely on the HTTP transport protocol for their client libraries. A WebSocket compliant interface is provided in some libraries, however this is just a wrapper around an underlying HTTP transport.

The general consensus in the realtime industry is that the WebSocket protocol is a faster, more efficient transport option than HTTP. And while, at the moment, HTTP is more widely supported (although as of early 2019 the difference is small and rapidly shrinking) many believe WebSockets will become the universally-accepted standard for streaming data in the near future.

How mature is the feature set?

It takes non-trivial engineering effort to adopt a realtime data streaming platform and integrate into your application or service. It’s natural you’ll want to make sure the platform you choose has a mature and full feature set that provides the basic the functionality you’d expect from a realtime platform, provides the features you need right now, and has the functionality to support you as you grow and your needs change.

Below is a feature matrix with a set of standard features you’d expect to see on offer from an established realtime data streaming platform. Pusher and PubNub are compared side by side against these features.

Information provided is from publicly available sources and is intended as a starting point for further investigation. See full disclaimer.

Features Pusher PubNub Why does this matter?
Realtime data streaming Yes. Yes.
Message and worker queues No.

Pusher does not offer any message queuing features or ways to distribute data using once-only pattern to your server workers.
No.

PubNub does not offer any message queuing features or ways to distribute data using once-only pattern to your server workers. However, PubNub Functions appears to be an alternative function-as-a-service approach.
Message queues that provide a reliable and straightforward mechanism to consume, process, store, augment or reroute data efficiently from a realtime platform.
Webhooks Yes. Partial.

PubNub supports Webhooks if manually requested through support. However they are limited to presence events and do not cover channel lifecycle events.
Webhooks provide a means to get messages, channel lifecycle and present events pushed to your servers over HTTP.
Serverless cloud function invocation No. Partial.

PubNub allows you to run code on their own platform using their proprietary PubNub Functions. The code you can run is limited to the available Javascript API.
Trigger serverless functions on third platforms like Amazon Lambda, Microsoft Azure or Google Function.
Presence Yes.

Pusher supports a maximum of 100 members per channel.
Yes.

PubNub supports a default announcement of 20 members and a self-configurable maximum of 100 members per channel.
Subscribe to events when users or devices enter or leave channels/topics.
Message history No. Yes. Dictates whether clients can access historical activity, catching up on missed messages.
Realtime data firehose No. No. Stream your realtime data published within a realtime platform directly to another streaming or queueing service such as Amazon Kinesis, Apache Storm or Kafka.
Native push notifications Yes. Yes. Send notifications and updates to users even when they are offline.
Custom domain endpoint (CNAME) No. No.

PubNub only provides support for custom CNAME for non-TLS connections as they do not serve up custom certificates for customers.
Custom domains allowing you to connect using a CNAME such as “realtime.your-company.com”.

The comparisons presented here are: (i) derived from public information and open sources available as of April 2019, and thus may be outdated; (ii) intended as a starting point for further investigation; and (iii) not guaranteed to be 100% accurate or complete. The reader is encouraged to conduct an independent evaluation and to not rely solely on the information presented here. Please contact us if you believe the information here is inaccurate or incomplete.

The comparisons presented here are: (i) derived from public information and open sources available as of April 2019, and thus may be outdated; (ii) intended as a starting point for further investigation; and (iii) not guaranteed to be 100% accurate or complete. The reader is encouraged to conduct an independent evaluation and to not rely solely on the information presented here. Please contact us if you believe the information here is inaccurate or incomplete.

PubNub references:

PA1, PA2, PA3, PA4, PA5, PA6, PA7, PA8, PA9, PA10, PA11, PA13, PA14, PA15, CL1, CL2, CL3

As the matrix shows, both providers offer a good level of realtime messaging functionality. They also offer some additional help for developers when it comes to doing the technical heavy lifting. Yet both could offer more on that front as features like serverless functions, reliable message ordering, and message queues are missing or proprietary. With serverless compute and event-driven architecture becoming more integrated into our software design these omissions should weigh heavily in your decision.

PubNub has wider feature coverage, beating Pusher on message history and providing a proprietary solution for executing serverless functions. That said, the two have similar levels of service and both provide solid options. So, as stated before, using this feature matrix as a guide, check the platform functionality in relation to your own specific requirements and preferences.

Does the platform offer realtime API Management tools?

The demand for realtime apps and experiences is exploding, which is probably why you’re reading this vendor comparison. Current realtime data streaming providers can give you the much-needed core transfer infrastructure for realtime data – but they put the responsibility for managing realtime APIs back onto you, which can get messy and why we all use REST API management tools nowadays.

A couple of extra considerations when you’re choosing a realtime data streaming platform:

  • In addition to the realtime streaming infrastructure, does the platform provide the operational tools you need to stream, manage, and exchange data in realtime? For example, analytics, developer portals, and rate limiting tools.
  • Is end-to-end data delivery supported – from source to subscriber? This might be sending data straight from an IoT sensor to a smartphone, without needing to pass through your own servers first.

A globally distributed data stream network providing an all-encompassing platform with everything you need to build the realtime experiences is the future. Just something to think about.

How secure is the platform and the way it does things?

Security and encryption are front of mind and any realtime platform will have robust security built into their design and delivery. A good general checklist for security is:

Information provided is from publicly available sources and is intended as a starting point for further investigation. See full disclaimer.

Security Pusher PubNub Why does it matter?
TLS connection Yes. Yes. TLS connections ensure all data in transit is encrypted.
Token-based authentication Yes.

Pusher requires a separate authentication request for every channel. The recent Authorized Connections feature, introduced in December 2018, improved this by adding more granular channel permissions.
No.

PubNub offers an authentication scheme called PAM that allows granular permissions to be configured per client. These permissions are stored on PubNub’s servers however which means it is your responsibility to keep a client’s permissions in sync with PubNub at all times.
Token-based authentication ensures private keys are never shared and instead short-lived tokens are used to authenticate.
JSON Web Token (JWT) Partial.

Pusher only supports JWT in certain products.
No. JWT allows for easy integration with existing authentication systems, along with ensuring private keys are never shared.
Configurable private key permissions No. No. API keys with configurable permissions including restrictions on channels or operations.
Configurable channel permissions Partial.

Pusher provides a ‘private-’ and ‘presence-’ namespace for channels that require authentication. No other channel configuration is available.
Yes. The flexibility to maintain control of your channels, such as requiring SSL/TLS or only identified authenticated clients on a channel.
Encrypted message payloads Yes.

PubNub include AES encryption in its client library SDKs.
No. AES encryption using the provided private key before publishing to a network. As a result, messages are practically impossible to intercept and view. For sensitive data this ensures your payloads are always secure and opaque.

The comparisons presented here are: (i) derived from public information and open sources available as of April 2019, and thus may be outdated; (ii) intended as a starting point for further investigation; and (iii) not guaranteed to be 100% accurate or complete. The reader is encouraged to conduct an independent evaluation and to not rely solely on the information presented here. Please contact us if you believe the information here is inaccurate or incomplete.

The comparisons presented here are: (i) derived from public information and open sources available as of April 2019, and thus may be outdated; (ii) intended as a starting point for further investigation; and (iii) not guaranteed to be 100% accurate or complete. The reader is encouraged to conduct an independent evaluation and to not rely solely on the information presented here. Please contact us if you believe the information here is inaccurate or incomplete.

PubNub references:

PA1, PA2, PA3, PA4, PA5, PA6, PA7, PA8, PA9, PA10, PA11, PA13, PA14, PA15, CL1, CL2, CL3

How responsive and helpful is support?

Even if a platform or product is well-designed and the docs are strong, the nature of software and complex infrastructure means you’ll inevitably need to talk to a human at some point. Whether it’s about pricing, implementation, or a bug – support is a fact of building stuff on the internet. So it’s essential you can rely on responsive, helpful support.

Good indicators are short response times across live chat and email, access to people who understand the nitty gritty technical details of the platform, and an up-to-date support portal for docs. An active community with forums or a group chat can also be a good sign.

Pusher’s support

A breakdown of what we found of Pusher’s support offering:

  • Ticket-based support with no live chat – most software providers today offer some sort of live chat or support and it’s often a quick two minute chat can point you to the right bit of documentation, saving you time searching yourself
  • The help centre is solid with the expected FAQ style
  • Most of the pricing tiers have target response times:
    • Startup and pro pricing: target response within 72 hours
    • Business and premium: target responses within 48 hours
    • Enterprise: standard for the industry but quite the bump compared to Pusher’s other tiers with 24/7 support, phone support, and a dedicated Slack Channel
PubNub’s support

PubNub seems to provide more extensive and responsive support but does require you to purchase support plans in addition to paying for PubNub’s core service:

  • Both ticket-based and web-based chat support
  • A comprehensive support home, knowledge base, and glossary provide ample self-help collateral
  • If you’re really struggling PubNub offer a consultancy-style service
  • All pricing tiers include ‘basic support’ which entails ‘best-effort’ response times through email and web. Then there’s premium support plans:


PubNub support options

There’s no listed pricing for support plans so we can’t comment on the value.

Until now Pusher and PubNub have been almost equal. PubNub nudge ahead with what seems to be a more comprehensive support offering.

How clear, flexible, and scalable is the pricing structure?

Like every realtime provider Pusher and PubNub offer free tiers. We found PubNub’s pricing to be a little obscure pricing with Pusher leaving little room for flexibility. We’ll take each provider into account separately and link to pricing pages so you can explore for yourself in more detail.

Pusher


Fanout pricing options

Pusher prices its three products – Channels, Pusher Beams (aka push notifications), and Pusher ChatKit – separately and in tiers. If you’re looking for modular implementation this can be helpful. However, it can be frustrating to try and get a single overview if you wanted to adopt two or more – which many developers will want to do. And tier-based pricing isn’t the most flexible.


Fanout pricing options

The main issue with Pusher’s pricing is tiering. The nature of realtime messaging and streaming data means connections, required channels, and messages often fluctuate. Plus it’s never easy to estimate how much you’ll need upfront anyway – especially true for realtime uses such as HQ-style games or live event/sports apps.

With this pricing model if you exceed any one attribute of a tier you’ll likely be forced into another more expensive tier. For example, moving from Pro to Business hikes the price from $99 to $299 per month. A better way is usage-based pricing where you only ever pay for capacity you’ve actually used.

Then there’s Beams.


Pusher Beams pricing options

Again, Beams is based on tiers rather than usage. There’s quite a difference between 10,000 devices for $99/month and up to 50,000 devices for $399/month. If you need 11,000 devices it looks like you’d need to fork over another $300 for only 1,000 more devices, which doesn’t make much sense. It’s possible there’s room for flexibility if you get in touch with Pusher.

Finally there’s ChatKit.


Pusher Chatkit pricing options

Once again, the major problem lies in concrete tiering with little room for manoeuvre. Depending on where your customers reside data protection could be an issue with only 90-day retention the standard for business tiers.

Overall Pusher’s rigid pricing tiers don’t seem to encourage growth or provide a joined-up view of data streaming costs. That said, Pusher’s pricing is simple and easily understood.

To sum up, Fanout is a cheaper alternative to Pusher. However, the pricing schemes of both providers require users to look carefully at what their streaming needs are now, and in future, to make sure invoices remain free of unpleasant surprises.

PubNub

PubNub charges over four categories. The scheme is quite complex.

PubNub offers a $45 monthly plan, which is said to be ‘prepaid toward your transaction usage’. Transactions are priced as follows:

  • $0.000075 per Replicated Transaction (i.e. API calls that result in information replicating across multiple PubNub Points-of-Presence, a concept also known as a ‘message’).
  • $0.000020 is the price of an Edge Transaction (i.e. API calls that interact with a single PubNub PoP, such as receiving a published message via a Subscribe API call).
  • $0.000025 per Functions Execution (each execution of a PubNub function).
  • $8 per GB Data Persistence (data calls that store data into PubNub – this could be Storage & Playblack, the Key/ Value store, and others).

Here’s what the scheme looks like in table form on PubNub’s site:


Pubnub pricing options

PubNub lets you pay for the resources you use in a package format. However, pricing is based on transactions which are classified into more than 40 different types, making it difficult to predict ongoing costs. In addition to being complicated, PubNub tends to price higher than other providers.

Pricing is difficult to gauge based on pricing pages alone. A lot will depend on your usage and if you’re an Enterprise customer you’ll likely end up with custom SLAs. However, it’s clear Pusher aim for a simpler yet more rigid pricing structure while PubNub seem to have adopted a more complicated structure with granular, yet obscure and more expensive, pricing.

Which platform is best?

Unfortunately this just isn’t a question we can answer outright. Both of these data streaming platforms have their pros and cons when it comes to functionality. Here’s a recap of the major differences:

  • Pusher uses the WebSocket protocol whereas PubNub uses HTTP
  • PubNub supports serverless functions with their proprietary system whereas Pusher has no support for any serverless function – neither support queuing or streaming into existing third party solutions
  • Neither do well on pricing but PubNub seems to be more expensive and a little more obscure than Pusher – but Pusher has simplistic tiers that don’t provide flexibility
  • PubNub seems to offer better support than Pusher, but you need to purchase extra support plans
  • Neither provide management tools or end-to-end streaming for realtime APIs

Broadly speaking it looks like Pusher is better for developers with simpler uses for realtime messaging and who want to get up and running quickly. Whereas PubNub might be better for organizations with more complex requirements and larger budgets. But please do your own research before choosing any provider.

Ultimately the choice is yours but hopefully this article helped you gain a better understanding of what you should look for in a realtime data streaming platform – and whether Pusher or PubNub can provide what you’re looking for.


Compare these companies with other realtime providers