etix / mirrorbits

Mirrorbits is a geographical download redirector written in Go for distributing files efficiently across a set of mirrors.
MIT License
503 stars 91 forks source link

Draft: Add RelaxModTimeRules config option #147

Open elboulangero opened 11 months ago

elboulangero commented 11 months ago

With this setting, files are allowed to be outdated on the mirrors, for at most MaxOutdated minutes. The filesize check is also disabled for those files.

Use-case: for a Debian-like distribution, the metadata (ie. the directory /dists) are updated in-place, so we must give time for mirrors to sync, and then for mirrorbits to be aware of the changes.

Otherwise, as soon as the source is updated and scanned, Mirrorbits will go in fallback mode for all the files under /dists, since at this point, either mirrors didn't sync yet, either they did but Mirrorbits is not aware of it yet (as the interval to scan mirrors is higher than the interval to scan the source).

Cf. https://github.com/etix/mirrorbits/issues/85 for more details.

elboulangero commented 11 months ago

I mark it as draft, it would be nice to get feedback from other mirrorbits users, that use mirrorbits to mirror a Linux distro, to understand better if they face a similar issue, and if this PR can help them solve it.

jbkempf commented 5 months ago

Still a draft, noone commented :(

elboulangero commented 5 months ago

Actually discussion happened at https://github.com/etix/mirrorbits/issues/85. But I just noticed that I didn't have time to follow up...

In any case: still a draft