mirror of
https://github.com/opnsense/plugins.git
synced 2026-05-28 04:34:15 -04:00
net/haproxy: add support for multithreading
(cherry picked from commit 90fbff548d)
This commit is contained in:
parent
4c5ea8a66e
commit
d379475bec
3 changed files with 16 additions and 0 deletions
|
|
@ -97,6 +97,12 @@
|
|||
<help><![CDATA[Number of HAProxy processes to start.<br/><div class="text-info"><b>NOTE:</b> You may experience random issues in multi-process mode. For more information about the "nbproc" option please see the HAProxy Documentation.</div>]]></help>
|
||||
<advanced>true</advanced>
|
||||
</field>
|
||||
<field>
|
||||
<id>haproxy.general.tuning.nbthread</id>
|
||||
<label>HAProxy threads</label>
|
||||
<type>text</type>
|
||||
<help><![CDATA[Number of threads to create for each HAProxy process.]]></help>
|
||||
</field>
|
||||
<field>
|
||||
<id>haproxy.general.tuning.maxConnections</id>
|
||||
<label>Maximum connections</label>
|
||||
|
|
|
|||
|
|
@ -69,6 +69,13 @@
|
|||
<ValidationMessage>Please specify a value between 1 and 128.</ValidationMessage>
|
||||
<Required>Y</Required>
|
||||
</nbproc>
|
||||
<nbthread type="IntegerField">
|
||||
<default>1</default>
|
||||
<MinimumValue>1</MinimumValue>
|
||||
<MaximumValue>1024</MaximumValue>
|
||||
<ValidationMessage>Please specify a value between 1 and 1024.</ValidationMessage>
|
||||
<Required>N</Required>
|
||||
</nbthread>
|
||||
<sslServerVerify type="OptionField">
|
||||
<Required>Y</Required>
|
||||
<default>ignore</default>
|
||||
|
|
|
|||
|
|
@ -758,6 +758,9 @@ global
|
|||
stats socket /var/run/haproxy.socket level admin
|
||||
{% endif %}
|
||||
nbproc {{OPNsense.HAProxy.general.tuning.nbproc}}
|
||||
{% if OPNsense.HAProxy.general.tuning.nbthread|default('') != '' %}
|
||||
nbthread {{OPNsense.HAProxy.general.tuning.nbthread}}
|
||||
{% endif %}
|
||||
{% if helpers.exists('OPNsense.HAProxy.cpus.cpu') %}
|
||||
{% for cpu_map in helpers.toList('OPNsense.HAProxy.cpus.cpu') %}
|
||||
{% if cpu_map.enabled == '1' %}
|
||||
|
|
|
|||
Loading…
Reference in a new issue