php - Reverse Proxy Specific Request -


i have high load website, system runs out of memory in peak times. want split load read operations happens on specific urls move server.

i using nginx , php-fpm, how redirect specific urls processed php-fpm on different server?

this blue print of requirements.

location /feed/generate {   use php-fpm on different server }  location / { #all other requests  use existing php-fpm } 

setup php-fpm on second server listening on externally accessible ip (not 127.0.0.1) port 9000. ip address should private (not routed internet) and/or configured allow connections trusted hosts (firewall).

upstream feed_php_fpm {     server <other server ip>:9000; }  upstream local_fpm {     server 127.0.0.1:9000; }  location /feed/generate {     fastcgi_pass feed_php_fpm;     include fastcgi.conf; }  location / {     fastcgi_pass local_fpm;     include fastcgi.conf; } 

please understand doing , implications of php-fpm listening on network port vs file socket.


Comments

Popular posts from this blog

PySide and Qt Properties: Connecting signals from Python to QML -

c# - DevExpress.Wpf.Grid.InfiniteGridSizeException was unhandled -

scala - 'wrong top statement declaration' when using slick in IntelliJ -