shutting down the CPAN mirror network
perl.topicbox.com/groups/infrastructure/Tfb53...Posted Dec 17, 2020, 5:54 AM UTC
Posted Dec 17, 2020, 5:54 AM UTC
... and replacing it with a CDN instead: MetaCPAN and other components aren't going away. at least, not yet!
How exactly does that CDN work, and how does it alleviate the need for mirrors?
CDN means Content Distribution Network. You run a DNS query for foo.org and it gives you an IP associated with the endpoint that serves the requested content that is closest to you.
The implication of this is that the content is already mirrored at a number of distribution points around the globe and that any single IP can go down and DNS (directed by the CDN control plane) will redirect you to the next closest endpoint. Additional endpoints in the form of mirrors just creates additional logistics and maintenance efforts and are generally unneeded.
It's moving the distribution logic out of the application and into DNS -- so instead of having to pick a hostname that is close to you and configure the application with it, you use one hostname and it maps to an IP address close to you.
Could the mirror network be converted to a CDN network? Provided proper virtual host logic is provided on the mirror.
Also, what happens if one of the CDN servers isn't responding?
Then you're fucked. I occasionally – maybe six, seven times per year – experienced this very problem with the download.opensuse.org CDN (OS and package downloads and updates). There is no way to tell it to rotate through alternatives or force giving me a different server.
When I was finally fed up, I picked a known good and reliable mirror and hardcoded my repo addresses with it, effectively eliminating the CDN. Following my experience, the mirror model just works better overall.
And then the mirror you hardcoded goes woosh, and they take it out of the automatic rotation, and.... you still see the problem, but nobody else can understand why you see the problem and you forget you hardcoded around the problem in /etc/hosts.
Yeah. Been there, even got the shirt.
How would we point cpan at a local mirror?
There's no reason why the --mirror option in cpanm or the other clients would need to go away or change. www.cpan.org will still be the default and you would still be able to change that to your local darkpan.
There's no reason to change how local mirrors are used, I don't know why that was even entertained.
Fastly ain't free. What happens if whoever is paying the bill goes away?
With mirrorservice.org and other mirrors of CPAN at academic institutions, I can be pretty confident they're not all going to disappear, even if one or two mirrors do.
Fastly was started by two CPAN authors. I'm pretty sure they donate their services for free.
Fastly are really good about sponsoring Open Source projects. They have been sponsoring MetaCPAN for several years now.
...there is still a bill. Someone is paying it.
Oh, of course. And they could stop doing that at some point. I'm just making the point that it's pretty unlikely that they would.