: Speeding-up Yum Updates From Inside AWS/EC2

Home » General » : Speeding-up Yum Updates From Inside AWS/EC2
General No Comments

Tomorrow, I intend to push a change to mirrorlist.CentOS.org nodes that will have a (good) impact to CentOS EC2 instances running from AWS network.

Thanks to AWS, sponsoring the required backend infra for this to happen, our mirrorlist nodes will redirect yum/dnf operations internally in the EC2/AWS network.

What does that mean for you ?
– faster updates (due to Cloudfront caching, and so most of the recent packages/rpms being kept in cache in each region)
– less data transfer costs (due to such updates being served from inside EC2 network[s] and so not leaving EC2 infrastructure)

How does it work ?
– When your CentOS EC2 instance hits mirrorlist.CentOS.org, it’s identified as coming from EC2 network, thanks to https://docs.aws.amazon.com/general/latest/gr/aws-ip-ranges.html, loaded into our mirrorlist code
– You’ll be redirected to CloudFront, itself using a dedicated origin to which we automatically push all updates directly
– if you’re the first one asking for that update/rpm, Edge (cache server in that region) will retrieve it and will cache it while also serving it to you
– if someone requested same rpm that you’re asking for, it will be directly served from cache, so at “local” speed (we saw some rpm being downloaded on second attempt at ~80MB/s)

We already tested with several volunteers in our staging environment that it was working fine, and so far so good.

We have no real estimate about the number of CentOS EC2 instances in all regions, so we plan on doing a canary-style deployment, so Ansible switching our mirrorlist code/role one-by-one and observe the cloudfront statistics.

Should you encounter any issue, feel free to reply to this thread and/or
#CentOS-devel on irc.freenode.net