ngx-pagespeed module on several upstreams

28 views
Skip to first unread message

Alex Noname

unread,
Feb 13, 2017, 11:34:47 AM2/13/17
to ngx-pagespeed-discuss
Hi, guys!

Please, help!

Design:
- front server with nginx (without ngx-pagespeed module) which pass request to backends upstream (round robin (no ip_hash or some other sticky featurus possible));
- 3 servers in upstream (php-fpm and nginx + ngx-pagespeed);

I can't change design by some reason.

The problem:
For example I've simple php-script, which contain:
<?php
echo "
<html>
<head></head>
<body>
<img src='/1.jpg'>
</body>
</html>
";
?>

Google page speed module convert it to webp format and prepare related java script which store on the hdd.
Main problem - cache have different naming for one page on all nodes..
_,Mjo.377iwle9Li.js.pagespeed.jm.8HSWuufd0g.js
_,Mjo.XnINaq-Afa.js.pagespeed.jm.6GMx8Gt_w_.js
_,Mjo.K7sSdfB.js.pagespeed.jm.Zj8x6st_p_.js

Flow:
When request pass over front server (front server use Round-robin) on the 1st server and it recieve html body with _,Mjo.377iwle9Li.js.pagespeed.jm.8HSWuufd0g.jsFront server pass request with _,Mjo.377iwle9Li.js.pagespeed.jm.8HSWuufd0g.js to one of 3 server. 2nd and 3rd server don't have file with this name (they have file with other name). As result 404 error and incorrect page rendering.
------------------------

I try search some solution, read manuals, but I can't find some useful info for my case. May be I missed something..

Does somebody know some options for cache naming or solution for that? If yes, could you, please, share info or get me some direction for that?

Thanks in advance!!!

Otto van der Schaaf

unread,
Feb 13, 2017, 4:00:48 PM2/13/17
to ngx-pagespeed-discuss
I think you need to disable javascript outlining.

Outline filters can currently only run on single-server environments because the resource can only be fetched from a server after that server has rewritten the HTML page.

Otto

--
You received this message because you are subscribed to the Google Groups "ngx-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ngx-pagespeed-di...@googlegroups.com.
Visit this group at https://groups.google.com/group/ngx-pagespeed-discuss.
For more options, visit https://groups.google.com/d/optout.

Alex Noname

unread,
Feb 13, 2017, 11:48:01 PM2/13/17
to ngx-pagespeed-discuss
Thanks a lot, Otto!

вторник, 14 февраля 2017 г., 0:00:48 UTC+3 пользователь Otto van der Schaaf написал:
To unsubscribe from this group and stop receiving emails from it, send an email to ngx-pagespeed-discuss+unsub...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages