back

by newusertoday·4y ago·view on hn ↗
any idea about performance? if rules grow linearly with users how does it affect performance? as per casbin performance docs https://casbin.org/docs/en/performance if there are more than 100 rules it might require tuning however if model is such that we need to check if each user has permission to access some resource say route than it would easily grow linearly with number of users. Any idea how to solve this? i am not able to get any good documentation on this.
2 comments
The result of benchmark shows it supports 11000 rules (10000 users, 1000 roles) in 2.258262 ms. It is very performant.

[0] https://casbin.org/docs/en/benchmark

you can partition what it considers, such as per-tenant where you index on org id and only consider same-org interactions for most things. likewise, we picked it because it can reuse your existing sql db, so you can get around problems like auth-dependent view all queries by doing your own sql.

if others have scaling+perf tricks, am curious :)