Skip to content

netip: table/policy use github.com/gaissmai/bart Trie#3103

Open
nplanelcisco wants to merge 2 commits intoosrg:masterfrom
nplanelcisco:nplanel/table-bart
Open

netip: table/policy use github.com/gaissmai/bart Trie#3103
nplanelcisco wants to merge 2 commits intoosrg:masterfrom
nplanelcisco:nplanel/table-bart

Conversation

@nplanelcisco
Copy link
Contributor

No description provided.

@nplanelcisco nplanelcisco changed the title netip: use github.com/gaissmai/bart Trie netip: table/policy use github.com/gaissmai/bart Trie Aug 26, 2025
@fujita
Copy link
Member

fujita commented Aug 26, 2025

How stable is github.com/gaissmai/bart? Is it being used in any major OSS projects?
And it's faster than the current implementation?

@nplanelcisco
Copy link
Contributor Author

How stable is github.com/gaissmai/bart? Is it being used in any major OSS projects? And it's faster than the current implementation?

I has been mentioned in #1414 by the author @gaissmai
It's use by https://github.com/slackhq/nebula
Tailscale use the same algorithm https://github.com/tailscale/art (Gaissmai got inspired by this repo)

#1414 have already some benchmark, but I will add some specific in table_test.go and/or policy

@nplanelcisco
Copy link
Contributor Author

cc: @vincentbernat

@gaissmai
Copy link

Tailscale use the same algorithm https://github.com/tailscale/art (Gaissmai got inspired by this repo)

True, I was inspired by tailscale/art, but Tailscale now also uses gaissmai/bart and, for example, TecharoHQ/anubis as well as database64128/shadowsocks-go and many others.

@vincentbernat
Copy link
Contributor

Akvorado also switched to bart, but only in a beta release. I thought I posted some benchmarks here: akvorado/akvorado@92ee2e0.

@gaissmai
Copy link

gaissmai commented Aug 27, 2025

Most users have been using bart so far for LPM with ACLs. What I find interesting is how bart performs as a RIB under concurrency. BTW, for a FIB, I am currently experimenting with a modified algorithm that is about 2x faster, but requires about 10x more memory. For a software FIB one might then consider whether this trade-off is acceptable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants