# Mirrorlist.rockylinux.org

**URL:** <https://forums.rockylinux.org/t/mirrorlist-rockylinux-org/1292>\
**Category:** Infrastructure\
**Created:** [December 26, 2020, 3:04pm UTC](https://forums.rockylinux.org/t/mirrorlist-rockylinux-org/1292 "2020-12-26T15:04:59Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![smeier](https://avatars.discourse-cdn.com/v4/letter/s/bbe5ce/32.png) [@smeier](https://forums.rockylinux.org/u/smeier)\
**Post date:** [December 26, 2020, 3:04pm UTC](https://forums.rockylinux.org/t/mirrorlist-rockylinux-org/1292/1 "2020-12-26T15:04:59Z")

</div>

Hello all,

over the last few days I had a look into the CentOS mirrorlist code (used to run mirrorlist[.]centos[.]org) at [https://github.com/CentOS/mirrorlists-code](https://github.com/CentOS/mirrorlists-code)

I found it very difficult to set up and it lacks good documentation.

So I came up with an alternative implementation, now available at [https://github.com/stevemeier/mirrorlist](https://github.com/stevemeier/mirrorlist)

It’s written entirely in Go, supports different database backends, has REST-Style endpoints and easily serves 3.000+ requests per second (on my test box).

I hope this is a useful contribution to the project. PRs to improve it are welcome.

Kind regards,  
Steve

---

<div class="post-metadata">

**Author:** ![hbjy](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.rockylinux.org/hbjy/32/17_2.png) [@hbjy](https://forums.rockylinux.org/u/hbjy)\
**Post date:** [December 28, 2020, 12:54pm UTC](https://forums.rockylinux.org/t/mirrorlist-rockylinux-org/1292/2 "2020-12-28T12:54:31Z")

</div>

+1 to this idea, we’ll need one anyway once people start mirroring our repos (once those exist, lol).

---

<div class="post-metadata">

**Author:** ![neil](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.rockylinux.org/neil/32/34_2.png) [@neil](https://forums.rockylinux.org/u/neil)\
**Post date:** [January 1, 2021, 6:49pm UTC](https://forums.rockylinux.org/t/mirrorlist-rockylinux-org/1292/3 "2021-01-01T18:49:16Z")

</div>

I was thinking of using mirrorbits for this - interested to hear people’s thoughts. [https://github.com/etix/mirrorbits](https://github.com/etix/mirrorbits)

---

<div class="post-metadata">

**Author:** ![smeier](https://avatars.discourse-cdn.com/v4/letter/s/bbe5ce/32.png) [@smeier](https://forums.rockylinux.org/u/smeier)\
**Post date:** [January 1, 2021, 7:50pm UTC](https://forums.rockylinux.org/t/mirrorlist-rockylinux-org/1292/4 "2021-01-01T19:50:13Z")

</div>

The more alternatives, the better.

Reading through the GitHub page it sounds very promising and certainly more feature-rich then what I wrote. However, I am not sure if it is suitable for YUM/DNF repositories or if it seems to be primarily used for single stand-alone files.

Might be worth adding a note to this issue?

> <https://github.com/etix/mirrorbits/issues/85>
>
> As discussed on IRC, in the context of a linux distribution, repository metadata files can change quite often, and when they...

Kind regards,  
Steve

---

<div class="post-metadata">

**Author:** ![beagle](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.rockylinux.org/beagle/32/397_2.png) [@beagle](https://forums.rockylinux.org/u/beagle)\
**Post date:** [January 8, 2021, 5:38pm UTC](https://forums.rockylinux.org/t/mirrorlist-rockylinux-org/1292/5 "2021-01-08T17:38:15Z")

</div>

Mirrorbits is currently used by [XCP-ng](https://xcp-ng.org/) for their mirrors for both package distribution (yum) and ISOs download:

[http://mirrors.xcp-ng.org/?mirrorstats](http://mirrors.xcp-ng.org/?mirrorstats)

---

<div class="post-metadata">

**Author:** ![shalom](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.rockylinux.org/shalom/32/1686_2.png) [@shalom](https://forums.rockylinux.org/u/shalom)\
**Post date:** [February 15, 2022, 6:39am UTC](https://forums.rockylinux.org/t/mirrorlist-rockylinux-org/1292/6 "2022-02-15T06:39:37Z")

</div>

May i know what software stack Rocky Linux are using for [mirrors.rockylinux.org](http://mirrors.rockylinux.org).

---

<div class="post-metadata">

**Author:** ![label](https://avatars.discourse-cdn.com/v4/letter/l/c5a1d2/32.png) [@label](https://forums.rockylinux.org/u/label)\
**Post date:** [February 16, 2022, 6:40am UTC](https://forums.rockylinux.org/t/mirrorlist-rockylinux-org/1292/7 "2022-02-16T06:40:05Z")

</div>

> **[GitHub - fedora-infra/mirrormanager2: Rewrite of the MirrorManager...](https://github.com/fedora-infra/mirrormanager2)**
>
> Rewrite of the MirrorManager application in Flask and SQLAlchemy - GitHub - fedora-infra/mirrormanager2: Rewrite of the MirrorManager application in Flask and SQLAlchemy

> **[GitHub - adrianreber/mirrorlist-server: mirrorlist-server implementation in Rust](https://github.com/adrianreber/mirrorlist-server)**
>
> mirrorlist-server implementation in Rust. Contribute to adrianreber/mirrorlist-server development by creating an account on GitHub.

The former is the component that gives users the ability to add mirrors to the public pool and also provides private mirror functionality as well. It tracks all mirrors and ensures content is in sync. This is written in python.

The latter is the front end component. It uses the data created by mirror manager to answer client requests for the best mirror. This is written in rust.

These are the same tools used by Fedora.

---

<div class="post-metadata">

**Author:** ![shalom](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.rockylinux.org/shalom/32/1686_2.png) [@shalom](https://forums.rockylinux.org/u/shalom)\
**Post date:** [February 16, 2022, 7:09am UTC](https://forums.rockylinux.org/t/mirrorlist-rockylinux-org/1292/8 "2022-02-16T07:09:52Z")

</div>

Thanks @label for sharing information.

---

<div class="post-metadata">

**Author:** ![raphael](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.rockylinux.org/raphael/32/2604_2.png) [@raphael](https://forums.rockylinux.org/u/raphael)\
**Post date:** [December 28, 2022, 12:39am UTC](https://forums.rockylinux.org/t/mirrorlist-rockylinux-org/1292/9 "2022-12-28T00:39:05Z")

</div>

Hello, I’m from the OpenMandriva team. We are using Mirrorbits for managing our mirrors, as it’s easy to install as a docker stack. I admit I like the fact mirrorlist seems very light.  
Do you still work on the project? Is there a documentation on how to set up the three database tables?

edit: what I like about mirrorbits is that you can have such outputs, but it needs a lot of memory to work. It doesn’t rely on repomd.xml but scans each and every file individually.

 ![image](https://us1.discourse-cdn.com/flex020/uploads/rockylinux/original/2X/1/13658ad9e6e15d89f608d7bae78384f8c2ee23ae.png)

---

<div class="post-metadata">

**Author:** ![smeier](https://avatars.discourse-cdn.com/v4/letter/s/bbe5ce/32.png) [@smeier](https://forums.rockylinux.org/u/smeier)\
**Post date:** [December 28, 2022, 1:31pm UTC](https://forums.rockylinux.org/t/mirrorlist-rockylinux-org/1292/10 "2022-12-28T13:31:29Z")

</div>

Hello @raphael,

you don’t need to set up those database tables manually.  
They are supposed to be managed through the REST interface.

I have added a full API documentation, which you can browse via Swagger:  
[https://petstore.swagger.io/?url=https://raw.githubusercontent.com/stevemeier/mirrorlist/main/openapi.yaml](https://petstore.swagger.io/?url=https://raw.githubusercontent.com/stevemeier/mirrorlist/main/openapi.yaml)

This allows you to add mirrors to the `mirrors` table and repos to the `repos` table.  
The `status` table is populated automatically at run-time, but you can also access it via REST.

I don’t currently work on this project as it’s “feature-complete”.  
If you want to use it in production please let me know so I can revisit it.

Kind regards,  
Steve

---

<div class="post-metadata">

**Author:** ![raphael](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.rockylinux.org/raphael/32/2604_2.png) [@raphael](https://forums.rockylinux.org/u/raphael)\
**Post date:** [December 30, 2022, 10:01am UTC](https://forums.rockylinux.org/t/mirrorlist-rockylinux-org/1292/11 "2022-12-30T10:01:31Z")

</div>

Thanks @smeier, I’m indeed very interested and it seems very complementary to mirrorbits.  
As my knowledge of Go is quite limited yet, it will surely take me some time.  
Have you ever considered producing a metalink v4 file instead of a mirrorlist file?

---

<div class="post-metadata">

**Author:** ![smeier](https://avatars.discourse-cdn.com/v4/letter/s/bbe5ce/32.png) [@smeier](https://forums.rockylinux.org/u/smeier)\
**Post date:** [December 30, 2022, 4:17pm UTC](https://forums.rockylinux.org/t/mirrorlist-rockylinux-org/1292/12 "2022-12-30T16:17:05Z")

</div>

I hadn’t heard of metalink before and looking at my repo files, it seems to be used by EPEL only.

To generate such a file, the program would have to keep track of checksums and file sizes for repomd.xml, which adds complexity. Then it would have to generate XML, which is also more complex than just plain text.

But what gain is there? As far as I can see, dnf/yum will have more or less the same information to work with or maybe I am missing something? Looking at the Metalinker website, it doesn’t really seem to have caught on as a concept.

Kind regards,  
Steve

---

<div class="post-metadata">

**Author:** ![label](https://avatars.discourse-cdn.com/v4/letter/l/c5a1d2/32.png) [@label](https://forums.rockylinux.org/u/label)\
**Post date:** [December 30, 2022, 6:29pm UTC](https://forums.rockylinux.org/t/mirrorlist-rockylinux-org/1292/13 "2022-12-30T18:29:50Z")

</div>

It is true that Rocky Linux does not use metalink by default in its repo files. Users can swap `mirrorlist` for `metalink` and they’ll immediately get that functionality if they wish to. Fedora Linux, EPEL, and CentOS Stream 9 use metalink with mirror manager (shared and provided by the fedora project). (OpenSUSE uses MirrorCache which also uses metalink.)

The point of metalink (in the case of mirror manager) is that it provides additional security checking against out of date mirrors in dnf. dnf will compare the repomd.xml checksums of the mirrors it contacts to the masters. The standard list doesn’t provide this capability. Overall, this helps ensure out of date mirrors (or rogue/malicious mirrors) are not used by dnf.

Mirror manager only tracks repomd.xml. I see this as easier than tracking every single file individually as this helps us with propagation checks, among other things.

---

<div class="post-metadata">

**Author:** ![smeier](https://avatars.discourse-cdn.com/v4/letter/s/bbe5ce/32.png) [@smeier](https://forums.rockylinux.org/u/smeier)\
**Post date:** [December 30, 2022, 8:00pm UTC](https://forums.rockylinux.org/t/mirrorlist-rockylinux-org/1292/14 "2022-12-30T20:00:09Z")

</div>

Thanks for the insight.

When it comes to timestamp, my mirrorlist implementation actually considers this, when selecting mirrors from the database (`ORDER BY status.timestamp DESC`). That should hopefully eliminate abandoned/out-of-date mirrors.

Providing defense against rogue mirrors is certainly useful, but if that is metalink’s USP, I understand why it has not become the default.

---

<div class="post-metadata">

**Author:** ![brian](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.rockylinux.org/brian/32/5777_2.png) [@brian](https://forums.rockylinux.org/u/brian)\
**Post date:** [August 25, 2023, 3:29am UTC](https://forums.rockylinux.org/t/mirrorlist-rockylinux-org/1292/15 "2023-08-25T03:29:39Z")

</div>


