-
Notifications
You must be signed in to change notification settings - Fork 44
feat: improved docs on performance #387
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
7a30a10 to
c6e1262
Compare
c6e1262 to
d186c24
Compare
tstirrat15
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
| no-hard-tabs: false | ||
| no-inline-html: false | ||
| no-multiple-blanks: false | ||
| max-one-sentence-per-line: false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🙏
|
|
||
| Each SpiceDB node maintains an in-memory cache of permissions queries it has resolved in the past. When a new permissions query is encountered by one node, its answer may be present on another node, so SpiceDB will forward the request onward to the other node to check the shared cache. | ||
|
|
||
| For more details on how dispatching works, see the [Consistent Hash Load Balancing for gRPC] article. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI i removed the architecture drawing since i felt that it didn't add much value and it looked oriented towards maintainers, not users
I'm not too happy on the level of detail that we've provided here but I also don't want to overwhelm people. I still don't know enough about dispatching to feel comfortable writing more. are there any details that a user of spicedb should know about implementation?
| 1. **Just-In-Time (JIT) Caching**: The default mode that loads definitions on-demand. Uses less memory, but it incurs a cold start penalty on first access to each definition. | ||
| 2. **Watching Cache**: An experimental mode that proactively maintains an always-up-to-date cache. This mode uses more memory but avoids cold start penalties. It is recommended when there are frequent schema changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@josephschorr to confirm if this is accurate
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is, but will all be going away soon-ish once the new cache lands
| @@ -0,0 +1,90 @@ | |||
| import { Callout } from 'nextra/components' | |||
|
|
|||
| # Improving Performance | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note that this doc now has 3 sections: dispatch, materialize, namespace cache
@josephschorr any other sections worth adding? we could (later) add a section on schema considerations for better performance
d186c24 to
8a8fce5
Compare
Description
dispatchtooperationsand rename it toperformanceTesting
please review for correctness and completeness
References
Closes #307