Trie Ip

Building a High-Performance IP Prefix Map in Go When working at scale with network devices and BGP peers, efficiently managing and querying IP address information becomes crucial. In this post, I’ll share how we built a high-performance IP prefix map using a Trie data structure in Go, and how it solved real-world problems. The Problem: BGP Peer to Interface Mapping While working at a previous company, we faced an interesting challenge: we needed to quickly determine which interface a BGP peer was associated with. Each network device had multiple interfaces, each with its own subnet, and BGP peers could connect from any of these ranges. Traditional IP lookup methods were either too slow or memory-intensive for our needs. ...

December 12, 2024 · 4 min · 662 words · Jared Henry