-
Notifications
You must be signed in to change notification settings - Fork 28
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
rsc: Consider job before blindly caching #1626
Conversation
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.
Most of the thinking is about when we want to see the different exits from allow_job in the server log.
We won't be able to record how many jobs were too short to be included or how many were duplicates without some sort of breadcrumb. However for the too short exit condition we would end up spamming the log since all of those jobs will no longer be cached. The duplicate case seems potentially useful to log.
Finally in the high load case we are probably doing the right thing by not logging exactly when we shed a request just that we are very likely too at the moment.
So I think the tracing summary is I would want to see an info/warn trace on the CONFLICT
status return.
We could maybe a few more columns to the job history table. Then we'd have
Yeah I want to avoid too much extra work when under load. I'm actually somewhat tempted to temper the warning even further since if we are under load that print is likely be triggered a very large amount. Tempted to do something like
which would have a 10% chance of showing the the "heavy load" log. Another improvement would be to add a dashboard graph for "chance to shed load"
On it |
DB tracking for these exit conditions sounds great and shouldn't be too expensive 🤞 |
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
There are a few reasons do have a precheck before pushing a job to the cache
This PR implement those reasons into a route that the client should check before pushing a new job to the cache