Exa-Networks / exabgp

The BGP swiss army knife of networking
Other
2.06k stars 441 forks source link

about the efficiency of route announcement #1139

Open yuxuehong opened 1 year ago

yuxuehong commented 1 year ago

hi~ Let me talk about my scenario first. I need to announce 200k routes at the moment, but the time it takes to announce to the peers in the current usage situation will last for tens of seconds. I want to test the routing performance of the peers, so I hope that the 200k routes can be completed in an instant. When it comes to peers, I wonder if exabgp supports the scenario of establishing neighbors first and then announcing routes? What I mean is to build multiple exabgp instances, and each instance corresponds to a neighbor. After the neighbor is successfully established, the route is announced uniformly, and each instance declares a part of the route. thank you.

thomas-mangin commented 1 year ago

There is a delay feature which allows exabgp to parse the configuration file, then generate the route objects before blasting then to the peer: exabgp.tcp.delay

❯ ./sbin/exabgp | grep exabgp.tcp.delay
    exabgp.tcp.delay            start to announce route when the minutes in the hours is a modulo of this number. default (0)
thomas-mangin commented 1 year ago

It has been some time and I have not tested the feature for some time, but if you pass multiple configuration file to exabgp, it will fork one python instance for each configuration file.

yuxuehong commented 1 year ago

thank you for your reply! I want to know how to set exabgp.tcp.delay, and i want to know is it necessary to establish a neighbor when exabgp starts, or is there any way to use one exabgp to establish a neighbor, and another exabgp to advertise routes to existing neighbors

thomas-mangin commented 1 year ago

It is an environment variable so it will be set by using 'set' or 'export' with your shell.

thomas-mangin commented 1 year ago

You can use the API to tell exabgp what to advertise to the configured peers.

yuxuehong commented 1 year ago

I have tried it. Exabgp.tcp.delay is set, but the neighbor is not established in advance. The neighbor will be established and the route will be announced after the delay is over. It seems that the delay is used to couple the establishment of the neighbor with the routing announcement , modifying exabgp.log.level can achieve a certain effect, but the effect is not great

yuxuehong commented 1 year ago

use the API to tell exabgp what to advertise to the configured peers.

Each exabgp instance needs to be configured with a neighbor. At the same time, when exabgp is started, it will try to establish a neighbor. If the configuration of the neighbor in the two instances is the same, the last exabgp instance that is started will report an error, or any info I missed?

thomas-mangin commented 1 year ago

You can have multiple neighbours per file. And you can pass multiple conf files on the command line; one exabgp process will be started per config file.

You should only configure the same neighbour in one file. If more than one is setup, one of the sessions will be refused by your peer (as it already has a session established for that IP pair elsewhere).