File: clustering.html

package info (click to toggle)
red5 1.0~svn4374-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 11,456 kB
  • sloc: java: 56,478; xml: 13,069; sh: 593; makefile: 33; jsp: 24
file content (25 lines) | stat: -rw-r--r-- 7,216 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
<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="core-components.html" title="Part&nbsp;II.&nbsp;Red5 Core Components"><link rel="prev" href="scripting.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>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="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note: Limitations"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../images/admons/note.png"></td><th align="left">Limitations</th></tr><tr><td align="left" valign="top"><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></td></tr></table></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e3732"></a>15.1.&nbsp;Server Configuration</h2></div></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="d0e3735"></a>15.1.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="d0e3744"></a>15.2.&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="d0e3751"></a>15.2.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><pre class="screen">
$ ./red5.sh
</pre><p>or</p><pre class="screen">
$ java -jar red5.jar	
			</pre></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="d0e3766"></a>15.2.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><pre class="screen">
$ java -jar red5.jar red5-edge.xml
</pre><p>or update red5.sh to add a parameter "red5-edge.xml", then</p><pre class="screen">
$ ./red5.sh
</pre></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e3777"></a>15.3.&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><pre class="screen">
$ ./red5.sh
</pre><p>or</p><pre class="screen">
$ java -jar red5.jar			
		</pre></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e3790"></a>15.4.&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="scripting.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>