-
-
Notifications
You must be signed in to change notification settings - Fork 26
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
Improve caching #16
Comments
@hgy59 Thanks again for your work updating spkrepo. You looks like comfortable with Flask (python is not my cup of tea...). It would be really helpful if you may at least prototype on a single example what should be done here to customize default caching strategy. |
@ymartin59 I am out for holiday for another week, so this will need some time. Neither am I familiar with python or flask (only took a pluralsight course for an introduction into flask). |
Here are examples of requests for which caching is inefficient at the moment:
It is required to create specific key for cache entry, so that variant parameters are not considered as discriminant. |
Quick confirmations:
|
For a single request, the main problem is that we have to pull the whole SQL database to be able to generate the catalog entry for a specific NAS. And the main reason is the version numbers (DSM and packages) as SQL cannot compare versions the way we need to do it. I've put some caching (in app and CDN), this has gotten us that far but it's just hiding the real issue. I think caching is deficient somewhere but maybe this is just that there are too many different requests and the backend cannot handle the load. This needs investigating, maybe there is a quick win. I'm not that sure of the added value of a relational database for this kind of use cases, we rely on relationships for common stuff (displayname, description, etc.) but we could choose not to do so. We also rely on it for administration, activating or deactivating a whole package, or a whole version. But again that could be done with some applicative code instead. I would suggest a flat approach, schema or schemaless but flat. With a ton of validation to ensure consistency. |
According to @Diaoul there is space for cache improvements. Aim is to cache same resource according to relevant request parameters only.
Should set explicitly as own-made cache entry key where some parameters have to be ignored. References:
The text was updated successfully, but these errors were encountered: