i'd use
location /images/ { try_files $uri @generateimage; } location @generateimage { # pass backend php-fpm }
for image generation. in case have take care of php-fpm load @ first generation of image (we have huge amount of requests, it's sort of banner exchange) . way configure nginx wait processing of first php-fpm call same location?
usually real time processing bad idea, if high traffic @ point effect system badly, there way queue images processing handle them cron job?
and if still want way suggest making php script issue redirect response when it's done, given know sure wont take long time generate image, or make reply image data directly after giving correct content-type
browser.
Comments
Post a Comment