Add caching reverse proxy for pypi mirror

AFS across long distances is slow due to its small fixed window size not
working well with large RTTs. Additionally performing a vos release
(even if a noop and no files change) affects the AFS cache such that
some data must be reretrieved.

Mitigate these things by using a regular reverse caching proxy to pypi
mirrors instead. This gives us normal tcp across long distances which
can scale windows appropriately and don't need to reupdate items on
every vos release. Instead cache updates are handled by http.

Note that we point to our mirrors rather than pypi proper because we
still want to be able to control the updates to our mirrors. It is
possible that in some cases this is not necessary and we can point
directly upstream.

Change-Id: Ifb9f28d181fca74549c2107992227c4d08150271
This commit is contained in:
Clark Boylan 2017-06-21 16:54:03 -07:00
parent 90356843fa
commit 6f09ed62e3

View File

@ -134,6 +134,11 @@ NameVirtualHost <%= @vhost_name %>:8081
CacheEnable disk "/tarballs" CacheEnable disk "/tarballs"
ProxyPass "/tarballs/" "https://tarballs.openstack.org/" ProxyPass "/tarballs/" "https://tarballs.openstack.org/"
ProxyPassReverse "/tarballs/" "https://tarballs.openstack.org/" ProxyPassReverse "/tarballs/" "https://tarballs.openstack.org/"
# pypi
CacheEnable disk "/pypi"
ProxyPass "/pypi/" "http://mirror.dfw.rax.openstack.org/pypi/"
ProxyPassReverse "/pypi/" "http://mirror.dfw.rax.openstack.org/pypi/"
</VirtualHost> </VirtualHost>
<VirtualHost <%= @vhost_name %>:8081> <VirtualHost <%= @vhost_name %>:8081>