Building Resilient Crypto Trading with Ultra-Low Latency (ULL): A Dual-Connection Setup for Speed an
Introduction
In the fast-paced world of high-frequency trading (HFT), every microsecond counts. Today, I'll share how to implement a dual Ultra-Low Latency (ULL) connection setup that's becoming crucial for trading operations, particularly when connecting to cloud infrastructure like AWS.
Why This Matters
For traders, especially those dealing with algorithmic and high-frequency trading, traditional cloud connectivity often isn't fast enough. Cloud providers' native backbones can introduce unnecessary latency. By implementing a dual ULL setup, we can:
Achieve sub-millisecond latency
Ensure 100% uptime through redundancy
Bypass slower cloud provider backbones
Maintain consistent performance during network issues
The Architecture
Our setup involves:
Two separate ULL subsea connections
Four Direct Connect (DX) locations (two per region)
BGP Active/Standby configuration
Multiple Virtual Interfaces (VIFs)
Key Components:
2 x DX Gateways
4 x DX Connections (2 per region)
4 x VIFs
Each DXGW associated with 2 x VIFs & 1 x VGW
The BGP Setup
We implement an Active/Standby BGP configuration where:
Primary path uses DX Location 1
Secondary path uses DX Location 2 with BGP prepend
Both paths utilize separate ULL subsea cables
BFD (Bidirectional Forwarding Detection) enabled for rapid failover
Failover Mechanism
The system provides seamless failover through:
Active BGP path monitoring
Automatic failover to secondary path
Zero packet loss during transition
Automatic recovery when primary path returns
Failover Test 1 - Simulation on Primary ULL Path BGP down
On AWS Console, select the "SG DX Location 1 vif" to simulate the "ULL Subsea 1" connection down.
We continuously performed ping tests between the Singapore EC2 and Tokyo EC2 instances, and the failover results demonstrated 0% packet loss while switching to the backup path.
The results also demonstrated that this dual BGP setup can maintain AWS routing, ensuring the workload remains unaffected and the failover is extremely fast.
Failover Test 2 - Simulation on Primary ULL "Subsea" cable breaks
This time we breaks the connection between Singapore and Tokyo routers
Conclusion
While this setup requires significant investment and expertise, it's becoming a standard requirement for serious trading operations. The combination of ultra-low latency and high resilience provides the infrastructure backbone needed for modern trading operations.
Remember: in trading, being just a millisecond faster can mean the difference between profit and loss. This dual ULL setup ensures you're always operating at peak performance, with a backup ready to take over instantly if needed.
Last updated