Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
haproxy
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Eric Zillmann
haproxy
Commits
2eb81c30
Commit
2eb81c30
authored
8 years ago
by
jurgenhaas
Browse files
Options
Downloads
Patches
Plain Diff
ansible-inventories/arocom#185 Make HaProxy maxconn values configurable, per inventory or per host
parent
9aae7acc
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
defaults/main.yml
+2
-0
2 additions, 0 deletions
defaults/main.yml
templates/haproxy_cfg
+8
-8
8 additions, 8 deletions
templates/haproxy_cfg
with
10 additions
and
8 deletions
defaults/main.yml
+
2
−
0
View file @
2eb81c30
...
...
@@ -5,6 +5,8 @@ proxy_timeout_connect: '5s'
proxy_timeout_client
:
'
20s'
proxy_timeout_server
:
'
45s'
proxy_redirect_aliase
:
false
proxy_maxconn
:
100
proxy_varnish_maxconn
:
1000
proxy_blacklist
:
ip
:
-
'
146.185.176.158'
...
...
This diff is collapsed.
Click to expand it.
templates/haproxy_cfg
+
8
−
8
View file @
2eb81c30
...
...
@@ -216,7 +216,7 @@ backend backend_{{host}}
{% if host == inventory_hostname or host == 'localhost' %}
http-response deny
{% else %}
server server_{{host}} {{hostvars[host]['static_ipv4']}}:80 maxconn
100
server server_{{host}} {{hostvars[host]['static_ipv4']}}:80 maxconn
{{hostvars[host]['proxy_maxconn']|default(proxy_maxconn)}}
{% endif %}
backend backend_{{host}}_bigpipe
...
...
@@ -224,7 +224,7 @@ backend backend_{{host}}_bigpipe
http-response deny
{% else %}
no option http-buffer-request
server server_{{host}} {{hostvars[host]['static_ipv4']}}:80 maxconn
100
server server_{{host}} {{hostvars[host]['static_ipv4']}}:80 maxconn
{{hostvars[host]['proxy_maxconn']|default(proxy_maxconn)}}
{% endif %}
backend backend_{{host}}_https
...
...
@@ -232,7 +232,7 @@ backend backend_{{host}}_https
http-response deny
{% else %}
http-response set-header Strict-Transport-Security "max-age=16000000; includeSubDomains; preload;"
server server_{{host}} {{hostvars[host]['static_ipv4']}}:80 maxconn
100
server server_{{host}} {{hostvars[host]['static_ipv4']}}:80 maxconn
{{hostvars[host]['proxy_maxconn']|default(proxy_maxconn)}}
{% endif %}
backend backend_{{host}}_https_bigpipe
...
...
@@ -241,7 +241,7 @@ backend backend_{{host}}_https_bigpipe
{% else %}
no option http-buffer-request
http-response set-header Strict-Transport-Security "max-age=16000000; includeSubDomains; preload;"
server server_{{host}} {{hostvars[host]['static_ipv4']}}:80 maxconn
100
server server_{{host}} {{hostvars[host]['static_ipv4']}}:80 maxconn
{{hostvars[host]['proxy_maxconn']|default(proxy_maxconn)}}
{% endif %}
{% endfor %}
{% if varnish_host|default(false) %}
...
...
@@ -253,9 +253,9 @@ backend backend_varnish
option forwardfor
hash-type consistent
{% if varnish_host == inventory_hostname %}
server varnish 127.0.0.1:6081 maxconn
1000
server varnish 127.0.0.1:6081 maxconn
{{proxy_varnish_maxconn}}
{% else %}
server varnish {{ varnish_host_ip|default('') }}:6081 maxconn
1000
server varnish {{ varnish_host_ip|default('') }}:6081 maxconn
{{proxy_varnish_maxconn}}
{% endif %}
backend backend_varnish_bigpipe
...
...
@@ -265,9 +265,9 @@ backend backend_varnish_bigpipe
option forwardfor
hash-type consistent
{% if varnish_host == inventory_hostname %}
server varnish 127.0.0.1:6081 maxconn
1000
server varnish 127.0.0.1:6081 maxconn
{{proxy_varnish_maxconn}}
{% else %}
server varnish {{ varnish_host_ip|default('') }}:6081 maxconn
1000
server varnish {{ varnish_host_ip|default('') }}:6081 maxconn
{{proxy_varnish_maxconn}}
{% endif %}
{% endif %}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment