<?xml version="1.0"?>
<!DOCTYPE modulesynopsis SYSTEM "../style/modulesynopsis.dtd">
<?xml-stylesheet type="text/xsl" href="../style/manual.en.xsl"?>
<!-- $LastChangedRevision$ -->

<!--
 Licensed to the Apache Software Foundation (ASF) under one or more
 contributor license agreements.  See the NOTICE file distributed with
 this work for additional information regarding copyright ownership.
 The ASF licenses this file to You under the Apache License, Version 2.0
 (the "License"); you may not use this file except in compliance with
 the License.  You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
-->

<modulesynopsis metafile="mod_heartbeat.xml.meta">

<name>mod_heartbeat</name>
<description>Sends messages with server status to frontend proxy</description>
<status>Experimental</status>
<sourcefile>mod_heartbeat</sourcefile>
<identifier>heartbeat_module</identifier>
<compatibility>Available in Apache 2.3 and later</compatibility>

<summary>
<p> <module>mod_heartbeat</module> sends multicast messages to a <module>mod_heartmonitor</module> listener 
that advertises the servers current connection count.  Usually, <module>mod_heartmonitor</module>
will be running on a proxy server with <module>mod_lbmethod_heartbeat</module> loaded, which allows
<directive module="mod_proxy">ProxyPass</directive> to use the "heartbeat" <em>lbmethod</em> inside
of <directive module="mod_proxy">ProxyPass</directive>.</p>
<p>
    <module>mod_heartbeat</module> itself is loaded on the origin server(s) that serve requests 
    through the proxy server(s).  
</p>

    <note type="warning">
        To use <module>mod_heartbeat</module>,
        <module>mod_status</module> and <module>mod_watchdog</module>
        must be either a static modules or, if a dynamic module, must
        be loaded before <module>mod_heartbeat</module>.
    </note>

</summary>

<section id="consuming">
    <title>Consuming mod_heartbeat Output</title>
  <p>
      Every 1 second, this module generates a single multicast UDP
      packet, containing the number of busy and idle workers.  The
      packet is a simple ASCII format, similar to GET query parameters
      in HTTP.
  </p>
  
<example><title>An Example Packet</title>
v=1&amp;ready=75&amp;busy=0
</example>

  <p>
    Consumers should handle new variables besides busy and ready,
    separated by '&amp;', being added in the future.
  </p>

</section>

<directivesynopsis>
<name>HeartbeatAddress</name>
<description>Multicast address for heartbeat packets</description>
<syntax>HeartbeatAddress <var>addr:port</var></syntax>
<default>disabled</default>
<contextlist><context>server config</context></contextlist>

<usage>
<p>The <directive>HeartbeatAddress</directive> directive specifies the
multicast address to which <module>mod_heartbeat</module> will send
status information. This address will usually correspond to a configured
 <directive module="mod_heartmonitor">HeartbeatListen</directive> on a
frontend proxy system.</p>
<highlight language="config">
HeartbeatAddress 239.0.0.1:27999
</highlight>    
</usage>
</directivesynopsis>

</modulesynopsis>
