if it is for a single user, bulk check
# spicedb
j
if it is for a single user, bulk check is the recommendation, but is your plan to reload them everytime?
e
we'd need to reload them fairly frequently, as permissions will be changing on a an ad-hoc basis. so yes realistically on every app open we'd like to ensure we have the latest permission set
j
and the app is going to need to operate over 1K+ permissions locally?
e
yes unfortunately. around 17 permissions for upto 200 resources
j
17 permissions is okay; if it is for the same subject the system will auto-batch the resources by 100
so the above would be 34 checks total internally
so definitely use CheckBulk and make sure the same permission is in the same call
(you can add the others too)
e
okay thank you!
do you have any further advice if there was up to 6000 resources?
with around 20-30 req/s, we're seeing super high memory and CPU usage and unacceptable response times of over 5 seconds, and so realistically it's not going to be scalable for us to use bulk check as is.
j
6000 resources x 17 permissions?
2 Views