Data Dissemination part 4 : Role of TCP and Operating System

Deepak Sanchety
4 min readMar 11, 2019

--

This is part 4 of a 5 part series on data dissemination system of NSE during TCP TBT. In this part I’ll talk about operating system and TCP protocol used to disseminate tick data. NSE TBT system was a single sender multiple receiver TCP system. The TCP stack on the operating system is designed in such a way that it acts as a randomizer while sending data. Any serial data across multiple receivers gets parallelized by the operating system. Part 4 is about the parallelization done by the TCP. Read here for Part 1, Part 2 and Part3 .

Image courtesy www.mondaynote.com

The data dissemination from NSE to members is a multi-layer process, encompassing data movement from NSE trade server to dissemination server, from there to the switch, from the switch to the member server, from the member server to its algorithm and so on.

Given the multi-layer TBT data dissemination process, there cannot be a concept of an absolute first access to the NSE system. The First Come-First Serve (FCFS) dissemination policy existed between the dissemination server port and the member server. The FCFS policy was implemented by NSE TBT software. The tick data was sent by the TBT software and traversed through the NSE network. The network consisted of many software and hardware components both in NSE and members’ network. The tick was finally received by the client.

Any software which runs on a computer runs on top of an operating system (OS). This operating system is a master program which controls the behavior of all programs running on that computer. The operating system is the lifeline of any computer and provides the basic functions for smooth operation. Network management, file system support, scheduling etc. are all provided by the operating system. When any software wants to send data on the network using TCP, it has to use the TCP implementation provided by the OS.

Image Courtesy Shawn Powers

NSE’s TBT data dissemination sent out the same data to various clients. This implementation is often known as single sender multiple receiver (SSMR) configuration. The TCP implementation in this configuration is independent of the data transfer policy of the software. The TCP implementation in the OS is designed to provide equitable access to each of the receivers. In the SSMR configuration, each receiver has an independent space for storage. This storage is often referred to as queue and there are as many queues as the number of receivers. The software passes the data packet to the OS and the OS then takes the responsibility of sending the data packet on the network. When the OS receives a packet, it does not attempt to send out the packet immediately. The packet is first stored in client specific queue. The queue consists of packets which have not been sent out for a particular receiver.

Image Courtesywww.dreamstime.com

The congestion control in the TCP protocol in fact attempts to process all the queues in parallel for equitable access. The sequential nature of data dissemination by the software is converted into parallel by the OS. This behavior can be often observed at a bus stop. Each bus has its own independent queue. Even though a person A might arrive before a person B on the bus stop, person A might not get onto his bus necessarily before person B. Just like the arrival of buses is independent to the arrival of people at the bus stop, the sending out of the packets by the OS is independent of when the packet arrived in the queue.

The operating system behaves like a randomizer in a TCP based SSMR configuration. This fact raises a very important question. When TBT software attempted to disseminate data sequentially to multiple clients, did the OS on the same machine parallelize the data dissemination? The simulations run by E&Y report submitted to SEBI seems to suggest exactly this.

In the NSE colocation, the very technology used i.e. TCP seems to have acted as a randomizer and load balancer during dissemination.

Next, I’ll write about the role of the redundancy server or the secondary server.

All articles are here. The author advises market participants in legal matters related to securities markets and has advised some noticees in this matter also.

--

--

Deepak Sanchety

Engineer, retired bureaucrat (IRS), Ex-Chief of Market Surveillance at SEBI. Advisor to corporates and market participants. Technology enthusiast.