Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Tatuya Kamada
slapos
Commits
facc5d5f
Commit
facc5d5f
authored
Sep 08, 2011
by
Sebastien Robin
Committed by
Cédric de Saint Martin
Sep 16, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
optimize haproxy server configuration and explain values
parent
5942f2d3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
1 deletion
+11
-1
slapos/recipe/erp5/__init__.py
slapos/recipe/erp5/__init__.py
+11
-1
No files found.
slapos/recipe/erp5/__init__.py
View file @
facc5d5f
...
@@ -546,8 +546,18 @@ class Recipe(BaseSlapRecipe):
...
@@ -546,8 +546,18 @@ class Recipe(BaseSlapRecipe):
}
}
def
installHaproxy
(
self
,
ip
,
port
,
name
,
server_check_path
,
url_list
):
def
installHaproxy
(
self
,
ip
,
port
,
name
,
server_check_path
,
url_list
):
server_template
=
""" server %(name)s %(address)s cookie %(name)s check inter 20s rise 2 fall 4"""
# inter must be quite short in order to detect quickly an unresponsive node
# and to detect quickly a node which is back
# rise must be minimal possible : 1, indeed, a node which is back don't need
# to sleep more time and we can give him work immediately
# fall should be quite sort. with inter at 3, and fall at 2, a node will be
# considered as dead after 6 seconds.
# maxconn should be set as the maximum thread we have per zope, like this
# haproxy will manage the queue of request with the possibility to
# move a request to another node if the initially selected one is dead
server_template
=
""" server %(name)s %(address)s cookie %(name)s check inter 3s rise 1 fall 2 maxconn %(cluster_zope_thread_amount)s"""
%
config
=
dict
(
name
=
name
,
ip
=
ip
,
port
=
port
,
config
=
dict
(
name
=
name
,
ip
=
ip
,
port
=
port
,
cluster_zope_thread_amount
=
self
.
options
.
get
(
'cluster_zope_thread_amount'
,
1
),
server_check_path
=
server_check_path
,)
server_check_path
=
server_check_path
,)
i
=
1
i
=
1
server_list
=
[]
server_list
=
[]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment