# 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:

1. Two separate ULL subsea connections
2. Four Direct Connect (DX) locations (two per region)
3. BGP Active/Standby configuration
4. Multiple Virtual Interfaces (VIFs)

<figure><img src="/files/320c7yPIVVfwstPOLaQ2" alt=""><figcaption></figcaption></figure>

### 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

<figure><img src="/files/YrcmnLhYJyvZEEJFawk4" alt=""><figcaption></figcaption></figure>

### 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

<figure><img src="/files/TVHTScfdlO0pBv2GklxD" alt=""><figcaption></figcaption></figure>

### Failover Mechanism

The system provides seamless failover through:

* Active BGP path monitoring&#x20;
* 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.

<figure><img src="/files/RKuq4Q6QQAjic4ZGJ7Dw" alt=""><figcaption></figcaption></figure>

{% hint style="success" %}
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.
{% endhint %}

<figure><img src="/files/o3B5sDDJMf9zM6Q3u4lf" alt=""><figcaption></figcaption></figure>

{% hint style="success" %}
The results also demonstrated that this dual BGP setup can maintain AWS routing, ensuring the workload remains unaffected and the failover is extremely fast.
{% endhint %}

<figure><img src="/files/rhdyUNyrLNErcP5HZIez" alt=""><figcaption></figcaption></figure>

### Failover Test 2 - Simulation on Primary ULL "Subsea" cable breaks

This time we breaks the connection between Singapore and Tokyo routers

<figure><img src="/files/hZ9T3h2v0VGHK1wAatCJ" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
The results below illustrate the routing path before and after the failure of ULL Path 1. They confirm that no packet loss occurred during the transition, as traffic seamlessly rerouted to ULL Path 2 without any interruptions. Most importantly, the dual-link setup with dual BGPs and DXGW demonstrated flawless failover functionality, as expected.
{% endhint %}

<figure><img src="/files/YwzNXRfjdzR632Zh3QXm" alt=""><figcaption></figcaption></figure>

## 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.

If your team needs our Ultra Low Latency network expertise or would like to discuss deployment options, our specialists are ready to help. Reach out to us at <consolesupport@a-fieldtech.com> to explore how we can enhance your trading infrastructure with our proven ULL solutions.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.a-fieldtech.com/a-fieldtech-docs/tech-blog/this-is-the-a-field-tech-tech-blog/building-resilient-crypto-trading-with-ultra-low-latency-ull-a-dual-connection-setup-for-speed-an.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
