Sequencer Architecture

Ultra-Low-Latency
Deterministic Messaging

A full-fledged, total-ordered messaging middleware for distributed systems using reliable UDP multicast, TCP, and shared memory with single-digit microsecond latency.

SEQ SEQUENCER NODE1 NODE2 NODE3 NODE4 NODE5 NODE6 NODE7 NODE8 EVENT STREAM
3.3μs
Avg round-trip latency in microseconds
2M+
Messages per second
Zero GC
Zero Garbage per message
Total Order
Deterministic delivery
10y
Battle-Tested in Prod
The Atomic Broadcast Sequencer Architecture

CoralSequencer is a full-fledged messaging middleware that implements the atomic broadcast sequencer architecture. All nodes in the distributed system read all messages in the exact same order. Always!

Messages are persisted so late-joining nodes can rewind and catch up, building the exact same state as other nodes. Broadcasting is done through a reliable multicast UDP protocol — no message is ever lost. There is no single point of failure, from software down to hardware infrastructure.

Each session is automatically archived with all its messages for replay, testing, simulation, analysis and auditing. The high-level API makes it straightforward to write nodes that publish and consume messages.

Sequencer Total Ordering Gap Filler Replayer Rewinder Bridge Backup Sequencer Failover Logger Gap Filler Replayer Rewinder Dispatcher Backup Sequencer Failover Archiver CoralSequencer
Built for Mission-Critical Systems

From electronic exchanges to high-frequency trading firms, CoralSequencer powers infrastructures that can't waste microseconds or afford to fail. Evolve your distributed system naturally by just adding more nodes.

Ultra-Low Latency

3.3 microseconds average round-trip latency via UDP multicast. 2 million messages per second throughput. Kernel bypass support.

Total Message Ordering

Every node reads every message in the exact same deterministic order. The atomic broadcast protocol guarantees consistency across your entire distributed system, making it natural to set up HA clusters.

Multi-Transport

Switch between UDP multicast (on-prem), TCP (cloud), shared memory (same machine), and heap memory (automated tests) via configuration without any code changes.

Fully Deterministic

Centralized sequencer timestamps providing a fully deterministic clock to the entire distributed system. Replay any session archive for testing, simulation, auditing, compliance, debugging and validation.

Zero Garbage Collection

Zero garbage created per message. No GC overhead, no latency spikes. Binary, ultra-fast, no-xml, garbage-free serialization protocol included.

High Availability

No single point of failure. Sequencer failover. Multicast discovery. Hot-Hot nodes in perfect clusters. Tiered replayer architecture. Full-duplex TCP/UDP bridges with redundancy.

Benchmarked by You

Run our benchmark tests on your environment to measure latency and throughput numbers on your own network infrastructure. Below are some typical results over loopback.

Latency · 1024-byte messages
3.37 microseconds
Average round-trip latency per message over 1 million messages.
Minimum Latency: 2.7 microseconds
Throughput · with batching
2.33 million messages/sec
64-byte messages, 3 nodes pushing max rate.
429 nanoseconds average time per message at sequencer.
Throughput · 256-byte · batched
1.1 million messages/sec
3 nodes aggressively batching 256-byte messages.
895 nanoseconds average per message at sequencer.
Throughput · 256-byte · no batching
786 thousand messages/sec
One message per UDP packet, no batching.
1.27 microseconds average per message at sequencer.
Simple, High-Level API

Write nodes that publish and consume messages with a straightforward Java API. No boilerplate, no complexity.

SampleNode.java
public class SampleNode extends Node {

    public SampleNode(NioReactor nio, String name, Configuration config) {
        super(nio, name, config);

        addAdminCommand(new AdminCommand("sendTime") {
            @Override
            public boolean execute(CharSequence args, StringBuilder results) {
                sendTime();
                results.append("Time successfully sent!");
                return true;
            }
        });
    }

    private void sendTime() {
        sendCommand("TIME-" + System.currentTimeMillis());
    }

    @Override
    protected void handleMessage(boolean isMine, Message msg) {

        if (!isMine) return; // not interested, quickly drop it...

        ByteBuffer data = msg.getData(); // the raw bytes of the message...

        long epochInNanos = eventStreamEpoch(); // deterministic clock...

        CharSequence now = DateTimeUtils.formatDateTimeInNanos(epochInNanos);

        System.out.println("Saw my message at " + now + ": "
            + ByteBufferUtils.parseString(data));
    }
}
Everything You Need

A comprehensive feature set for building production-grade distributed systems.

Message agnostic — send and receive anything
Automatic replayer discovery via multicast
Message fragmentation at the protocol level
Deterministic single-threaded test framework
Full cloud support via TCP transport
Transparent batching and in-flight messages
Shared-memory dispatcher to avoid NIC fan-out
Session archive replay for auditing & testing
Full-duplex bridges (UDP & TCP) with redundancy
Hot-Hot nodes with instant failover
C++ node support
Remote admin via telnet, REST, and HTTP
Centralized and local timers
Multiple parallel sequencers with cross-connect
Trusted in Production for 10 Years
"
We have been working with CoralBlocks for a while now, and two aspects stand out: the product's top performance and clean architecture, and the level of engagement with our team. They embrace clients' challenges and ideas and add to their roadmap with a very fast turnaround.
~ Global Head of Electronic TradingUS Investment Bank
"
CoralBlocks is an extension of our firm, when it comes to their team and middleware product (CoralSequencer). We can jump on a call at any moment to get their support. It's the most robust third-party software we've ever used.
Lead ArchitectTop Tier Bank
"
The CoralBlocks libraries are a pleasure to use. We've traditionally been very wary of using external libraries in the critical path, choosing instead to write everything ourselves. A corner-case bug or unexpected performance blip would just be too costly to our business. But the extremely fast, garbage-free performance of CoralReactor and the other Coral libraries has made their use indispensable. Plus, the clean architecture of their APIs has guided our overall application design to be simpler and more performant. Most importantly, the Coral guys are incredibly responsive to even the most convoluted technical questions and feature requests.
Head Programmer NYC Prop Trading Firm
Ready to Build with CoralSequencer?

Request a full version trial and start building mission-critical deterministic distributed systems with ultra-low-latency messaging.