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.js. Front 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!!!