Mirrorbits 0.6: A new Hope
Since the middle of last year, I have taken over the maintainership of Mirrorbits, the open-source Geo-basedredirector, that we use to distribute the binaries of VLC, and that is now used by numerous open source projects and Linux distributions. Initially developed by Ludovic Fauvet while working at VideoLabs, the sofware needed a new maintainer since Ludovic did not have the time to maintain it anymore:
a few members of the community needed a new release, and there were quite a few merge requests that needed polish and merging.
So, after 6 years, 4 months and 10 days, we have a new major release of mirrorbits!
This release includes dozen of large commits and features, so it’s one of the most important release of Mirrorbits; most of the commits were done by Arnaud Rebillout, who deserves a huge thanks for this release.
This update adds major new features, significant usability improvements, and a few fixes.
π New in Mirrorbits 0.6
This release brings several long-awaited improvements, notably the support for HTTP+HTTPS mirrors, new commands for the CLI and, new options to tweak the behavior, a few enhancemens, and Bash completion.
π Protocol and Standards Compliance
A few important improvements have landed in this release, on the protocol level:
-
Full HTTP+HTTPS support: Clealry the biggest change of this release, mirrorbits now officially supports endpoints with both HTTP and HTTPS endpoints, so that your mirror can answer on both schemes. Lots of configuration options are included to have the right behavior. See the Merge Request 186 for more details. Be careful, this requires a Database upgrade!
-
Support for RFC 7232 (Conditional GET): Mirrorbits can now respond correctly toi the
If-Modified-Since
client header (RFC 7232) conditional requests, allowing for more efficient client-side caching and reducing unnecessary bandwidth use on repeated downloads. This is notably useful for Linux Distributions Metadata. See the Merge Request 169 for more details.
π New Commands
Mirrorbits 0.6 introduces two new CLI commands:
-
logs
: This new command provides a live view to see per-mirror logs available directly on the CLI. -
geoupdate
: Allows the GeoIP database to be updated manually, without restarting the service. -
Bash completion: not a new command, but we’ve shipped a Bash completion file with the release.
βοΈ New Configuration Options
Mirrorbits now includes several new options in the configuration file:
-
AllowHTTPToHTTPSRedirects
: Enables or disables automatic redirection from HTTP to HTTPS mirrors. -
SameDownloadInterval
: Avoid counting very close range downloads from a same source, to avoid miscounting the stats. -
FixTimezoneOffsets
: Standardizes timezone formatting in logs and automatically fix timezone shifts on mirrors (mostly for those using FTP). -
AllowOutdatedFiles
: Permits downloads from mirrors that may be slightly out of sync with the master. Useful for projects where occasional lag is acceptable, or mirrors sync on a looser schedule.
π§ Internal Improvements
Under the hood, we’ve done multiple refactorings, small fixes and enhancements:
-
Refined redirect logic: Redirection behavior is more predictable and robust in edge cases involving incomplete metadata or ambiguous mirror states.
-
Improved logging: Log output is now more structured and informative, with more information printed, including the protocol, the redis version, the method name, etc…
-
Better service management: Several changes improve how Mirrorbits handles background operations, making it more resilient during runtime configuration changes and GeoIP updates.
Improvements also on the service file. -
Expanded test coverage: Quite a few commits on adding tests and expanding the existing testsuite. Weirdly, the CI is a bit slower to run :)
-
Fixes: fixes for a few race-conditions, LRU cache issue, inconsistant failures, and other minor issues.
π§ͺ Go Modules Support
Mirrorbits has now fully adopted Go Modules for dependency management.
This requires Go 1.11+ but this should make things more modern and more standard, and should make it simpler to start working on Mirrobits :)
π Thanks to the community
While I am now the maintainer, I am probably the one that contributed the less in the past year, this release features would not have been possible without the tireless work of Arnaud Rebillout, who authored 37 commits included in version 0.6, on the 150+ commits.
This release being the first since more than 6 years, but shipping more than 150 commits, it should answer to the question whether mirrorbits is still maintained?
π Release Resources
- π Full Changelog
- π· Release Tag
- π Commits
π Whatβs Next?
If you’re using Mirrorbits in production, if you are planning to or if are interested in contributing, feel free to reach out to me or submit patches and suggestions via GitHub.
I hope you Enjoy this release!