nginx loadbalancing in uwsgi -
i new uwsgi , trying understand how works.
in uwsgi have 2 setups say
1)
uwsgi --socket /tmp/uwsgi.sock --socket 127.0.0.1:8000 --master --process 2 --workers 1 which single uwsgi process 2 child processes each having 3 threads listening port 8000
2)
uwsgi --socket /tmp/uwsgi.sock --socket 127.0.0.1:8000 --master --process 2 --workers 3 uwsgi --socket /tmp/uwsgi2.sock --socket 127.0.0.1:8001 --master --process 2 --workers 3 similarly 2 uwsgi processes listening ports 8000 , 8001
doubt 1 : can configure uwsgi process run (2) , having them configured in nginx ?
doubt 2 : when nginx loadbalances requests (a) if has multiple uwsgi process listening multiple ports (b) if has single uwsgi process multiple child processes
which better (a) or (b) or not right way use nginx loadbalance uwsgi processes, if not how ?
the first approach lot saner , avoids nginx pass requests worker busy.
you may find blog posts or doc thundering herd problem, suggest read this: http://uwsgi-docs.readthedocs.org/en/latest/articles/serializingaccept.html
basically unless on specific needs (and limits) first approach way go.
Comments
Post a Comment