Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sw360-dev] nxginx and caching of 100s of css files ...

Hi,

actually this expires map did not work me, and I am not sure, if that is the same here, but let's continue the discussion on the issue.

Kind reagards, Michael:



On 09.06.2017, at 08:59, Maximilian Huber <maximilian.huber@xxxxxxxxxxx> wrote:




--
Maximilian Huber * maximilian.huber@xxxxxxxxxxx * +49-174-3410223
TNG Technology Consulting GmbH, Betastr. 13a, 85774 Unterföhring
Geschäftsführer: Henrik Klagges, Christoph Stock, Dr. Robert Dahlke
Sitz: Unterföhring * Amtsgericht München * HRB 135082

-------- Ursprüngliche Nachricht --------
Von: "Jaeger, Michael C." <michael.c.jaeger@xxxxxxxxxxx>
Datum: 08.06.17 18:27 (GMT+01:00)
An: sw360 developer discussions <sw360-dev@xxxxxxxxxxx>
Betreff: [sw360-dev] nxginx and caching of 100s of css files ...

Hi,

we discussed the thing that a single page load involves somewhat between 110-140 individual GET requests, vast majority is for *.css, *js and such files.

I tried to enable caching for nginx, actually was kind of not so obvious, because it needs to be applied for the proxied traffic (coming from tomcat, which sets the http fields already), so plain nginx configurations from the Web did not work.

What does seem to work is:


    location ~*  \.(jpg|jpeg|png|gif|ico|css|js)$ {

        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_redirect off;
        proxy_pass  http://liferay-app;
        proxy_read_timeout 3600s;

        proxy_set_header expires 7d;
    }

-> just adding the proxy_set_header to the proxied http header fort he expires value.

Question: shall we take this into the deployment setting of nginx fort he sw360chore project? It is maybe not useful for development, but  for proudction use it appears like a useful additon. on a quick testign it seem sto reduce the load timest by 25-50% - admitted not really tested, because I did not ensure for same server conditions ...

Kind regards, Michael
_______________________________________________
sw360-dev mailing list
sw360-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/sw360-dev
_______________________________________________
sw360-dev mailing list
sw360-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/sw360-dev

Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail


Back to the top