You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Michalis <mi...@gmail.com> on 2013/04/25 18:10:07 UTC
Clustering in smx 4.4
Hi all,
I've read many resources on this forum and on web and I'm confused about how
can I have 2 instances of smx clustered.
Ok I understand that high availability and clustering is provided through
the activemq broker but let me describe the following scenario.
Suppose I deploy the following routes in smx (simplified)
*First*
/"take an xml file from an ftp server put it in a queue do smth and send
data from file to a webservice end point"/
from(ftp://...).to(jms:queue:...)
from(jms:...).to(cxf:endpoint2)
*Second*
/"expose a webservice take xml data from it place them on a queue, do smth
and send data to a webservice end point/t"
from(cxf:endpoint1).to(jms:queue:...)
from(jms:queue:...).to(cxf:endpoint2)
So if deploy exactly the same routes in 2 smx instances does this mean for
the first scenario that
the first smx who takes access to the file in ftp server does the
processing?
Could this result to an error or something like conflict?
In second scenario how can 2 smx expose a a web service in same url? What
load balancer can I have in front to manage HTTP traffic? How can this be
done?
Is this clustering after all?
Thanks in advance!
--
View this message in context: http://servicemix.396122.n5.nabble.com/Clustering-in-smx-4-4-tp5716595.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.
Re: Clustering in smx 4.4
Posted by Michalis <mi...@gmail.com>.
Many thanks to both of you!
--
View this message in context: http://servicemix.396122.n5.nabble.com/Clustering-in-smx-4-4-tp5716595p5716641.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.
Re: Clustering in smx 4.4
Posted by Christian Müller <ch...@gmail.com>.
May be this link is useful for you: [1]
As you may know, SMX is based on Karaf.
[1] http://karaf.apache.org/manual/latest-2.3.x/users-guide/failover.html
Christian
On Thu, Apr 25, 2013 at 6:10 PM, Michalis <mi...@gmail.com>wrote:
> Hi all,
>
> I've read many resources on this forum and on web and I'm confused about
> how
> can I have 2 instances of smx clustered.
> Ok I understand that high availability and clustering is provided through
> the activemq broker but let me describe the following scenario.
>
> Suppose I deploy the following routes in smx (simplified)
> *First*
> /"take an xml file from an ftp server put it in a queue do smth and send
> data from file to a webservice end point"/
>
> from(ftp://...).to(jms:queue:...)
> from(jms:...).to(cxf:endpoint2)
>
> *Second*
> /"expose a webservice take xml data from it place them on a queue, do smth
> and send data to a webservice end point/t"
>
> from(cxf:endpoint1).to(jms:queue:...)
> from(jms:queue:...).to(cxf:endpoint2)
>
> So if deploy exactly the same routes in 2 smx instances does this mean for
> the first scenario that
> the first smx who takes access to the file in ftp server does the
> processing?
> Could this result to an error or something like conflict?
>
> In second scenario how can 2 smx expose a a web service in same url? What
> load balancer can I have in front to manage HTTP traffic? How can this be
> done?
>
> Is this clustering after all?
>
> Thanks in advance!
>
>
>
>
> --
> View this message in context:
> http://servicemix.396122.n5.nabble.com/Clustering-in-smx-4-4-tp5716595.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
Re: Clustering in smx 4.4
Posted by jmservicemix <ja...@iki.fi>.
Gert Vanthienen wrote
> ...Apart from these basic
> workarounds, you could have a look at Fabric, which has a master:
> component for Camel to ensure only one of the routes is active in the
> cluster or build your own GenericFileProcessStrategy implementation
> that can use a shared database/resource to figure out which files are
> being processed.
Fabric looks interesting but confuses me a little. The documentation talks a
lot about Fuse ESB / JBoss Fuse which needs paid subscription to be used in
production. What about Fuse Fabric, can it be used for free?
- can Fuse Fabric be used with standalone ServiceMix? Or is it suitable only
for use with JBoss Fuse?
- what is the license? Can Fuse Fabric be used without cost for production
deployments?
--
View this message in context: http://servicemix.396122.n5.nabble.com/Clustering-in-smx-4-4-tp5716595p5716981.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.
Re: Clustering in smx 4.4
Posted by Gert Vanthienen <ge...@gmail.com>.
L.S.,
Apache ServiceMix is more of a container for integration solutions
that packages ActiveMQ, Camel, CXF, ... together nicely. It doesn't
have a real clustering solution itself, but for high availability and
load balancing we usually rely on JMS queues on ActiveMQ.
Your observation is correct that the rest of the solution is highly
dependent on the actual endpoint type you're using. For the CXF
endpoint, a hardware load balancer or a software solution using e.g.
Apache HTTP's mod_proxy_balancer should work fine.
For the FTP endpoints, it depends a bit on the type of FTP server and
the commands it supports, what actually works for you. You have to
avoid reading from the same file at the same time (using a lock
strategy, rename the files, ...) yourself. Apart from these basic
workarounds, you could have a look at Fabric, which has a master:
component for Camel to ensure only one of the routes is active in the
cluster or build your own GenericFileProcessStrategy implementation
that can use a shared database/resource to figure out which files are
being processed.
Regards,
Gert Vanthienen
On Thu, Apr 25, 2013 at 6:10 PM, Michalis <mi...@gmail.com> wrote:
> Hi all,
>
> I've read many resources on this forum and on web and I'm confused about how
> can I have 2 instances of smx clustered.
> Ok I understand that high availability and clustering is provided through
> the activemq broker but let me describe the following scenario.
>
> Suppose I deploy the following routes in smx (simplified)
> *First*
> /"take an xml file from an ftp server put it in a queue do smth and send
> data from file to a webservice end point"/
>
> from(ftp://...).to(jms:queue:...)
> from(jms:...).to(cxf:endpoint2)
>
> *Second*
> /"expose a webservice take xml data from it place them on a queue, do smth
> and send data to a webservice end point/t"
>
> from(cxf:endpoint1).to(jms:queue:...)
> from(jms:queue:...).to(cxf:endpoint2)
>
> So if deploy exactly the same routes in 2 smx instances does this mean for
> the first scenario that
> the first smx who takes access to the file in ftp server does the
> processing?
> Could this result to an error or something like conflict?
>
> In second scenario how can 2 smx expose a a web service in same url? What
> load balancer can I have in front to manage HTTP traffic? How can this be
> done?
>
> Is this clustering after all?
>
> Thanks in advance!
>
>
>
>
> --
> View this message in context: http://servicemix.396122.n5.nabble.com/Clustering-in-smx-4-4-tp5716595.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.