Skip to main content
For a system such as Ably, performance generally relates to the speed of operations. For Ably, the single most important metric is the latency of message delivery, but performance relates more broadly to latency and throughput of operations generally.

Why performance matters

For the majority of use-cases, applications employ Ably because the timeliness of message delivery is very important. Performance in a realtime messaging platform directly affects user experience and, ultimately, business outcomes.

Impact on user experience

Applications such as live chat, collaborative editing or multiplayer games depend on low latency for a responsive user experience:
  • Chat applications feel sluggish rather than instantaneous when messages are delayed
  • Collaborative editing tools develop conflicts that frustrate users
  • Multiplayer games become unplayable due to synchronization issues
  • Even small increases in latency can have major impacts on how users perceive application quality

Business impact

From a business perspective, performance directly impacts outcomes:
  • User engagement drops significantly with each additional 100ms of latency
  • Conversion rates decline when applications feel sluggish
  • Operational costs increase when inefficient systems require more resources to achieve the same results

Predictability and efficiency

Low and predictable latencies are needed to underpin predictability of any system built using Ably:
  • Designing for performance delivers an optimum experience for end-users
  • By ensuring efficiency in the design, it also helps to deliver scalability
  • When each operation is individually performant, the system can handle more operations with the same resources

Key performance design goals and metrics

Ably’s platform design focuses on two primary performance objectives that complement each other to ensure messages are delivered not only quickly but also efficiently, even at high volumes.

Minimizing latency and latency variance

Latency represents the time delay between when a message is sent and when it is received:
  • Just as important as reducing the average latency is minimizing the variance or “jitter” in these delays
  • Inconsistent performance can be more disruptive to applications than slightly higher but consistent latency
Ably achieves a global mean latency of 37ms:
  • <30ms round trip latency within datacenter (99th percentile)
  • <65ms global round trip latency (99th percentile)

Maximizing throughput

The second objective is maximizing single-channel throughput in terms of both message rate and bandwidth:
  • This ensures that even when a channel handles high volumes of traffic, such as during live events or peak usage periods, the system can efficiently process and distribute messages without degradation

Tail latency focus

Beyond average latency, Ably focuses on the performance of the slowest percentiles of messages (p95, p99, p99.9):
  • These tail latencies often reveal performance issues that might be hidden by average measurements
  • Consistent performance for all messages is critical for realtime applications

Throughput dimensions

Ably measures throughput across several dimensions:
  • Messages per second per channel: The maximum rate at which messages can be published and delivered on a single channel
  • Bandwidth per channel: The maximum data throughput a single channel can sustain
  • Aggregate throughput: The total message and data throughput across all channels in an application or across the entire platform

Channels as the foundation of performance

Ably organizes its pub/sub service using the concept of channels. A channel is a named entity where publishers send messages by publishing to a channel, and clients express interest in receiving messages by subscribing to channels.

Ephemeral channels

Channels are ephemeral:
  • They don’t require explicit creation ahead of time
  • They exist virtually as a result of being referenced in publisher or subscriber operations
  • This approach eliminates administrative overhead
  • Applications can scale seamlessly without pre-provisioning infrastructure for specific communication patterns

Channels as building blocks

Channels are the key building blocks of Ably’s internal implementation:
  • Internally, the channel is the venue of the core processing that Ably performs per-message
  • Persistence is organized on a per-channel basis, as is processing of integration rules
  • Ably minimizes the cost of processing each individual message by making channels stateful internally

Channel state optimization

Sufficient state exists, for the time that a channel is active, that message processing comprises as few operations as possible:
  • Once each message is decoded, state exists for the channel that assists in placement of the message within the persistence layer
  • Metadata is associated with the message efficiently
  • The system knows which other regions and which other connections are interested in the channel
  • This approach ensures that each message can be processed efficiently without repeatedly computing or looking up the same information

Lightweight channels at scale

While channels maintain state to optimize processing, they remain lightweight enough that a production application can maintain millions of them simultaneously:
  • This contrasts with heavier abstractions like Kafka partitions, which are typically limited to hundreds or thousands per cluster
  • The lightweight nature of channels enables:
    • Fine-grained resource allocation
    • Efficient memory utilization
    • Horizontal scalability as channel processing can scale across multiple nodes

Technical optimizations

Several technical optimizations make channel performance possible:
  • Carefully chosen data structures minimize memory footprint and CPU usage
  • Multiple channels share network connections to reduce overhead
  • Messages are batched when beneficial for throughput
  • Binary protocols reduce parsing overhead and bandwidth usage
  • Common operations follow highly optimized code paths

Global infrastructure for performance

While many systems can achieve very low latencies within single datacenters, they’re typically constrained to one region. Ably has optimized for both local edge processing and global performance.

Optimized intra-datacenter processing

In addition to having optimized intra-datacenter processing, Ably is also designed to optimize all other parts of the message delivery journey through its global infrastructure.

Points of Presence

Points of Presence exist globally based on Ably’s use of AWS CloudFront as a CDN/access network:
  • Using this network infrastructure, Ably can ensure that messages transit the public internet over the minimum distance possible

Peer-to-peer routing

Ably always routes messages between datacenters on a peer-to-peer basis:
  • Messages never need to be directed to specific locations for processing that are not in the most direct path from publisher to subscriber
  • This direct peer-to-peer routing provides several performance advantages:
    • Reduced internet transit distance: Most users connect to a nearby edge node
    • Optimized backbone usage: Inter-datacenter traffic travels over high-performance network backbones
    • Reduced hop count: Fewer network hops mean less opportunity for latency or packet loss
    • Path redundancy: Multiple routes ensure reliability without sacrificing performance

Capacity management and quality of service

Ably manages the capacity of all elements of its infrastructure — both message processing and networking infrastructure — so that, irrespective of demand, users do not find that service performance is degraded by capacity limitations and associated queueing delays.

Proactive capacity management

This proactive capacity management involves:
  • Predictive scaling: Capacity is adjusted ahead of anticipated demand changes
  • Headroom maintenance: Systems operate with sufficient margin to absorb spikes
  • Resource balancing: Workloads are distributed to optimize utilization across the infrastructure

Quality of service mechanisms

Quality of service mechanisms include:
  • Traffic prioritization: Critical messages receive preferential treatment
  • Fair usage enforcement: Prevents any single client from monopolizing resources
  • Graceful degradation: Under extreme load, system behavior remains predictable
  • Backpressure signaling: Clients receive early warnings when approaching limits

Performance in practice

Ably’s performance characteristics are designed to support a wide range of realtime applications:

Latency achievements

Within datacenter

Under 30ms round trip latency (99th percentile)

Global

Under 65ms round trip latency (99th percentile)

Mean latency

37ms global mean latency

Consistency

Focus on tail latencies (p95, p99, p99.9) for consistent performance

Throughput capabilities

Ably’s architecture supports:
  • High message rates per channel
  • Efficient message fanout to thousands of subscribers
  • Aggregate throughput that scales horizontally with no effective ceiling

Performance monitoring

External monitoring services continuously measure Ably’s performance:
  • Global round-trip latency statistics are measured externally by Uptrends
  • Performance metrics are publicly available
  • Real-time status monitoring ensures transparency

Next steps

Scalability

Learn how Ably achieves horizontal scalability

Fault tolerance

Understand how Ably maintains reliability

Edge network

Explore Ably’s global edge network

Latency metrics

View detailed latency statistics

Build docs developers (and LLMs) love