Socket Sharding With kdb+ And Linux

25 January 2018 | 1 minute

In the latest KX technical whitepaper, Marcus Clarke discusses the use of Socket Sharding, which was introduced as a new feature in kdb+ V3.5. Socket Sharding enables the use of Linux’s SO_REUSEPORT socket option, which allows multiple sockets to listen on the same IP address and port number combination. The kernel will then allocate connection requests across the listening processes.

In this paper, Marcus investigates several scenarios where processes are running with this socket option enabled. These include adding more listener processes on the fly, sending a large volume of requests, routing connections when one listener process is busy and rolling updates to minimize downtime.

On Linux systems, the SO_REUSEPORT option was introduced in kernel version 3.9, so the commands in the examples below will fail if run on an older version of Linux.

Marcus Clarke is a kdb+ consultant for KX and has worked at a number of leading financial institutions in both the UK and Asia. Currently based in New York, he is designing, developing and maintaining a kdb+ system for multiple asset classes at a top tier investment bank.

Demo kdb, the fastest time-series data analytics engine in the cloud








    For information on how we collect and use your data, please see our privacy notice. By clicking “Download Now” you understand and accept the terms of the License Agreement and the Acceptable Use Policy.