camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From conflue...@apache.org
Subject [CONF] Apache Camel > Clustering and loadbalancing
Date Fri, 26 Feb 2010 11:18:00 GMT
<html>
<head>
    <base href="http://cwiki.apache.org/confluence">
            <link rel="stylesheet" href="/confluence/s/1519/1/1/_/styles/combined.css?spaceKey=CAMEL&amp;forWysiwyg=true"
type="text/css">
    </head>
<body style="background-color: white" bgcolor="white">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
     <h2><a href="http://cwiki.apache.org/confluence/display/CAMEL/Clustering+and+loadbalancing">Clustering
and loadbalancing</a></h2>
     <h4>Page <b>edited</b> by             <a href="http://cwiki.apache.org/confluence/display/~cmoulliard">charles
Moulliard</a>
    </h4>
     
          <br/>
     <div class="notificationGreySide">
         <p>Camel proposes different solutions to allow your solution to be scalable,
to distribute the load between different instances. The choice will depend on how you will
deploy/package Camel (standalone mode, embedded in a J2EE or OSGI server, ...) and how the
servers will be configured (master/slave, ...).</p>

<h2><a name="Clusteringandloadbalancing-Loadbalancing"></a>Loadbalancing</h2>

<p>This approach allows to distribute the load between different endpoints. The from
endpoint plays the role of a 'proxy' when we use by example a jetty server</p>

<p>loadbalance() : <a href="http://camel.apache.org/load-balancer.html" rel="nofollow">http://camel.apache.org/load-balancer.html</a></p>

<h2><a name="Clusteringandloadbalancing-Clustering"></a>Clustering</h2>

<p>The clustering can be achieved in different ways : </p>
<ul class="alternate" type="square">
	<li>Work distribution,</li>
	<li>Consumer competition,</li>
	<li>...<br/>
depending how you would like to configure your infrastructure (one or several instances running
on the same machine or distribute across a cloud of servers).</li>
</ul>


<h3><a name="Clusteringandloadbalancing-SameJVM%26CamelContext"></a>Same
JVM &amp; CamelContext</h3>

<p>Different Camel components can be used depending if the work must be done in a sync
or async way</p>

<h4><a name="Clusteringandloadbalancing-Withoutpersistence"></a>Without
persistence</h4>

<p>Async<br/>
seda:// : <a href="http://camel.apache.org/seda.html" rel="nofollow">http://camel.apache.org/seda.html</a>
+ threads()</p>

<p>Sync<br/>
direct:// : <a href="http://camel.apache.org/direct.html" rel="nofollow">http://camel.apache.org/direct.html</a>
+ threads()</p>


<h4><a name="Clusteringandloadbalancing-Withpersistence"></a>With persistence</h4>
<p>jms:// : <a href="http://camel.apache.org/jms.html" rel="nofollow">http://camel.apache.org/jms.html</a>
+ threads()<br/>
activemq:// : <a href="http://camel.apache.org/activemq.htmland" rel="nofollow">http://camel.apache.org/activemq.htmland</a>
+ threads()</p>

<h3><a name="Clusteringandloadbalancing-DifferentJVM%26CamelContext"></a>Different
JVM &amp; CamelContext</h3>

<p>When the infrastructure offers the possibility to deploy the application on several
machines, then you can use the approaches presented at point 2.1. That means means that you
will deploy the same application on several nodes and in this case, we have competitor consumers.
Depending on the load on the servers, messages can be consume by application 1 running on
Server 1 instead of application 2 running on Server 2. If you prefer to deploy routes on different
servers having different CPU/memory, then you can use the following components</p>

<h4><a name="Clusteringandloadbalancing-SuitableforsolutionsrunninginstandalonemodeordeployedinWebApplicationServer%28differentWAR%2FEAR%29"></a>Suitable
for solutions running in standalone mode or deployed in Web Application Server (different
WAR/EAR)</h4>

<p>vm:// : <a href="http://camel.apache.org/vm.html" rel="nofollow">http://camel.apache.org/vm.html</a></p>

<p>This component cannot be used between different OSGI servers</p>

<h4><a name="Clusteringandloadbalancing-BetweendifferentinstancesofOSGIservers%28SMX4%29"></a>Between
different instances of OSGI servers (SMX4)</h4>

<p>nmr:// : <a href="http://camel.apache.org/nmr.html" rel="nofollow">http://camel.apache.org/nmr.html</a></p>

<p>Camel can be not only plugged on the NMR bus but can also use the clustering functionality
offered by ServiceMix 4 ()</p>

<h2><a name="Clusteringandloadbalancing-Cloudcomputing"></a>Cloudcomputing</h2>

<h3><a name="Clusteringandloadbalancing-Cassandra"></a>Cassandra</h3>
<p> It could be interesting to create a Cassandra endpoint to allow to consume<br/>
 info/camel messages from Cassandra DB (NOSQL database) or to push there<br/>
 camel message (using id + binary stream). It might also make an interesting<br/>
 aggregator implementation since its also distributed &amp; can support multi-master</p>

<h3><a name="Clusteringandloadbalancing-camelterracotta"></a>camel-terracotta</h3>
<p> Extends the SEDA component</p>
     </div>
     <div id="commentsSection" class="wiki-content pageSection">
       <div style="float: right;">
            <a href="http://cwiki.apache.org/confluence/users/viewnotifications.action"
class="grey">Change Notification Preferences</a>
       </div>

       <a href="http://cwiki.apache.org/confluence/display/CAMEL/Clustering+and+loadbalancing">View
Online</a>
       |
       <a href="http://cwiki.apache.org/confluence/pages/diffpagesbyversion.action?pageId=14483461&revisedVersion=3&originalVersion=2">View
Change</a>
              |
       <a href="http://cwiki.apache.org/confluence/display/CAMEL/Clustering+and+loadbalancing?showComments=true&amp;showCommentArea=true#addcomment">Add
Comment</a>
            </div>
</div>
</div>
</div>
</div>
</body>
</html>

Mime
View raw message