File: Clustering.html

package info (click to toggle)
red5 0.9.1-4squeeze1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 8,940 kB
  • ctags: 8,350
  • sloc: java: 42,118; xml: 12,170; sh: 269; makefile: 32
file content (32 lines) | stat: -rw-r--r-- 7,574 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<html><head>
      <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
   <title>Chapter&nbsp;15.&nbsp;Clustering</title><link rel="stylesheet" href="html.css" type="text/css"><meta name="generator" content="DocBook XSL-NS Stylesheets V1.74.0"><link rel="home" href="index.html" title="Red5 - Reference Documentation"><link rel="up" href="red5-core-technologies.html" title="Part&nbsp;II.&nbsp;Red5 Core Technologies"><link rel="prev" href="ScriptingImplementations.html" title="Chapter&nbsp;14.&nbsp;Scripting Implementations"><link rel="next" href="Management.html" title="Chapter&nbsp;16.&nbsp;Management"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div xmlns="http://www.w3.org/TR/xhtml1/transitional" style="background-color:white;border:none;height:73px;border:1px solid black;"><a style="border:none;" href="http://osflash.org/red5" title="Red5 Open Source Flash Server"><img style="border:none;" src="images/red5-banner.png"></img></a><a style="border:none;" href="http://osflash.org/red5" title="Red5 Open Source Flash Server"><img style="border:none;position:absolute;padding-top:5px;right:42px;" src="images/red5-banner-logo.png"></img></a></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="Clustering"></a>Chapter&nbsp;15.&nbsp;Clustering</h2></div></div></div><p>This page describes the steps to configure and deploy your application on 
		<a class="link" href="Documentation/Clustering/EdgeOriginSolutiononTerracotta" target="_top">Red5 clustering</a>.
	</p><p>In Red5 0.7 the Ant build.xml file contains a build target that creates a 'cluster' folder containing the same setup as described below. Use 'ant dist-cluster' to create the Red5 clustering setup.</p><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="ClusteringLimitations"></a>15.1.&nbsp;Limitations</h2></div></div></div><p>As of now, the current trunk only supports the clustering configuration for multiple Edges with one Origin. The Edge server only accepts RTMP connection.</p></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="ClusteringServerConfiguration"></a>15.2.&nbsp;Server Configuration</h2></div></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="ClusteringConfigurationFiles"></a>15.2.1.&nbsp;Configuration Files</h3></div></div></div><p>There are several configuration files added to support Edge/Origin configuration.</p><p>red5-edge.xml, red5-edge-core.xml - used for edge spring bean configuration. They are under conf/.</p><p>red5-origin.xml, red5-origin-core.xml - used for origin spring bean configuration. They are under conf/.</p></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="ClusteringConfigureEdgeServer"></a>15.3.&nbsp;Configure Edge Server</h2></div></div></div><p>You don't need to deploy your application on Edges.</p><p>We strongly recommend you to deploy Edge on a different server from Origin. But it should be OK to deploy the Edge on the same server as Origin.</p><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="ClusteringEdgeonadifferentServerfromOrigin"></a>15.3.1.&nbsp;Edge on a different Server from Origin</h3></div></div></div><p>Update the configuration of bean "mrtmpClient" in red5-edge-core.xml to point to Origin server:</p><pre class="programlisting">


<b class="hl-tag" style="color: blue">&lt;bean</b> <span class="hl-attribute" style="color: blue">id</span>=<span class="hl-value" style="color: blue">"mrtmpClient"</span>
    <span class="hl-attribute" style="color: blue">class</span>=<span class="hl-value" style="color: blue">"org.red5.server.net.mrtmp.MRTMPClient"</span> <span class="hl-attribute" style="color: blue">init-method</span>=<span class="hl-value" style="color: blue">"start"</span><b class="hl-tag" style="color: blue"> &gt;</b>
    <b class="hl-tag" style="color: blue">&lt;property</b> <span class="hl-attribute" style="color: blue">name</span>=<span class="hl-value" style="color: blue">"ioHandler"</span> <span class="hl-attribute" style="color: blue">ref</span>=<span class="hl-value" style="color: blue">"mrtmpHandler"</span><b class="hl-tag" style="color: blue"> /&gt;</b>
    <b class="hl-tag" style="color: blue">&lt;property</b> <span class="hl-attribute" style="color: blue">name</span>=<span class="hl-value" style="color: blue">"server"</span> <span class="hl-attribute" style="color: blue">value</span>=<span class="hl-value" style="color: blue">"${mrtmp.host}"</span><b class="hl-tag" style="color: blue"> /&gt;</b>
    <b class="hl-tag" style="color: blue">&lt;property</b> <span class="hl-attribute" style="color: blue">name</span>=<span class="hl-value" style="color: blue">"port"</span> <span class="hl-attribute" style="color: blue">value</span>=<span class="hl-value" style="color: blue">"${mrtmp.port}"</span><b class="hl-tag" style="color: blue"> /&gt;</b>
<b class="hl-tag" style="color: blue">&lt;/bean&gt;</b>

</pre><p>Replace red5.xml with red5-edge.xml. Start the server by</p><div class="literallayout"><p><br>
./red5.sh<br>
<br>
or<br>
<br>
java&nbsp;\-jar&nbsp;red5.jar<br>
<br>
</p></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="ClusteringEdgeonthesameServerasOrigin"></a>15.3.2.&nbsp;Edge on the same Server as Origin</h3></div></div></div><p>You don't need to change red5.xml. Copy red5-edge.xml to $(RED5_ROOT) from $(RED5_ROOT)/conf. Start the server by</p><div class="literallayout"><p><br>
java&nbsp;\-jar&nbsp;red5.jar&nbsp;red5-edge.xml<br>
</p></div><p>or update red5.sh to add a parameter "red5-edge.xml", then</p><div class="literallayout"><p><br>
./red5.sh<br>
</p></div></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="ClusteringConfigureOriginServer"></a>15.4.&nbsp;Configure Origin Server</h2></div></div></div><p>Deploy your application to webapps/. Make sure your 9035 port is not blocked by firewall. The port will be used by Edges to connection Origin.</p><p>Update red5.xml with red5-origin.xml. Start the server by</p><div class="literallayout"><p><br>
./red5.sh<br>
<br>
or<br>
<br>
java&nbsp;\-jar&nbsp;red5.jar<br>
</p></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="ClusteringUseYourAppliation"></a>15.5.&nbsp;Use Your Appliation</h2></div></div></div><p>Your RTMP can go through Edges now. Your RTMPT and HTTP can go through Origin as normal.</p></div></div><div xmlns="http://www.w3.org/TR/xhtml1/transitional" class="navfooter"><hr></hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ScriptingImplementations.html">Prev</a>&nbsp;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right">&nbsp;<a accesskey="n" href="Management.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter&nbsp;14.&nbsp;Scripting Implementations&nbsp;</td><td width="20%" align="center"><span style="color:white;font-size:90%;"><a href="http://osflash.org/red5" title="Red5">Red5 Open Source Flash Server</a></span></td><td width="40%" align="right" valign="top">&nbsp;Chapter&nbsp;16.&nbsp;Management</td></tr></table></div></body></html>