FlashConnect heartbeats are often required when the network connection between the FlashConnect Web server and FlashConnect mvBase server passes through a firewall. As a security feature, some firewalls track a connection's activity and drop the connection if there is no activity for a period of time. Since FlashConnect is designed for the efficient use of network resources, when no requests are being made, it does not pass any messages between the FlashConnect Web and D3 server. During these idle periods, the firewall may drop the connection between the FlashConnect Web and database server. When a request is subsequently made, an error occurs because, unknown to both the FlashConnect Web and database server, the connection was dropped. A heartbeat prevents this from occurring by periodically exchanging messages between the FlashConnect Web and database server whenever FlashConnect is waiting for a message from the Web server.
The heartbeat serves a second purpose as well. If either the FlashConnect Web or database server crashes, the server still running does not detect that the other server has stopped, and attempts to continue to use the now non-existent connection. The heartbeat solves this problem by:
terminating the connection if the database server does not respond to the heartbeat sent by FCService within a few seconds.
terminating the connection (through w3Monitor) if database is waiting for a request and does not receive a request or heartbeat within a specified time frame.
Whenever a connection is terminated due to a heartbeat failure, a message is logged to the Event log (Windows Web servers), FlashConnect.log (UNIX Web servers), or w3Logs,FlashConnect file (database Server).
These parameters are set when configuring the FlashConnect heartbeat:
frequency |
(Set in the server pool/Web host definition from the database server.) Sets the frequency (in seconds) in which w3Monitor checks this configuration. |
heartbeat |
(Set from the database server.) Sets the server pool/Web host maximum connection time, for the last communication (either a heartbeat or a request) with FCService after which w3Monitor should terminate the connection. |
heartbeat period |
(Set from the Web server.) Sets the frequency in which FCService sends the heartbeat. |
When FCService starts sending a heartbeat, it sends a heartbeat to the first connection, then after the connection responds or is terminated, sends a heartbeat to the next connection. The heartbeat period should be long enough so that it does not cause excessive network traffic and short enough that crashed connections are terminated in a timely period. Additionally, set the heartbeat period and frequency so that connections are not incorrectly terminated. We recommend that:
the w3Monitor heartbeat is at least twice the specified heartbeat period.
the w3Monitor frequency is less than the w3Monitor heartbeat.
For example, when you configure a server pool from the FlashConnect Server Pool Maintenance Web page, set the w3Monitor frequency to 60 and the w3Monitor heartbeat to 1201 as displayed in the following example.
Then, set the Heartbeat Period to 600.
For UNIX: Edit the FlashConnect.conf file.
For Windows: Select Start > Programs > TigerLogic > FlashConnect > Configure from the Start menu.
NOTE |
The heartbeat is configured from the FlashConnect Server Pool Maintenance Web page. For more information, see Configuring, Starting and Stopping FlashConnect Components. |
See Also
Customizing the FlashConnect Server and Web Server