Canonical: https://nitride.xyz/blog/two-feeds-in-parallel

# Running two shred feeds side by side, and when it pays

Two shred feeds on one server can fill each other's gaps and give you a running comparison. How to set it up, merge the streams, and decide if it pays.

Running two shred feeds into the same server gives you two things: shreds one feed dropped may arrive on the other, and you get a running comparison of which feed delivers first on your own machine. It costs a second subscription and a receiver that merges and deduplicates. It pays when missed shreds cost real money.

## What a second feed buys you

**Fewer gaps.** Raw UDP drops packets, and nothing resends them. Two feeds rarely lose the same packet, because their paths differ. Where one feed has a gap in a slot's shred indexes, the other often fills it, and your decoder completes more FEC sets than either feed alone would allow.

**First arrival, every time.** With both feeds on one server and one clock, you can take whichever copy of each shred arrives first. The merged stream is at least as early as the earlier feed for every shred.

**A permanent benchmark.** You stop wondering whether a feed got slower. Every shred seen on both ports is a measurement, collected all day, on the machine that trades. Our guide on [how to read a shred provider's latency claim](https://nitride.xyz/blog/reading-latency-claims) explains why your own numbers beat anyone's published ones.

**A spare.** If one feed stops, for an expired term, a network fault or a firewall change, the other keeps the bot running while you fix it, and you fix it without the pressure of a silent strategy.

## Setting it up

**Separate ports, separate sockets.** Give each feed its own UDP port and its own receiving thread, so a burst on one cannot fill the other's buffer. Tag every datagram with which feed it came from.

**Timestamp at the socket.** Record the kernel receive time for each datagram. Comparing feeds needs that, and so does choosing the earlier copy.

**Deduplicate by identity.** A shred is identified by its slot, its index and whether it is a data or coding shred. Keep a short window of recently seen identities and drop the second copy. Our docs on [detecting gaps and duplicates](https://nitride.xyz/docs/receiver/gap-detection) show the bookkeeping.

**Check that both feeds agree.** Two copies of the same shred should be identical. If they differ, something is wrong upstream or on your side, and you should not decode either until you know which.

**Decode from the merged stream.** Feed the deduplicated stream, not either raw feed, into your decoder. That way a shred missing on one port but present on the other still completes its FEC set, and the strategy sees one consistent view of each slot.

**Watch for one feed going quiet.** If a feed stops delivering, the merged stream keeps flowing and the problem can go unnoticed for days. Alert on each feed's packet rate separately, not only on the merged total.

**Log the comparison, not every packet.** Per slot, record how many shreds each feed delivered, how many only one feed had, and which feed won each shred both had. That summary is small and tells you everything you need.

## When it pays, and when it does not

**It pays when** a missed transaction costs more than the second feed. A bot that races for liquidations or launches loses money on every gap at the wrong moment, and a second path closes many of them. It also pays while you are choosing a provider, since several weeks of side by side data settle the question better than any trial.

**It does not pay when** your workload tolerates gaps. An indexer that reconciles from RPC, or alerting where a missed message is followed a moment later by a confirmed one, gains little from a second raw feed. A settling path on confirmed data covers the gaps more cheaply.

**Mix and match.** The two feeds do not have to be the same product or from the same seller. With us, you could run Ultra Low Latency Shreds on one port, which goes directly from our server to yours with no relay hop, and another seller's feed on a second port. Or, if you only want to see what the shorter route is worth, run our two plans side by side for a term and compare. The [Ultra vs Standard comparison](https://nitride.xyz/compare/ultra-vs-standard-shreds) explains the routes, and the [provider comparison](https://nitride.xyz/compare/best-solana-shredstream-providers) lists other sellers.

**Know what you are comparing.** If both feeds come from the same seller on different routes, the comparison measures the routes. If they come from different sellers, it also measures where each seller receives shreds and how it passes them on. Both are useful, but they answer different questions.

**Start with one.** Most of the benefit depends on getting one receiver right first: buffers sized, decoder tested, monitoring in place. A second feed into a receiver that drops packets at its own socket just gives you two sets of gaps. Our [packet loss explainer](https://nitride.xyz/learn/packet-loss-and-jitter) covers where losses come from.

Each plan has a free 2-hour trial, once per person. Email support@nitride.xyz with the IPv4 address and UDP port you want to test. We verify you receive on that address, then your 2 hours start.
