activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dan Langford <danlangf...@gmail.com>
Subject Re: Running several instances of ActiveMQ behind a proxy/load balancer
Date Fri, 13 Oct 2017 11:28:26 GMT
Here is what I am doing but my setup is a little different. I happen to be
using ActiveMQ Artemis. I am also in Master/Slave mode and behind a load
balancer. In ActiveMQ Artemis the slave will stop listening on the
necessary ports (5671 for me). My load balancer (which is not ELB) is
configured to use those ports to determine if the servers are "alive"
(health checks) and should be considered as part of the "load balancing".
Since the slave stops listening on those ports traffic only gets routed to
the Master. If the master stops listening on those ports (crash or
maintenance) then the slave takes over, starts listening, and the load
balancer automatically recognizes the change based on listening ports and
routes all traffic to the slave.

So if you want to keep Master/Slave mode then you could look into ELB for a
health check on the ports that the clients use.
If you would rather have multiple brokers than can truly have traffic load
balanced across them then i think you need a different clustering strategy.
Instead of master slave then you are probably looking at a "network of
brokers" in which all the nodes can take traffic and then messages can flow
amongst the nodes.

disclaimer: i am a fairly new to the activemq family of brokers meaning i
am quite possibly very wrong

On Thu, Oct 12, 2017 at 9:57 AM sergii <sergii.maliarov@aimms.com> wrote:

> Hi,
>
> So, I'm trying to have a failover setup for my ActiveMQserver at AWS.
> Actually, it should not really matter if it's AWS or not, I think my setup
> is generic.
>
> What I did was the following:
> - run two ECS tasks with ActiveMQdocker container
> - put an ELB (load-balancer) in front those two tasks
> - added EFS (AWS' variant of NFS) there and pointed my ActiveMQ's data dir
> there
>
> The problem is that now my ActiveMQs are running in master-slave mode.
> Meaning that if the load balancer transfers request to the slave (which
> happens like 50% of the time), the connection will be dropped and the
> client
> will need to reconnect until it gets routed to the master.
>
> So, how can I run several instances of ActiveMQ behind a proxy/load
> balancer?
>
> Thank you,
> Sergii
>
>
>
> --
> Sent from:
> http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message