concurrency - Limiting the maximum number of concurrent requests django/apache -
i have django site demonstrates usage of tool. 1 of views takes file input , runs heavy computation trough external python script , returns output user. tool runs fast enough return output in same request though. want limit how many concurrent requests url/view keep server getting congested.
any tips on how go doing this? page in simple , usage low.
presuming using mod_wsgi, segment wsgi application on multiple mod_wsgi daemon process groups specific urls want restrict delegated mod_wsgi daemon process group of own lesser number of processes/threads.
wsgidaemonprocess myapp processes=2 threads=10 wsgidaemonprocess myapp-restricted threads=2 wsgiscriptalias / /some/path/app.wsgi wsgiprocessgroup myapp <location /some/specific/url> wsgiprocessgroup myapp-restricted </location>
note requests queued access 2 threads in restricted process still consume worker thread in main apache server child processes. thus, want make sure use worker mpm (so no mod_php) , configure mpm sufficient spare threads handle backed requests normal traffic.
Comments
Post a Comment