registry: try fixing osbs rule and try bypassing varnish

I think the lack of ! on the osbs rule meant that nothing ever went to
the cdn. This increases load on the real registry a lot.

Also, we are using varnish here, but lets try and just go via haproxy.
varnish might be having problems keeping all the 404s in memory/cache.
The cdn thing should help that, but since we have cloudfront I don't
think we also need to use varnish here.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
This commit is contained in:
Kevin Fenzi 2020-08-07 15:40:30 -07:00
parent f949eb89bf
commit e03a7c35bd

View file

@ -9,7 +9,7 @@ RewriteCond %{HTTP:VIA} !cdn77
RewriteCond %{HTTP:VIA} !cloudfront
RewriteCond %{SERVER_NAME} !^registry-no-cdn\.fedoraproject.org$
RewriteCond %{REQUEST_METHOD} !^(PATCH|POST|PUT|DELETE|HEAD)$
RewriteCond %{REMOTE_HOST} ^osbs-*$
RewriteCond %{REMOTE_HOST} !^osbs-*$
RewriteRule ^/v2/(.*)/blobs/([a-zA-Z0-9:]*) https://cdn.registry.fedoraproject.org/v2/$1/blobs/$2 [R]
{% endif %}
@ -20,7 +20,7 @@ RewriteRule ^/v2/(.*)$ http://oci-registry02:5000/v2/$1 [P,L]
{% elif env == "staging" %}
RewriteRule ^/v2/(.*)$ http://oci-registry01:5000/v2/$1 [P,L]
{% endif %}
RewriteRule ^/v2/(.*)$ http://localhost:6081/v2/$1 [P,L]
RewriteRule ^/v2/(.*)$ http://localhost:10048/v2/$1 [P,L]
RewriteCond "&%{QUERY_STRING}" &annotation(%3A|:)org.flatpak.ref(%3A|:)exists=1
RewriteCond "&%{QUERY_STRING}" &tag=testing