-
Notifications
You must be signed in to change notification settings - Fork 93
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
Serve most recent augmented diff from disk cache only #342
Comments
in some of my tests (especially when requesting slightly older adiffs), it was even sometimes the case that generating one minutely diff required more than 1 minute of server time.
Why not more? At least having a day or two (better: a week or two) of cache would make sense IMHO. I think a common use-case of adiffs is the updating of statistics that was initially generated from a planet dump (e.g. for something like tyrasd/taghistory#10). Since those planets are typically generated on a daily or weekly basis, that requires fetching adiffs up to more than ~10 days back. |
@tyrasd : 60-120 was just an initial starting point for the discussion based on current log files. I guess once we have this as a configurable parameter it could be easily extended to longer periods of time, if disk space permits. |
@tyrasd : I think Roland put in a default of 60 minutes now. For bigger values you could try a bit of lobbying for your use case... ;) |
Perfecto! |
Could we increase the caching to a min of 3h or better 6h? In the last seven days, I got many timeouts and 429 response code during processing the augmented diff files. |
Today, several clients are requesting current augmented diffs more or less at the same time via a call to /api/augmented_diff?id=xyz. This approach does not scale to a higher number of clients, as each query takes about 5-30 seconds, consumes quite some CPU cycles, but effectively returns exactly the same result.
I'm proposing a few changes to this process:
Compared to the previous approach which kept everything on disk, this approach should keep the disk space requirements low
augmented_diff_status
only after precalculationPros:
Cons:
Thanks to @pa5cal for suggestions.
The text was updated successfully, but these errors were encountered: