From 6f09ed62e3f8e2b0de0d0074b3258cd675533781 Mon Sep 17 00:00:00 2001 From: Clark Boylan Date: Wed, 21 Jun 2017 16:54:03 -0700 Subject: [PATCH] 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 --- modules/openstack_project/templates/mirror.vhost.erb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/openstack_project/templates/mirror.vhost.erb b/modules/openstack_project/templates/mirror.vhost.erb index 989ddc6027..220aecf4fb 100644 --- a/modules/openstack_project/templates/mirror.vhost.erb +++ b/modules/openstack_project/templates/mirror.vhost.erb @@ -134,6 +134,11 @@ NameVirtualHost <%= @vhost_name %>:8081 CacheEnable disk "/tarballs" ProxyPass "/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/" :8081>