Changes between Version 18 and Version 19 of TipsAndTricks


Ignore:
Timestamp:
19/12/2011 11:19:40 (2 years ago)
Author:
prymitive
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • TipsAndTricks

    v18 v19  
    286286* uWSGI can start the process on the foreground, this will make errors easily 
    287287  visible to the system administrator. 
     288 
     289 
     290== FastRouter performance tips == 
     291 
     292'''AUTHOR:''' Łukasz Mierzwa 
     293 
     294If you are using nginx->fastrouter setup and both nginx and fastrouter are running on the same host you should connect nginx to fastrouter using file socket instead of tcp, using tcp will add more unnecessary load to tcp stack. 
     295So in nginx configuration use 
     296{{{ 
     297uwsgi_pass  unix:///var/run/uwsgi.socket; 
     298}}} 
     299instead of IP:PORT 
     300{{{ 
     301uwsgi_pass   127.0.0.1:3031; 
     302}}} 
     303and edit fastrouter config tu use: 
     304{{{ 
     305fastrouter = /var/run/uwsgi.socket 
     306}}} 
     307 
     308When you want to handle high number of connections/requests you may need to tweak some linux sysctl settings, most important seems to be 
     309* net.ipv4.tcp_max_syn_backlog 
     310* net.core.somaxconn 
     311look at http://agiletesting.blogspot.com/2009/03/haproxy-and-apache-performance-tuning.html for details.