From 414869f361d5905936c48c5d09598f630ffab3c5 Mon Sep 17 00:00:00 2001 From: briantist Date: Tue, 13 Dec 2011 17:05:18 -0500 Subject: Added new stats options, made changes to make monitor uri optional, added new balance options, changed size and max capacity of the ports text box. --- config/haproxy/haproxy_frontends_edit.php | 90 ++++++++++++++++++++++++++++--- 1 file changed, 84 insertions(+), 6 deletions(-) (limited to 'config') diff --git a/config/haproxy/haproxy_frontends_edit.php b/config/haproxy/haproxy_frontends_edit.php index f7302a2a..df2411b2 100755 --- a/config/haproxy/haproxy_frontends_edit.php +++ b/config/haproxy/haproxy_frontends_edit.php @@ -63,7 +63,11 @@ if (isset($id) && $a_backend[$id]) { $pconfig['stats_password'] = $a_backend[$id]['stats_password']; $pconfig['stats_uri'] = $a_backend[$id]['stats_uri']; $pconfig['stats_realm'] = $a_backend[$id]['stats_realm']; - + $pconfig['stats_node_enabled'] = $a_backend[$id]['stats_node_enabled']; + $pconfig['stats_node'] = $a_backend[$id]['stats_node']; + $pconfig['stats_desc'] = $a_backend[$id]['stats_desc']; + $pconfig['stats_refresh'] = $a_backend[$id]['stats_refresh']; + $pconfig['type'] = $a_backend[$id]['type']; $pconfig['extaddr'] = $a_backend[$id]['extaddr']; $pconfig['max_connections'] = $a_backend[$id]['max_connections']; @@ -87,8 +91,8 @@ if ($_POST) { $reqdfields = explode(" ", "name connection_timeout server_timeout stats_username stats_password stats_uri stats_realm"); $reqdfieldsn = explode(",", "Name,Connection timeout,Server timeout,Stats Username,Stats Password,Stats Uri,Stats Realm"); } else { - $reqdfields = explode(" ", "name connection_timeout server_timeout monitor_uri"); - $reqdfieldsn = explode(",", "Name,Connection timeout,Server timeout,Monitor Uri"); + $reqdfields = explode(" ", "name connection_timeout server_timeout"); + $reqdfieldsn = explode(",", "Name,Connection timeout,Server timeout"); } do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors); @@ -227,6 +231,10 @@ if ($_POST) { update_if_changed("stats_password", $backend['stats_password'], $_POST['stats_password']); update_if_changed("stats_uri", $backend['stats_uri'], $_POST['stats_uri']); update_if_changed("stats_realm", $backend['stats_realm'], $_POST['stats_realm']); + update_if_changed("stats_node_enabled", $backend['stats_node_enabled'], $_POST['stats_node_enabled']); + update_if_changed("stats_node", $backend['stats_node'], $_POST['stats_node']); + update_if_changed("stats_desc", $backend['stats_desc'], $_POST['stats_desc']); + update_if_changed("stats_desc", $backend['stats_refresh'], $_POST['stats_refresh']); update_if_changed("type", $backend['type'], $_POST['type']); update_if_changed("port", $backend['port'], $_POST['port']); update_if_changed("extaddr", $backend['extaddr'], $_POST['extaddr']); @@ -351,17 +359,29 @@ include("head.inc"); var stats_username_row=document.getElementById('stats_username_row'); var stats_password_row=document.getElementById('stats_password_row'); var stats_uri_row=document.getElementById('stats_uri_row'); + var stats_node_enabled_row=document.getElementById('stats_node_enabled_row'); + var stats_node_row=document.getElementById('stats_node_row'); + var stats_desc_row=document.getElementById('stats_desc_row'); + var stats_desc_row=document.getElementById('stats_refresh_row'); if (stats_enabled.checked) { stats_realm_row.style.display=''; stats_username_row.style.display=''; stats_password_row.style.display=''; stats_uri_row.style.display=''; + stats_node_enabled_row.style.display=''; + stats_node_row.style.display=''; + stats_desc_row.style.display=''; + stats_refresh_row.style.display=''; } else { stats_realm_row.style.display='none'; stats_username_row.style.display='none'; stats_password_row.style.display='none'; stats_uri_row.style.display='none'; + stats_node_enabled_row.style.display='none'; + stats_node_row.style.display='none'; + stats_desc_row.style.display='none'; + stats_refresh_row.style.display='none'; } } @@ -428,7 +448,7 @@ set by the 'retries' parameter (2). + + + + + + + + + > + + + + > + + + + > + + + + > + + + -- cgit v1.2.3
- >Round robin + >Round robin Each server is used in turns, according to their weights. @@ -437,9 +457,39 @@ set by the 'retries' parameter (2). is dynamic, which means that server weights may be adjusted on the fly for slow starts for instance.
+ >Static Round Robin + + Each server is used in turns, according to their weights. + This algorithm is as similar to roundrobin except that it is + static, which means that changing a server's weight on the + fly will have no effect. On the other hand, it has no design + limitation on the number of servers, and when a server goes + up, it is always immediately reintroduced into the farm, once + the full map is recomputed. It also uses slightly less CPU to + run (around -1%). +
+ >Least Connections + + The server with the lowest number of connections receives the + connection. Round-robin is performed within groups of servers + of the same load to ensure that all servers will be used. Use + of this algorithm is recommended where very long sessions are + expected, such as LDAP, SQL, TSE, etc... but is not very well + suited for protocols using short sessions such as HTTP. This + algorithm is dynamic, which means that server weights may be + adjusted on the fly for slow starts for instance. +
>Source +"source") echo " CHECKED"; ?>>Source The source IP address is hashed and divided by the total weight of the running servers to designate which server will receive the request. This ensures that the same client IP @@ -491,6 +541,34 @@ set by the 'retries' parameter (2).
Stats Enable Node Name + > +
+
Stats Node + size="64">
+ The node name is displayed in the stats and helps to differentiate which server in a cluster is actually serving clients.
+ Leave blank to use the system name. +
Stats Description + size="64">
+
Stats Refresh + size="10" maxlength="30">
+ Specify the refresh rate of the stats page in seconds, or specified time unit (us, ms, s, m, h, d). +
Monitor Uri @@ -503,7 +581,7 @@ set by the 'retries' parameter (2).
Port - size="10" maxlength="10"> + size="30" maxlength="500">
The port to listen to. To specify multiple ports, separate with a comma (,). EXAMPLE: 80,443