Details
-
Type: Improvement
-
Status: Closed
-
Priority: Minor
-
Resolution: Fixed
-
Affects Version/s: 1.6
-
Component/s: Bridge
-
Labels:None
-
Environment:ICEfaces async applications only
-
Affects:Documentation (User Guide, Ref. Guide, etc.), Sample App./Tutorial, Compatibility/Configuration
Description
We need to change the default connection settings values for async connections to:
1. Improve conn. robustness / reduce occurrences of Connection Lost messages
2. Reduce heartbeat frequency / communications traffic
To meet these goals, the following changes are recommended:
1. Increase the default ping timeout value from the current 3 secs. to 30 seconds. This gives a much longer time for the ping to respond successfully in higher latency situations and is a more conservative approach for the default scenario.
// 30 sec. ping timeout
<context-param>
<param-name>com.icesoft.faces.heartbeatTimeout</param-name>
<param-value>30000</param-value>
</context-param>
2. Increase the async connection heartbeat interval time from the current 20 seconds to 50 seconds. This will increase the interval to just under the 'magic' 60 secs. / 1 min. mark, which is where certain communications services and devices may start to kill idle connections. Overall effect is to reduce the frequency of pings being sent.
// 50 sec. heartbeat interval
<context-param>
<param-name>com.icesoft.faces.heartbeatInterval</param-name>
<param-value>50000</param-value>
</context-param>
Note that the heartbeet retries value will remain at the current setting, which is 3.
Also note that a new connection setting has been added in 1.7. 'blockingConnectionTimeout' specifies how long the async blocking connection should be held open before being released for a new blocking connection. In effect, this specifies how long an idle blocking connection should be held. The blocking connection is closed and re-opened with every comm. interaction, such as user interaction or a heartbeat ping. The purpose of this setting is to remove the possibility of threads being held blocked for a long duration on a "dead" / completely inactive client connection. Its default value should be 90 secs.. In general this value should be larger than the heartbeat interval to avoid unnecessary traffic (unblocking and blocking without any updates available). The 90 sec. value provides more than enough time for the default heartbeat interval to occur and time-out (50 secs + 30 secs.) before the blocking connection is released.
1. Improve conn. robustness / reduce occurrences of Connection Lost messages
2. Reduce heartbeat frequency / communications traffic
To meet these goals, the following changes are recommended:
1. Increase the default ping timeout value from the current 3 secs. to 30 seconds. This gives a much longer time for the ping to respond successfully in higher latency situations and is a more conservative approach for the default scenario.
// 30 sec. ping timeout
<context-param>
<param-name>com.icesoft.faces.heartbeatTimeout</param-name>
<param-value>30000</param-value>
</context-param>
2. Increase the async connection heartbeat interval time from the current 20 seconds to 50 seconds. This will increase the interval to just under the 'magic' 60 secs. / 1 min. mark, which is where certain communications services and devices may start to kill idle connections. Overall effect is to reduce the frequency of pings being sent.
// 50 sec. heartbeat interval
<context-param>
<param-name>com.icesoft.faces.heartbeatInterval</param-name>
<param-value>50000</param-value>
</context-param>
Note that the heartbeet retries value will remain at the current setting, which is 3.
Also note that a new connection setting has been added in 1.7. 'blockingConnectionTimeout' specifies how long the async blocking connection should be held open before being released for a new blocking connection. In effect, this specifies how long an idle blocking connection should be held. The blocking connection is closed and re-opened with every comm. interaction, such as user interaction or a heartbeat ping. The purpose of this setting is to remove the possibility of threads being held blocked for a long duration on a "dead" / completely inactive client connection. Its default value should be 90 secs.. In general this value should be larger than the heartbeat interval to avoid unnecessary traffic (unblocking and blocking without any updates available). The 90 sec. value provides more than enough time for the default heartbeat interval to occur and time-out (50 secs + 30 secs.) before the blocking connection is released.
Note that these settings have been tested successfully with FF2, IE6 and IE7.
We'll need to update the Dev. Guide Connection Settings section with the updated defaults and new parameter.
Also, all sample apps. etc. that specify values should be updated to reflect the new defaults.