# 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.

Source: https://learn.tradelabsai.com/infrastructure/networking-for-traders/  
Track: Trading Infrastructure · Level: Advanced · Updated: 2026-10-03  
Publisher: TradeLabs AI (https://tradelabsai.com). Education, not financial advice.  
Cite as: TradeLabs Learn, "Networking for Traders", https://learn.tradelabsai.com/infrastructure/networking-for-traders/

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](https://learn.tradelabsai.com/algo-trading/high-frequency-trading/).

**Example: Estimating minimum latency**
The straight line distance between Chicago and New York is roughly 1,150 kilometres. In fibre at about 200 kilometres per millisecond, the one way time is at least 5.75 milliseconds, or 11.5 milliseconds round trip, and real fibre routes are longer than straight lines. Microwave at close to 300 kilometres per millisecond gives a one way floor of about 3.8 milliseconds. That difference of around 2 milliseconds each way is why firms paid heavily for microwave routes. See [Latency in Trading](https://learn.tradelabsai.com/orders/latency-in-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](https://learn.tradelabsai.com/programming/sequence-numbers/) |

## 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](https://learn.tradelabsai.com/programming/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

1. **Use wired Ethernet** instead of Wi Fi.
2. **Host bots on a server near the venue.** See [VPS, Cloud and Bare-Metal Servers](https://learn.tradelabsai.com/infrastructure/vps-cloud-and-bare-metal-servers/).
3. **Have a backup connection,** such as a mobile hotspot.
4. **Measure,** with ping and traceroute to your broker, and log message delays. See [Exchange vs Receive Timestamps and Latency Measurement](https://learn.tradelabsai.com/programming/latency-measurement/).
5. **Use streaming APIs** rather than repeated polling. See [WebSocket Market Data Streams](https://learn.tradelabsai.com/programming/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](https://learn.tradelabsai.com/infrastructure/co-location/) and [Kernel Bypass and Low-Latency Networking](https://learn.tradelabsai.com/infrastructure/kernel-bypass/).

## 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](https://learn.tradelabsai.com/infrastructure/cpu-affinity/).

## 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](https://learn.tradelabsai.com/infrastructure/docker-and-kubernetes/).

## Continue learning

- Next lesson: [Docker and Kubernetes](https://learn.tradelabsai.com/infrastructure/docker-and-kubernetes/)
- Previous lesson: [Linux for Traders](https://learn.tradelabsai.com/infrastructure/linux-for-traders/)
- Related: [Linux for Traders](https://learn.tradelabsai.com/infrastructure/linux-for-traders/): The Linux skills traders need to run bots on servers: the command line, files, processes, services with systemd, logs, scheduling, SSH security and updates.
- Related: [Latency in Trading](https://learn.tradelabsai.com/orders/latency-in-trading/): Latency is the delay between a market event and your reaction to it. Learn the sources of trading latency, how it is measured and when it matters for your trades.
- Related: [Exchange vs Receive Timestamps and Latency Measurement](https://learn.tradelabsai.com/programming/latency-measurement/): How to measure latency in a trading system: where to timestamp, tick to trade and order round trip, percentiles instead of averages and how to find bottlenecks.
- Related: [Co-Location](https://learn.tradelabsai.com/infrastructure/co-location/): Co location places trading servers inside or beside an exchange's data centre to cut latency. Learn how it works, what it costs, fairness rules and who needs it.
- Related: [Kernel Bypass and Low-Latency Networking](https://learn.tradelabsai.com/infrastructure/kernel-bypass/): Kernel bypass lets trading software read network packets straight from the network card, skipping the operating system. Learn how it works and the trade offs.
- Related: [Sequence Numbers, Dropped Packets and Out-of-Order Messages](https://learn.tradelabsai.com/programming/sequence-numbers/): Sequence numbers let trading systems detect lost, duplicated or out of order messages. Learn how gap detection, recovery and duplicate handling work in practice.
