Skip to content

Commit

Permalink
Merge pull request #62 from tbeerman/add_mpm_event_mode_ui
Browse files Browse the repository at this point in the history
add mpm event mode for webui & make proxy scheme configurable
  • Loading branch information
tbeerman authored Mar 26, 2020
2 parents caecc27 + 226abc8 commit 8feb961
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 18 deletions.
4 changes: 3 additions & 1 deletion ui/00-mpm.conf.j2
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{% if RUCIO_HTTPD_MPM_MODE is defined and RUCIO_HTTPD_MPM_MODE == "prefork" -%}
LoadModule mpm_prefork_module modules/mod_mpm_prefork.so
{% else -%}
{% elif RUCIO_HTTPD_MPM_MODE is defined and RUCIO_HTTPD_MPM_MODE == "worker" -%}
LoadModule mpm_worker_module modules/mod_mpm_worker.so
{% else -%}
LoadModule mpm_event_module modules/mod_mpm_event.so
{% endif %}
38 changes: 25 additions & 13 deletions ui/httpd.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -70,17 +70,29 @@ EnableSendfile on
IncludeOptional conf.d/*.conf

{% if RUCIO_HTTPD_MPM_MODE is defined and RUCIO_HTTPD_MPM_MODE == "prefork" -%}
StartServers {{ RUCIO_HTTPD_START_SERVERS | default('8') }}
MinSpareServers {{ RUCIO_HTTPD_MIN_SPARE_SERVERS | default('5') }}
MaxSpareServers {{ RUCIO_HTTPD_MAX_SPARE_SERVERS | default('20') }}
ServerLimit {{ RUCIO_HTTPD_SERVER_LIMIT | default('256') }}
MaxClients {{ RUCIO_HTTPD_MAX_CLIENTS | default('256') }}
MaxRequestsPerChild {{ RUCIO_HTTPD_MAX_REQUESTS_PER_CHILD | default('4000') }}
StartServers {{ RUCIO_HTTPD_START_SERVERS | default('8') }}
MinSpareServers {{ RUCIO_HTTPD_MIN_SPARE_SERVERS | default('5') }}
MaxSpareServers {{ RUCIO_HTTPD_MAX_SPARE_SERVERS | default('20') }}
ServerLimit {{ RUCIO_HTTPD_SERVER_LIMIT | default('256') }}
MaxClients {{ RUCIO_HTTPD_MAX_CLIENTS | default('256') }}
MaxRequestsPerChild {{ RUCIO_HTTPD_MAX_REQUESTS_PER_CHILD | default('4000') }}
{% elif RUCIO_HTTPD_MPM_MODE is defined and RUCIO_HTTPD_MPM_MODE == "worker" -%}
StartServers {{ RUCIO_HTTPD_START_SERVERS | default('1') }}
MaxClients {{ RUCIO_HTTPD_MAX_CLIENTS | default('20') }}
MinSpareThreads {{ RUCIO_HTTPD_MIN_SPARE_THREADS | default('1') }}
MaxSpareThreads {{ RUCIO_HTTPD_MAX_SPARE_THREADS | default('20') }}
ThreadsPerChild {{ RUCIO_HTTPD_THREADS_PER_CHILD | default('5') }}
MaxRequestsPerChild {{ RUCIO_HTTPD_MAX_REQUESTS_PER_CHILD | default('8192') }}
{% else %}
StartServers {{ RUCIO_HTTPD_START_SERVERS | default('1') }}
MaxClients {{ RUCIO_HTTPD_MAX_CLIENTS | default('20') }}
MinSpareThreads {{ RUCIO_HTTPD_MIN_SPARE_THREADS | default('1') }}
MaxSpareThreads {{ RUCIO_HTTPD_MAX_SPARE_THREADS | default('20') }}
ThreadsPerChild {{ RUCIO_HTTPD_THREADS_PER_CHILD | default('5') }}
MaxRequestsPerChild {{ RUCIO_HTTPD_MAX_REQUESTS_PER_CHILD | default('8192') }}
{% endif %}
KeepAlive {{ RUCIO_HTTPD_KEEP_ALIVE | default('On') }}
KeepAliveTimeout {{ RUCIO_HTTPD_KEEP_ALIVE_TIMEOUT | default('5') }}
MaxKeepAliveRequests {{ RUCIO_HTTPD_MAX_KEEP_ALIVE_REQUESTS | default('128') }}
ServerLimit {{ RUCIO_HTTPD_SERVER_LIMIT | default('10') }}
StartServers {{ RUCIO_HTTPD_START_SERVERS | default('4') }}
ThreadLimit {{ RUCIO_HTTPD_THREADS_LIMIT | default('128') }}
ThreadsPerChild {{ RUCIO_HTTPD_THREADS_PER_CHILD | default('128') }}
MinSpareThreads {{ RUCIO_HTTPD_MIN_SPARE_THREADS | default('256') }}
MaxSpareThreads {{ RUCIO_HTTPD_MAX_SPARE_THREADS | default('512') }}
MaxRequestWorkers {{ RUCIO_HTTPD_MAX_REQUEST_WORKERS | default('1280') }}
MaxConnectionsPerChild {{ RUCIO_HTTPD_MAX_CONNECTIONS_PER_CHILD | default('2048') }}
{% endif %}
8 changes: 4 additions & 4 deletions ui/rucio.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,11 @@ CacheRoot /tmp
WSGIScriptAlias / /usr/lib/python2.7/site-packages/rucio/web/ui/main.py

{% if RUCIO_PROXY is defined %}
ProxyPass /proxy https://{{ RUCIO_PROXY }}
ProxyPassReverse /proxy https://{{ RUCIO_PROXY }}
ProxyPass /proxy {{ RUCIO_PROXY_SCHEME | default('https') }}://{{ RUCIO_PROXY }}
ProxyPassReverse /proxy {{ RUCIO_PROXY_SCHEME | default('https') }}://{{ RUCIO_PROXY }}
{% endif %}
{% if RUCIO_AUTH_PROXY is defined %}
ProxyPass /authproxy https://{{ RUCIO_AUTH_PROXY }}
ProxyPassReverse /authproxy https://{{ RUCIO_AUTH_PROXY }}
ProxyPass /authproxy {{ RUCIO_AUTH_PROXY_SCHEME | default('https') }}://{{ RUCIO_AUTH_PROXY }}
ProxyPassReverse /authproxy {{ RUCIO_AUTH_PROXY_SCHEME | default('https') }}://{{ RUCIO_AUTH_PROXY }}
{% endif %}
</VirtualHost>

0 comments on commit 8feb961

Please sign in to comment.