Presentation: How to Build an Exchange: Sub Millisecond Response Times and 24/7 Uptimes in the Cloud

· Source: InfoQ · Field: Finance & Economics — Banking & Financial Services, FinTech & Digital Financial Services, Capital Markets & Investment Management · Depth: Advanced, extended

Summary

Frank Yu, an engineering leader at Coinbase, outlines an engineering philosophy for building high-performance, resilient financial exchanges capable of sub-millisecond response times and 24/7 availability in the cloud. The approach emphasizes a single-threaded architecture for core logic, leveraging the Raft consensus algorithm for durability and consistency without traditional databases in the hot path. This design enables deterministic behavior, facilitating zero-downtime rolling deployments and precise bug reproduction through production log replay. The system prioritizes correctness, fairness, and availability, handling high transaction volumes (up to six figures per second) while maintaining P99 response times under one millisecond, even in cloud environments. Key elements include simple binary message encoding, pre-allocated memory to avoid garbage collection pauses, and CPU pinning to minimize OS interference.

Key takeaway

For software engineers building high-throughput, low-latency transactional systems, adopting a single-threaded, deterministic core logic with a consensus mechanism like Raft can significantly enhance reliability and performance. You should prioritize minimizing latency by co-locating critical components and avoiding memory allocations in the hot path. This architecture allows for rapid, zero-downtime deployments and simplifies debugging through log replay, crucial for maintaining 24/7 availability and meeting stringent financial infrastructure demands.

Key insights

Deterministic, single-threaded core logic with Raft consensus enables resilient, high-performance financial exchanges.

Principles

Method

Implement core business logic as a single-threaded, deterministic process. Use Raft for durability without a database in the hot path. Employ simple binary message encoding and pre-allocate memory to avoid GC pauses.

In practice

Topics

Best for: Software Engineer, DevOps Engineer

Related on AIssential

Open in AIssential →

Editorial summary, takeaway, and curation by AIssential. Original article published by InfoQ.