Hi
I am tasting casbin for RBAC with ~100k custom roles, where each role represent one custom role per domain and 2m users.
Implemented node.js service with mysql for DB store:
using this model:
r = sub, dom, obj, act
[policy_definition]
p = sub, dom, obj, act
[role_definition]
g = _, _, _
[policy_effect]
e = some(where (p.eft == allow))
[matchers]
m = r.dom == p.dom && r.obj == p.obj && r.act == p.act && g(r.sub, p.sub, r.dom)
with policy (x range 1 - 100k):
p,role-x,domain-x,data,read
g, user-x,role-x,domain-x
Following this I have 2 challenges:
-
Running benchmark show request time ~20 ms (100rps and 5 instances with 2 cpu each)
Is there a way to create a better model ? -
Policy load time is taken long time.
I saw filtered load policy (didn't tried it), as I understand it only reduces load time and
if the policy changes I still need to reload the policy.
I think I am missing something in the way casbin works:
How in high availability mode with multiple policy changes I should desgin casbin service ?
thanks in advance!
