Engineering6 min read

Anycast, ECMP & BGP for a national IPTV edge

A national IPTV network is only as good as its routing. Anycast, ECMP and BGP are how you send each viewer to the nearest healthy edge — and reroute them in seconds when one fails.

Running edges in Kolkata, Delhi and Mumbai is easy. Getting each viewer to the right one automatically, and moving them when a PoP dies, is the job of three routing tools.

The three tools

How they work together

Announce your edge service via anycast from all three metros. A Delhi viewer’s traffic is routed to the Delhi PoP because it’s nearest; a Mumbai viewer to Mumbai. ECMP load-balances within a PoP. If a PoP fails and stops announcing, BGP withdraws the route and users automatically fall to the next-nearest PoP — no DNS change, no manual intervention.

Anycast + BGP give you nearest-PoP routing and automatic failover from the same mechanism: when a PoP stops announcing, the internet just stops sending it traffic. That’s resilience built into the routing, not bolted on top.

Where it ties into peering

This is also how IXP peering is realised: your BGP session at each exchange announces your edge to the regional ISPs peering there, so their subscribers reach you locally and cheaply.

The caveat

Anycast for stateful sessions needs care — a mid-session reroute can break a connection unless the design is stateless at the edge. Token-validated, stateless edges (which HySky uses) tolerate rerouting cleanly.

Lessons

This is the kind of problem HySky is built around.

Talk to a team that runs a live operator, not just sells software.

WhatsApp us