Why customers choose Ably over hosted MQTT for building realtime web and mobile applications

If you’re building user-centric realtime features and products such as chat or multiplayer collaboration apps, this page can help you to decide which solution - between Ably and hosted MQTT - is most fit-for-purpose, and understand when and why Ably is preferred to hosted MQTT solutions.

Focus on building realtime apps that delight customers. We’ll handle the rest.

Copy link to clipboard

Hosted MQTT solutions for realtime applications

MQTT is a machine-to-machine (M2M) connectivity protocol designed for use in Internet of Things (IoT) applications. Because it’s simple to use, scalable and ideal for small-sized, constrained devices with limited CPU, memory, and battery life, MQTT is occasionally chosen for building realtime applications such as chat. 

Using MQTT can be made easier by selecting a hosted MQTT broker, which sets up and maintains your MQTT infrastructure. This helps to handle the complexities of server management, scalability, and maintenance by:

  • Reducing overhead: Offloads the management, maintenance and updates of your MQTT system.

  • Scaling automatically: MQTT brokers such as HiveMQ and EMQX can provide automatic scaling.

  • Increased security: Hosted MQTT providers often implement security best practices, including data encryption, access control, and compliance with industry standards.

If you are planning to build a realtime web or mobile application aimed to serve the needs of human end users - as opposed to their devices - there are a few things you might want to consider before moving ahead with hosted MQTT.

Copy link to clipboard

Things to consider if you’re looking at hosted MQTT for a realtime user application

  • Not designed for web and mobile applications: You can't directly send MQTT messages to a browser, because web browsers don’t have built-in MQTT support. Usually, using MQTT in web environments requires another broker solution, most commonly WebSockets. Even if you’re using hosted MQTT, setting it up over WebSockets may create additional complexity, as you have to separately configure WebSocket servers and ensure proper communication between them and your MQTT setup.

  • Complex setup: Setting up an MQTT infrastructure can be complex, especially if you're new to MQTT. You will need to mitigate the protocol's feature-rich nature across considerations such as diverse QoS levels, broker configurations, security implementations, and integration challenges within a larger ecosystem.

  • Payloads based on binary data: MQTT payloads are typically binary data. Developers need to consider how to serialize and deserialize messages for display in the application's user interface.

  • Advanced realtime features need to be built: Out-of-the-box, MQTT will not support more advanced application features like presence, read receipts, history or rich media. Building these on top of an MQTT system will delay time to production.

Copy link to clipboard

Ably: The alternative to MQTT that lets you focus on features, not infrastructure

Ably is the realtime infrastructure platform, designed to power live experiences at scale for web and mobile users across the world. We provide developers the building blocks they need to quickly deliver realtime experiences such as live chat, collaboration, notifications, and more general data sync or data broadcast functionality. 

Our flexible SDKs support over 25 languages and platforms, allowing developers to build applications that are guaranteed to work seamlessly within their existing tech stack. Over 800 companies including HubSpot, Toyota, and Webflow trust Ably to power live and collaborative features for hundreds of millions of devices worldwide

Ably’s preferred transport is the WebSocket protocol due to its portability and performance. However, Ably supports client connections over multiple transports, including SSE, HTTP and MQTT.

As a managed solution, Ably enables you to:

  • Deliver user-centric realtime applications faster by taking advantage of Ably’s purpose-designed functionality.

  • Reduce engineering and DevOps efforts - there's no complex realtime infrastructure for you to provision and maintain.

Start with a free account Read our docs

Copy link to clipboard

Side-by-side: Ably vs Hosted MQTT

Developer Experience


Hosted MQTT

Language & platform support

Support for over 25 languages & platforms 

Varies depending on the host.

For example, EMQX provides APIs for C, Java, Golang, Python, and JavaScript. 

Other solutions, like HiveMQ, simply recommend Open Source client libraries developed by third parties.

Dev & Test Tools

Docs, tutorials, dev console

Varies depending on the host


Ably allows you to bridge together multiple data input and output channels to build complex use cases. 


- Custom


- Zapier

Serverless platforms

- AWS Lambda

- Cloudflare Workers

- Google Cloud Functions

- Azure Functions

Streaming & queuing platforms

- Apache Kafka

- Apache Pulsar

- Amazon Kinesis

- Amazon SQS

- RabbitMQ


Varies depending on the host


Ably is WebSocket-based but provides fallback transports such as XHR Streaming and XHR polling, for environments where WebSockets aren’t supported.

Ably supports additional protocols:
- Server-Sent Events

MQTT 3.1
MQTT 3.1.1
MQTT 5.0

For extending MQTT to the web. Setting up MQTT over WebSockets may require additional configuration compared to traditional MQTT.

Implementing fallback mechanisms or alternative communication methods for clients that don't support WebSockets places an extra burden on the engineering team.



Hosted MQTT


Practically limitless, based on the capacity that Amazon AWS provides. 

Hosted MQTT solutions are typically designed to handle large-scale IoT deployments, therefore can scale quickly to very large numbers of devices.


<65ms round-trip latency (P99).

Specific latency values can depend on various factors, including the deployment configuration, network conditions, and the use case.  They are also subject to capped throughput levels. Depending on provider, maximum throughput can vary between 8,000 messages/sec and average latency at 1000 messages/ sec of 119.4 ms to 28,000 messages/sec (M1) and an average latency at 1000 messages/sec of 6.4 ms.

Uptime guarantee

99.999% uptime SLA.

Depends on the type of subscription or plan you choose, can vary between 99.5% to 99.99%.

Surge capacity

5 million messages/ second published out of the system as the inbound messages fan out.

Depends on the host.
A peak message throughput of one million messages/ second published out of the system is common.


Ably offers all the following guarantees:

- Guaranteed delivery 

- Guaranteed exactly-once delivery

- Guaranteed ordering 

MQTT has three QoS (quality of service) options to choose from: 

0 (at most once delivery) offers the least reliability but is the fastest.

1 (at least once delivery) is more reliable, but it can result in duplicate messages  

2 (exactly-once delivery) provides exactly-once delivery, which is the most reliable but comes with increased overhead and complexity

Higher levels of QoS (1 and 2) require more communication overhead, which may come at a slight performance cost compared to QoS 0. However, they ensure higher message delivery reliability.

Purpose-built realtime app functionality


Hosted MQTT


Available by default with Ably. Enables clients to be aware of other clients that are currently “present” on a channel, synchronizing online user state across devices. Helps you create typing indicators, offline/online or "last seen" statuses.

You’d need to engineer this yourself.

Channel Occupancy

Available by default with Ably. Provides high-level metrics about the clients in a chat. Such as the number of connections currently attached to a channel.

You’d need to engineer this yourself.

Message history (persisted data)

Available by default with Ably. Retains the last two minutes of instantaneous “live” message history in memory and can store messages on disk for up to 72 hours. 

You’d need to engineer this yourself.

Rewind / load previous messages

Available by default with Ably. Updates can be made available to new or reconnecting users the moment the page loads, with fewer API calls, lower latency, and lower bandwidth usage.

You’d need to engineer this yourself.

Stream Resume

Available by default with Ably. When changing from mobile to wifi, going into tunnels or dealing with unreliable networks, Ably keeps state and retries connection every 15 seconds for two minutes. The mobile UI remains seamless. 

You’d need to engineer this yourself.

Push notifications

Available by default with Ably through a unified API to deliver notifications, including native iOS and Android push notifications.

You’d need to engineer this yourself.

Configurable roles & permissions. 

Available by default with Ably. Provides various permissions for authentication tokens, so you can control which clients have access to what channel.

You’d need to engineer this yourself.

Collaborative features

Through Spaces, Ably offers APIs for building collaborative features such as avatar stacks, typing indicators, field locking or  in just a few lines of code.  

You’d need to engineer this yourself.

Security & Compliance


Hosted MQTT


TLS Encryption

Message Encryption - Symmetric Encryption via Client libraries

TLS Encryption

Message encryption is handled by developers.


SOC 2 Type 2, HIPAA, GDPR, EU, and US-only data storage.

Varies depending on the host.

Copy link to clipboard

Hosted MQTT vs Ably: Which is better?

The choice of what to use depends on your use case and what you're trying to achieve. If you aim to enable M2M communication for sensors, IoT applications, and apps operating in networks with low bandwidth and high latency, then it's advisable to use hosted MQTT.

If you have a smaller development team, tight production targets, and are building applications with full-duplex, two-way communication where there is a human in the interaction loop, then MQTT is likely not the best solution. 

Even with a hosted solution that will cover parts of your infrastructure, for web environments, you will still need to bridge MQTT over another protocol such as WebSockets. And for building the app functionality you will still need a lot of engineering effort on top of the raw infrastructure provided by MQTT. 

While Ably provides an infinitely scalable, reliable realtime infrastructure, its APIs and SDKs provide the ready-made functionality that makes it easy to create user-centric live experiences, with enough flexibility to customise them as your users demand. 

Ably’s products Pub/Sub Channels and Spaces can be used separately or in combination to not only unlock end-to-end realtime messaging but to create a host of collaborative features including: chat, notifications, live avatar stacks, live cursors, member locations, live updates, component locking, annotations and more. 

Start with a free account Read our docs

Robust features set to power delightful realtime experiences


Publish messages to millions of subscribers over Ably channels - named units of distribution that offer a way to implement Pub/Sub messaging and realtime data delivery.


Ably supports WebSockets, SSE, and MQTT, so you can choose the right protocol for your use case. We also support the Pusher and PubNub protocols, making the migration to Ably quick and simple.


No message is ever lost, delivered multiple times, or out of order, even if unreliable networks and brief disconnections are involved.


Subscribe to events when devices or users enter, leave, or update their state on channels. Essential for use cases like chat, multiplayer games, or collaboration tools.


Reduce the bandwidth needed to distribute messages to consumers by sending only the changes from the previous message instead of the entire payload.


Send push notifications over Ably channels, or deliver them directly to Android and iOS users with FCM and APNs.

Simple and powerful client library SDKs

All official Ably client library SDKs offer a consistent yet idiomatic API across every language. Regardless of your development environment or preferred language, Ably keeps things simple for you by providing consistency and predictability. You can quickly integrate our SDKs into your tech stack with a few lines of code, and start building realtime features in minutes. 

Ably, your AWS AppSync alternative

Ably is a globally-distributed serverless WebSocket PaaS. We make it easy to build live experiences like chat and multiplayer collaboration for millions of users.

Start with a free account