camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [CONF] Apache Camel > Clustering and loadbalancing
Date Fri, 26 Feb 2010 11:18:00 GMT
    <base href="">
            <link rel="stylesheet" href="/confluence/s/1519/1/1/_/styles/combined.css?spaceKey=CAMEL&amp;forWysiwyg=true"
<body style="background-color: white" bgcolor="white">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
     <h2><a href="">Clustering
and loadbalancing</a></h2>
     <h4>Page <b>edited</b> by             <a href="">charles
     <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="" rel="nofollow"></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>
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>

<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

seda:// : <a href="" rel="nofollow"></a>
+ threads()</p>

direct:// : <a href="" rel="nofollow"></a>
+ threads()</p>

<h4><a name="Clusteringandloadbalancing-Withpersistence"></a>With persistence</h4>
<p>jms:// : <a href="" rel="nofollow"></a>
+ threads()<br/>
activemq:// : <a href="" rel="nofollow"></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

<p>vm:// : <a href="" rel="nofollow"></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="" rel="nofollow"></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 id="commentsSection" class="wiki-content pageSection">
       <div style="float: right;">
            <a href=""
class="grey">Change Notification Preferences</a>

       <a href="">View
       <a href="">View
       <a href=";showCommentArea=true#addcomment">Add

View raw message