e-Forex-Nov-23

01.12.2023 Views

Achieving and maintaining an ultra-low latency FX trading infrastructure “Even a minor tweak can ripple through the latency landscape. This is where specialised monitoring systems earn their keep” replacements can be expensive, while software optimisations are often more cost-effective. well as the closeness of its vendor relationships. Distance from the participant is yet another crucial factor. McArthur notes that just 200 metres of cabling can introduce approximately one microsecond of latency in each direction. TRADERS WORKSHOP Ariel Silahian • Code that has not been optimised for speed • Subscribing to too much market data To determine whether these issues can be resolved via software or hardware solutions, the first step is to identify the type of latency (network, disk, application) suggests Eugene Markman, ION FX Chief Operating Officer. “Each requires a different approach,” he continues. “Network latency issues, for instance, may be addressed with software optimisations or by upgrading network hardware. A root cause analysis is important to determine whether the source is a software bug, inefficient code, network congestion, or hardware limitations.” From this, bottlenecks will need to be identified and resolved. If the bottleneck is due to hardware limitations such as a slow disk drive or insufficient RAM, a hardware upgrade may be necessary, whereas optimisation can resolve inefficient resource usage. Hardware upgrades or DON’T REST ON YOUR LAURELS Enabling ultra-low latency trading is an ongoing process. In addition to inadequate or ageing hardware components, slow network connections, poorly designed software architecture, and inefficient code, there are a host of other factors that can degrade operational performance. “Relying on third party data providers or trading platforms can introduce latency, especially if these services experience delays or downtime,” says Markman. “Inefficient data processing or a lack of parallel processing can also lead to latency, as can inefficient order routing algorithms or connections to exchanges.” Performing thorough risk checks and compliance validation can add latency to trading systems, which underlines the challenge of balancing low latency execution and effective risk management. “Rapidly changing market conditions can stress trading systems and lead to latency degradation, as can overloading the trading system with too many orders or data feeds,” adds Markman. “It is also essential to carefully validate software updates or patches before deploying them in a trading environment.” Inevitably, cost is a major consideration. Software fixes tend to be cheaper, but new hardware may provide a long term solution. The final decision is often influenced by whether the firm has in-house software or hardware expertise, as “The choice between store and forward switching and low latency cut-through switches is also significant,” he explains. “Enterprise switches (designed for capacity and throughput) often involve large buffers and store and forward operation, taking tens of microseconds to pass on packets. Conversely, purpose built low latency cut-through switches can deliver packets in hundreds of nanoseconds.” Where there is redundancy built into the architecture (for example, high availability switches, bonded NICs, or primary and secondary network links) it can be easy to forget to test the failover or monitor the performance of secondary routes. “A good system will have ongoing failover/resiliency testing and monitor the impact on performance,” adds McArthur. KEEP YOUR EYES ON THE PRIZE To establish an ultra-low latency framework it is crucial to have clear targets, controls, and an understanding of the trading platform’s scope. Any deviation from these parameters can result in performance declines, suggests Culiniac. “A comprehensive monitoring and analysis system is therefore essential, one that integrates both technical and business indicators to detect and address any early signs of potential degradation,” he adds. Markman refers to a number of analytical toolsets that can help firms monitor the state of their trading infrastructures: 72 NOVEMBER 2023 e-FOREX

TRADERS WORKSHOP “Rapidly changing market conditions can stress trading systems and lead to latency degradation, as can overloading the trading system with too many orders or data feeds” Eugene Markman • Specialised market data feed handlers like MarketFactory enable efficient and low latency handling of market data feeds from various ECNs and data providers • In-memory databases such as Apache Kafka can store and process data with extremely low latency • Tools like Grafana and Kibana enable the creation of customisable, real time dashboards for monitoring trading system performance and latency metrics • The network monitoring capabilities of Crovill and Geneos can help to identify and address network latency issues • Cloud-based platforms such as AWS Lambda, Google Cloud Functions, and Microsoft Azure Functions provide scalable resources for real time data analytics and can be integrated into trading systems Ultra-low latency architecture is underpinned by a comprehensive suite of monitoring and analytical instruments which go beyond conventional systems. These tools include advanced statistical models capable of predicting potential bottlenecks through forecasting. “Additionally, AI enhances the system by grouping related incidents, allowing for more efficient troubleshooting and resolution,” says Culiniac. “Alert engines are fine-tuned to promptly notify technicians of any emerging issues. These sophisticated tools operate on top of the basic monitoring infrastructure, providing a multilayered defence against latency-related performance degradation.” The slightest disruption - network congestion, for example, or a snag in scalability - can throw a spanner in the works, while dependencies on external services such as data providers are another wildcard. “Even a minor tweak can ripple through the latency landscape,” says Silahian. “This is where specialised monitoring systems earn their keep.” THE MORE INFORMATION THE BETTER Increased market volumes demand analytics that can scale in real time. McArthur observes that the global expansion of cloud infrastructure and lower latency links has shifted focus from a localised race to zero latency to a more globally connected trading infrastructure. “A key trend is combining analytics from multiple sources,” he says. “Openness of data is crucial for seamless integration with other toolsets.” The current toolkit for monitoring ultra-low latency trading setups is dispersed across individual tools. Network analytics tools use AI to catch network hiccups in real time and suggest fixes, and there are applications offering precise timestamping to track data flow down to the picosecond. Development frameworks are also on the table, easing the creation and upkeep of ultra-low latency setups, although Silahian says most firms will build their own tools and monitoring systems based on their specific needs. The decision to either undertake to build an ultra-low latency infrastructure in-house or outsource it to a specialist provider is usually influenced by financial resources and in-house expertise according to Markman. TO DETERMINE WHETHER ISSUES CAN BE RESOLVED VIA SOFTWARE OR HARDWARE SOLUTIONS, THE FIRST STEP IS TO IDENTIFY THE TYPE OF LATENCY NOVEMBER 2023 e-FOREX 73

Achieving and maintaining an ultra-low latency FX trading infrastructure<br />

“Even a minor tweak can ripple through the latency<br />

landscape. This is where specialised monitoring systems earn<br />

their keep”<br />

replacements can be expensive, while<br />

software optimisations are often more<br />

cost-effective.<br />

well as the closeness of its vendor<br />

relationships.<br />

Distance from the participant is yet<br />

another crucial factor. McArthur<br />

notes that just 200 metres of cabling<br />

can introduce approximately one<br />

microsecond of latency in each<br />

direction.<br />

TRADERS WORKSHOP<br />

Ariel Silahian<br />

• Code that has not been optimised<br />

for speed<br />

• Subscribing to too much market<br />

data<br />

To determine whether these issues<br />

can be resolved via software or<br />

hardware solutions, the first step is to<br />

identify the type of latency (network,<br />

disk, application) suggests Eugene<br />

Markman, ION FX Chief Operating<br />

Officer.<br />

“Each requires a different approach,”<br />

he continues. “Network latency<br />

issues, for instance, may be addressed<br />

with software optimisations or by<br />

upgrading network hardware. A<br />

root cause analysis is important to<br />

determine whether the source is<br />

a software bug, inefficient code,<br />

network congestion, or hardware<br />

limitations.”<br />

From this, bottlenecks will need<br />

to be identified and resolved. If<br />

the bottleneck is due to hardware<br />

limitations such as a slow disk drive<br />

or insufficient RAM, a hardware<br />

upgrade may be necessary, whereas<br />

optimisation can resolve inefficient<br />

resource usage. Hardware upgrades or<br />

DON’T REST ON YOUR LAURELS<br />

Enabling ultra-low latency trading<br />

is an ongoing process. In addition<br />

to inadequate or ageing hardware<br />

components, slow network<br />

connections, poorly designed software<br />

architecture, and inefficient code,<br />

there are a host of other factors that<br />

can degrade operational performance.<br />

“Relying on third party data providers<br />

or trading platforms can introduce<br />

latency, especially if these services<br />

experience delays or downtime,” says<br />

Markman. “Inefficient data processing<br />

or a lack of parallel processing can also<br />

lead to latency, as can inefficient order<br />

routing algorithms or connections to<br />

exchanges.”<br />

Performing thorough risk checks and<br />

compliance validation can add latency<br />

to trading systems, which underlines<br />

the challenge of balancing low<br />

latency execution and effective risk<br />

management.<br />

“Rapidly changing market conditions<br />

can stress trading systems and<br />

lead to latency degradation, as can<br />

overloading the trading system with<br />

too many orders or data feeds,” adds<br />

Markman. “It is also essential to<br />

carefully validate software updates or<br />

patches before deploying them in a<br />

trading environment.”<br />

Inevitably, cost is a major<br />

consideration. Software fixes tend<br />

to be cheaper, but new hardware<br />

may provide a long term solution.<br />

The final decision is often influenced<br />

by whether the firm has in-house<br />

software or hardware expertise, as<br />

“The choice between store and forward<br />

switching and low latency cut-through<br />

switches is also significant,” he explains.<br />

“Enterprise switches (designed for<br />

capacity and throughput) often involve<br />

large buffers and store and forward<br />

operation, taking tens of microseconds<br />

to pass on packets. Conversely, purpose<br />

built low latency cut-through switches<br />

can deliver packets in hundreds of<br />

nanoseconds.”<br />

Where there is redundancy built into<br />

the architecture (for example, high<br />

availability switches, bonded NICs, or<br />

primary and secondary network links)<br />

it can be easy to forget to test the<br />

failover or monitor the performance of<br />

secondary routes.<br />

“A good system will have ongoing<br />

failover/resiliency testing and monitor<br />

the impact on performance,” adds<br />

McArthur.<br />

KEEP YOUR EYES ON THE PRIZE<br />

To establish an ultra-low latency<br />

framework it is crucial to have<br />

clear targets, controls, and an<br />

understanding of the trading<br />

platform’s scope.<br />

Any deviation from these parameters can<br />

result in performance declines, suggests<br />

Culiniac. “A comprehensive monitoring<br />

and analysis system is therefore essential,<br />

one that integrates both technical and<br />

business indicators to detect and address<br />

any early signs of potential degradation,”<br />

he adds.<br />

Markman refers to a number of analytical<br />

toolsets that can help firms monitor the<br />

state of their trading infrastructures:<br />

72 NOVEMBER 20<strong>23</strong> e-FOREX

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!