-
Notifications
You must be signed in to change notification settings - Fork 10
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
serving databases (core.db, extra.db, community.db, ...) #82
Comments
Hi @bernhard-da,
So, the current status (even if you don't use Flexo) is that Pacman requests those files, receives a 404 response and then just silently ignores the response.
Files ending with May I ask how fast your internet connection is? Did you notice this behavior because pacman was slow to download the database files, or did you notice this just by inspecting Flexo's logs? |
hi @nroi your explanation does make perfect sense. to answer your question:
yes, i have a unreliable internet-connection which is often slow too (max around 20mbit down) and also my isp throttles speeds after a specific amount of downloaded data; so i realized that pacman was slow (on many clients) downloading the same .db files and I also monitored the (total) size of downloaded .db files was quite high. |
I see. I guess there are other users with similar issues. In that case, I might reconsider if it makes sense to implement some caching mechanism for database files. This should probably be disabled by default, and it should be configurable to determine the duration after which locally stored database files are considered stale and redownloaded again. But don't expect this to be implemented very soon, I'm currently prioritizing changes that improve the code-maintainability over new features. |
@nroi fair enough. thx again for your comments and working on flexo :) |
I also see an opportunity of improvement here. Maybe it make sense to check how pacman handles this, because, when I don't use flexo, database files are cached somehow.
But when I use flexo, the database files are always being downloaded. I can't check how pacman works right now, but I'll try to figure this out later. |
@Zebradil Thanks for pointing this out. pacman sends the If-Modified-Since: Sun, 30 Jan 2022 10:17:26 GMT Which means that the mirror may respond with a The timestamp seems to be set according to the It makes sense for flexo to behave like pacman, so this is something that should change in flexo. |
Feature draftThis post is intended to summarize all information required to implement this feature, as well as information about what value this feature adds to Flexo. Problem description:Database files are currently not cached. With a large number of clients, this can add up in traffic. This is relevant especially for users with a slow internet connection or an ISP that throttles speed after a given amount of data has been downloaded (see also: #82 (comment)). Background information:Originally, it was not planned to implement any kind of caching for database files to avoid that Flexo serves any outdated files. However, it turns out that it should actually be possible to implement some kind of caching: Proposed solution:
|
hi @nroi , first off, thx a lot for providing flexo. it is a really great and very useful piece of software!
i have however experienced one issue; I am working on a fully updated arch-system with the following flexo.toml in which I changed the path of the cache-directory to /storage/...
flexo.toml
flexo is serving cached packages for all clients in my lan works flawlessly. however, i see the following entries in the server-log for all enabled repos when I do a
pacman -Syu
on a client.log
i have tried with different mirrors but I cannot manage that also the databases are provided from flexo. As I have quite a large number of internal clients the traffic (e.g from
community.db
) adds up over time. Do I have to set a specific config-setting to make this work or do you have an idea where I could start looking?The text was updated successfully, but these errors were encountered: