Networking for Traders
The networking basics behind trading: latency and distance, TCP versus UDP, multicast market data, packet loss, jitter and practical ways to improve connectivity.
Every price you see and every order you send travels over a network. The quality of that path decides how fresh your data is and how quickly your orders arrive. For most traders, the network is invisible until it fails. For latency sensitive strategies, it is a core part of the edge. A basic understanding of how networks carry trading traffic helps you diagnose problems, choose where to host systems and avoid paying for improvements that will not matter.
Key terms#
| Term | Meaning |
|---|---|
| Latency | Time for data to travel from one point to another |
| Round trip time (RTT) | Time to send a message and get a reply |
| Bandwidth | How much data can flow per second |
| Jitter | Variation in latency from one packet to the next |
| Packet loss | Packets that never arrive |
| Hop | Each router a packet passes through |
Distance sets the floor#
Signals in optical fibre travel at roughly two thirds of the speed of light in a vacuum, about 200 kilometres per millisecond. Through air, microwave signals travel close to the full speed of light, which is why high frequency firms built microwave networks between Chicago and New Jersey. No technology can beat the physics of distance; it can only take straighter paths. See High-Frequency Trading.
TCP versus UDP#
| TCP | UDP | |
|---|---|---|
| Delivery | Guaranteed, in order, with retransmission | Best effort; packets may be lost or reordered |
| Overhead | Higher, with handshakes and acknowledgements | Lower |
| Typical trading use | Order entry, FIX sessions, REST and WebSocket APIs | Exchange market data multicast |
| Handling loss | Automatic, but causes delays | Application must detect gaps. See Sequence Numbers, Dropped Packets and Out-of-Order Messages |
Multicast market data#
Exchanges often publish market data using UDP multicast: one stream sent once and delivered to every subscriber on the network. This is efficient and fair, since everyone receives packets at the same time from the exchange's side. Because UDP can lose packets, exchanges send A and B copies on separate lines and offer recovery services. See Feed Handlers and Normalization.
Common network problems#
| Problem | Symptom | Response |
|---|---|---|
| Packet loss | Gaps in feeds, TCP slowdowns | Check links, buffers, providers |
| Jitter | Unpredictable delays | Dedicated connections, quieter networks |
| Congestion | Delays during busy markets | More bandwidth, better routes |
| DNS failures | Cannot resolve broker hostnames | Reliable resolvers, cached addresses |
| Wi Fi interference | Random drops at home | Use wired Ethernet |
Practical improvements for retail traders#
- Use wired Ethernet instead of Wi Fi.
- Host bots on a server near the venue. See VPS, Cloud and Bare-Metal Servers.
- Have a backup connection, such as a mobile hotspot.
- Measure, with ping and traceroute to your broker, and log message delays. See Exchange vs Receive Timestamps and Latency Measurement.
- Use streaming APIs rather than repeated polling. See WebSocket Market Data Streams.
Professional networking#
Firms use co location, cross connects (direct cables between their equipment and the exchange's), leased lines between data centres, microwave and millimetre wave links, and specialised network cards. Some also use kernel bypass to skip the operating system's network stack. See Co-Location and Kernel Bypass and Low-Latency Networking.
Tuning on servers#
Operating system network buffers that are too small can drop packets during bursts. Increasing receive buffer sizes, checking interface error counters and keeping network interrupts on dedicated CPU cores are common steps. See CPU Affinity, NUMA and Cache Optimization.
Frequently asked questions#
Does internet speed matter for trading?#
Latency and reliability matter more than raw bandwidth. A stable, low latency wired connection is more valuable than high download speeds.
Why do exchanges use UDP for market data?#
UDP multicast efficiently sends the same data to many subscribers at once with low overhead; sequence numbers and redundant feeds handle any losses.
What is jitter in trading?#
Variation in network latency between packets, which makes timing unpredictable even when average latency is low.
Next, learn how containers package trading software in Docker and Kubernetes.
3 quick questions on this lesson. Get them all right to finish it.
Turn on JavaScript to take the quiz.
Mentioned in
- Trading Infrastructure ExplainedTrading Infrastructure
- Linux for TradersTrading Infrastructure
- CPU Affinity, NUMA and Cache OptimizationTrading Infrastructure
- Quant Developer and Trading EngineerThe Trading Industry