As we come to the end of this phase of our performance and scale testing, we have turned our attention to the Flock Networks Operations REST API.
Flock Networks routing suite v20.3.5 is out now and it can sort and serialize the 763k BGP routes (as seen at LINX) into JSON and then stream them over HTTP in under 2s.
you@your-host:~$ time flockc bgp --prefix --host 192.168.101.194 > bgp_table.json real 0m1.972s you@your-host:~$ wc bgp_table.json 763307 763307 223051579 bgp_table.json
Because BGP routes have so much meta data (BGP path attributes etc) that is 223 MB of data.
you@your-host:~$ ls -l bgp_table.json -rw-r--r-- 1 you you 223051579 Sep 30 09:51 bgp_table.json
If we are feeling a bit crazy we can now diff the internet backbone in real time !
you@your-host:~$ flockc bgp --prefix --host 192.168.101.194 > bgp_table_later.json you@your-host:~$ diff bgp_table.json bgp_table_later.json 2888d2887 < {"ip_net":"2.16.12.0/23","best_entry":{"neigh":{"neigh_ipv4_addr":"10.20.0.1","attrs":{"origin":"Igp","as_path":{"segments":[{"segment_type":"AsSequence","segment_value":[65020,8607,2914,3257,20940,20940,16625]}]},"next_hop":"10.20.0.1","atomic_aggregate":false}},"reason":"OnlyValidPeer"}}
Or we can deserialize using the language of our choice and take control of the data.
you@your-host:~$ flockc bgp --prefix --host 192.168.101.194 -J --show-url http://192.168.101.194:8000/bgp/prefix?ipv4_net=*/sort/json you@your-host:~$ python3 >>> import requests >>> r = requests.get('http://192.168.101.194:8000/bgp/prefix?ipv4_net=*/sort/json') >>> deserialized_json = r.json() >>> len(deserialized_json) 763307 >>> deserialized_json[42] {'ip_net': '1.0.201.0/24', 'best_entry': {'neigh': {'neigh_ipv4_addr': '10.20.0.1', 'attrs': {'origin': 'Igp', 'as_path': {'segments': [{'segment_type': 'AsSequence', 'segment_value': [65020, 8607, 3356, 3491, 38040, 23969]}]}, 'next_hop': '10.20.0.1', 'atomic_aggregate': False}}, 'reason': 'OnlyValidPeer'}}
The Flock Networks Routing Suite has excellent observability because all operational state queries can be returned in JSON format using a machine friendly API.
More information on using the Operations REST API can be found here. The software can be downloaded from here.