5G and Finance are Joined at the Hip.
How I used a 5G technology to speed Market Data Packet Processing
The intermingling of telecoms and finance has a long and storied history.
Because success in financial markets depends upon reacting to information the fastest, entrepreneurs have always tried to gain advantage by getting the information hot.
In 18th century, London financiers would send boats to meet ships arriving from America to get the latest information on commodities first-hand. When the governments laid telegraph network for imperial and military purposes, it was not long before enterprising financiers bribed their way onto them.
How does the battle for information advantage look today?
Picture a data center, with a never-ending row of servers stacked atop. A high-capacity optical fiber cable terminates at the Network Interface Card (NIC) of the machine. Here the hottest market data is offloaded. And then sent to the processor chip where the action on this information occurs.
The modern objective is to bridge this 3 cm or so gap between the NIC and the processor chip fastest. This is where 5G comes in.
Mind the gap.
Telecoms also need to bridge this gap. They use specialized servers called Switches. This is analogous to the phone operators who manually plugged lines to connect them in the black and white era. The lines, now stream of packets, arrive at the NIC of the switches, and the switch-operator is an application running on the processor, connects them.
The software that unloads the data from the NIC and gives it to the application on processor for switching, is called the “Network Stack”. [This is massive oversimplification].
Earlier the speed of the data were such that on commodity (non-fancy) hardware, the network stack that comes with the Operating System (OS) on the servers could manage. It was OK if the OS interrupted the network process or locked some hardware (technical terms). As a good security measure, OS only gave a duplicate copy to the application, even if copying is slow.
Operation Bypass.
For 5G speeds, the OS must be bypassed, the network process should be uninterruptable and be provided with the locks to the NIC. The usual model just won’t do.
This bypass is achieved by a tool called “data-plane development kit” (DPDK), developed by Intel and now open-sourced. It bypasses the kernel, the heart of the OS, and lets the application (here switch logic) assume control of the NIC.
This is a pretty wild thing to do. It is akin to severing the nerves that connect the eyes to the brain and reattaching them to a device labeled “DPDK” and hoping everything works. And it does!
We have 5G switches that do not need vendor-controlled hardware because of open-source DPDK. (We still need 5G antennae and receivers). Overall DPDK achieves a 10-fold increase in the speed of getting the data from NIC to the application on processor.
HFT-y opportunity
What accelerates packets in a telecoms network switch, will accelerate packet processing on brokerage datacenter servers. And you bet I know how, because I did it!
I wrote the DPDK enabled software installed on a broker’s server at NSE data center. Being a startup, I personally went to the NSE data center with the bubble-wrapped server in tow to have it set up.
The data center is a labyrinthine complex in the same building that houses the exchange at BKC, Mumbai. The server was wired up, I temporarily attached a monitor and enable remote access, logged in and started the application, ran some tests and took off.
The next morning, the thin optical fiber carrying the data from the exchange went live. Latest market data streamed onto the NIC. Without interruption from the OS, the DPDK network process hurried it hot to the market intelligence application running 3 cm away on the processor. The system was go!
Another battle was won that day, and HFTy oppourtinty grasped. The war for information continues.
Great article