Evaluate using a CDN / creating a "smart mirror"
The default mirror used by ex: [archlinux-docker](https://gitlab.archlinux.org/archlinux/archlinux-docker/-/blob/b20da68230616b2013d495b2def45ca29050d47a/rootfs/etc/pacman.d/mirrorlist) isn't fast for everyone (@lahwaacz can confirm).
Some of the big CDN players (ex: [Cloudflare](https://developers.cloudflare.com/sponsorships/) and [Fastly](https://www.fastly.com/open-source)) offers sponsorship for open-source project, maybe we should take advantage of it? We can either use it as a cache or setup a "smart mirror" which choose the closest mirror relative to the user (can be done with: [CLoudflare Workers](https://workers.cloudflare.com/) or [Fastly Edge cloud platform](https://www.fastly.com/edge-cloud-platform))
https://cloudflaremirrors.com/ is also worth mentioning, it is very broken though (the files is sent without `content-length` and range requests isn't supported).
## Self hosting options
### GeoIP DNS
We run our own DNS server for pkgbuild.com with [powerdns](https://jpmens.net/2015/11/12/geodns-with-powerdns-geoip-back-end). Set up europe,america,asia to all become mirror.pkgbuild.com.
[PowerDNS terraform provider](https://registry.terraform.io/providers/pan-net/powerdns/latest/docs/resources/zone)
Pros:
* We manage our own infra
Downsides:
* All mirrors need to use the same certificate
* Running our own DNS server (with a subzone for mirror.pkgbuild.com)
Questions:
* Can we still use terraform for DNS records with powerdns?
* Can we use LE to hand out the same certificates for different mirrors?
### SRV Record Mirrors and pacman
???
issue