Back to Blog
engineering performance

How We Built Low-Latency Real-Time Messaging

J

Jakub K.

March 5, 2026

Real-time messaging only feels real-time if it is consistently fast. Here is how the Disqua delivery pipeline is built for low latency.

The Architecture

The pipeline has four components: a WebSocket gateway, Redis pub/sub, the MySQL write path, and a fan-out layer.

How we keep it fast

Each message is written once and fanned out over Redis pub/sub to every connected client in the channel, so delivery does not wait on slow consumers. We keep the hot path lean and push non-essential work such as search indexing, link unfurling, and notifications onto background workers.

Lessons Learned

The biggest optimization was eliminating unnecessary work. Sometimes the fastest code is the code you do not run.

Share this article: Twitter LinkedIn

Έτοιμοι να ενοποιήσετε το chat και την υποστήριξη της ομάδας;

Ενταχθείτε σε ομάδες που χρησιμοποιούν ήδη το Disqua για εσωτερική επικοινωνία και υποστήριξη πελατών. Ρύθμιση σε λιγότερο από 2 λεπτά.

Δημιουργήστε τον δωρεάν χώρο εργασίας